Console application. Unable to find runtime version to run this application (and I have it all)

Like others, I had a problem with a simple console application that reads records from our database.

This small program should sit on our file server. He reads the new records and forwards the summary statements of the parent company.

This will be a scheduled task that runs every X minutes.

I do NOT want the installer because I do not want the server to require a reboot.

From the screenshot, note that I have almost all versions of the already installed infrastructure and that debugging information is copied to the program folder.

This is a debug version of the program, but no other debug information is displayed on the window.

I tried to build on 2.0, 3.5 and 4.0. All versions give me the same error message.

screenshot

[UPDATE]: wal in the comments for

<?xml version="1.0"?> <configuration> <startup> <supportedRuntime version="v2.0.50727"/></startup> </configuration> 

This is a console application, so this is literally the entire app.config file. I usually don’t know when it comes to these .config settings; however, it looks like I feel like I have a pen on this! :)

+4
source share
2 answers

I initially thought that someone was going to fuss about me for a bad technique when I put my executable here, but at that time I didn’t care. I just wanted to make it work.

Notice where the executable was placed?

screenshot from OP

It is located in the C:\Windows\System32 .

Obviously, the System32 is for Windows commands.

So why did I post my small executable here? . Since this folder is almost guaranteed to be included in the path to the Windows environment.

I knew that someone annoyed me over time, so I decided to move it today to a folder with the corresponding name in the Program Files (x86) directory.

Well, I did it, and now, like magic, the program works fine.

So, I'm going to assume that the .NET Framework applications are not allowed to run in the System32 .

I would like to hear people tell me what exactly is connected with this and why .NET Framework applications cannot enter here.

+2
source

I suspect that the .Net installation is corrupt. You can try the following tool to clean the .net framework and reinstall it.

. network environment cleaner

+1
source

All Articles