Guys I created a console application in Visual Studio 2010. It targets the .NET framework 2.0. When I run the application is Visual Studio, it works perfect. I then exited Visual Studio and copied the executable to my C:\Windows\System32 directory. When I open a command prompt window and try to execute my program, it comes up with a standard Windows message box with an error that says "Unable to find a version of the runtime to run this application". I know I got the .NET framework installed.
I then copied the executable to my C:\Users\Public directory and tried to execute it from there and it worked fine. So I am assuming this is some kind of security issue or something? What do I need to do make the application work from C:\windows\system32 directory?
I am using Windows 7 64-bit, by the way. The application was compiled to target .NET 2.0 framework and 32-bit machines.