Reputation: 456
I'm having problems launching an application with VS2017 on Windows 10. Starting in Debug mode, a popup apperars with the message:
Error while trying to run project: Unable to start program ''. The request is not supported.
If I launch without debug, it runs. If I run it and then attach to the process, it attaches. If I run with administrative privileges, then it debugs (but I can't develop with administrative privileges). I'm owner of the folder where is source code and where project is built.
It works like a charm on previous PC with Windows 7.
Any idea?
Upvotes: 10
Views: 11081
Reputation: 133
This seems to be a catch-all error message, based on the varied answers above. I will add a new one: in my case our IT department a few days earlier deployed new PolicyPak security software which prevented execution of unknown applications. I saw this message 'Error while trying to run project' in Visual Studio 2022, and then found it on multiple projects. Since corporate IT didnt share this news with any of us developers ahead of time, I wasted 2 days chasing down the symptoms trying to find an answer. Finally got a response from an IT ticket: "Oh, that must be because of the new security package we deployed this week." I found it by right-clicking the .exe file and noticed I have a new option, Run Self Elevated.
Upvotes: 0
Reputation: 31
I discovered this issue in Visual Studio 2017, and I found that excluding my code folders from my virus scanner (MalwareBytes) solved the problem in my case.
Upvotes: 2
Reputation: 456
In the end, i found the solution. The problem is ConEmu set in "Aggressive mode" and as default terminal: it capture my application execution and do some unknown interference. I removed that setting, and my app work like a charm.
Upvotes: 3
Reputation: 53
In my case this was the result of my virus software quarantining the executable as "Malware" because I had used a component in it that connected to the internet. Once I listed my project folder as excluded from malware detection everything ran just fine.
Upvotes: 1
Reputation: 198
You need to check "Use Managed Compatibility Mode" in Tools|Options|Debugging|General.
Upvotes: 8