When the assembly is inside "C: \ Windows \ System32", I get "Unable to find runtime version to run this application",

I am currently writing a screensaver using C # and the express version of VS2010. I created a beautiful little splash screen and renamed the resulting assembly to the * .scr extension.

When I put this on my desktop and double-click on it (or select configure from the context menu), it works fine and displays the correct form / splash screen. However, when I install this by placing it in the C:\Windows\System32 , I try to double-click on it and get this error:

Unable to find a version of the runtime to run this application

Also it does not work with the splash screen control panel. It appears in the drop-down list, but it does not work.

Any idea what is going on?

+4
source share
1 answer

The problem is that the screensaver was compiled for a 32-bit processor. In the %WINDIR%\System32 on a 64-bit OS, only 64-bit exes are allowed. In fact, I used the 64-bit version of Windows7.

The correct place to place a 32-bit screen saver is in %WINDIR%\SysWOW64 or compiled using the "AnyCPU" option in Visual Studio, after which you can set it to %WINDIR%\System32 for everyone.

+5
source

All Articles