The Debugger cannot continue running the process. Unable to start debugger - visual-studio-2012

I have a Lightswitch 2012 application. It's been working fine for weeks. I made some changes and F5 stopped working. When I click on Start (toolbar) it gives this error message and does nothing.
"The Debugger cannot continue running the process. Unable to start debugging"
Note: It does compile file, it just doesn't run.
If I rollback to an earlier version then it works fine - i.e. it is solution specific.
Here is a video of the current version of my solution with the problem:
http://screencast.com/t/TD4RzLASO
and here is the previous version of the solution from earlier today (and no, I don't know what I changed). As you can see, at least it does something with F5 or Start:
http://screencast.com/t/wX5fRDPz
Rebooting doesn't help... ;)

Maybe you should select start up project which can be started.
Solution Explorer -> On your startable project right mouse click -> Set as Start up Project.
I had this situation when i unloaded my main lightswitch project and other project which is dll has been selected automatically and when i reloaded my main project "The Debugger cannot continue running the process. Unable to start debugging" exception was shown, because debuger was trying to load DLL.

Sometimes you need to start up a project which is compiled as a dll, for instance when testing WCF services.
To do so:
Projects -> 'Set Startup Projects...' -> Select 'Multiple Startup Projects' and set action to 'Start' for each one.

It's a pity you didn't recorded the whole screen, so I can't confirm, but I had the same error a few times...
When this happens, my "output panel" isn't visible and even I try to go on Menu -> View -> Output the panel don't appear.
I need to restart my Visual Studio 2013.
Then my output panel is visible again and everything works fine.
I discovered the cause was an extension which I installed on my Visual Studio.

I encountered this problem after removing some projects from the solution. I wasn't able to pinpoint the exact cause, but closing the solution, deleting the solution file, then opening the project and re-adding supporting projects solved the issue for me. Kind of a sledge hammer, but only takes a minute to do if you don't have a lot of projects.

Also, there are some people that uses a "One Click" Certification in your settings that you'll want to make sure its set up right, re-install or unchecked in-which this case was my problem. I finally got it working myself, but check that too just in case. Again this would be for most Visual Studio Versions only. Im 2013 Ult.

Related

.Net InstallShield - Creates broken shortcuts

I've got 2 projects in my solution.
The one is a small win forms project, and
the other, a InstallShield Limited Edition project.
Everything works fine & installs correctly for the most part. The desktop and start menu shortut's get created also with the correct icon... except that that the target & start in properties are blank... and thus the shortcuts are useless.
Normally target should have the reference to the executable, but it seems to be populated with my project name :/
I'm not too sure how I can go about debugging this? Or what would be causing the problem?
I started going going through the sub steps in the Installer project.
Under the 3rd node - Configure the Target System, there is a Shortcuts/Folders item.
Upon opening you'll see a tree view of where the shortcuts will be created. I selected the desktop shortcut, and noticed that the working directory was not set. I changed it to point to [INSTALLDIR]
This fixed the problem for me

VS 2012 Error on build of Hello World: "The operation could not be completed. The parameter is incorrect"

I have started up VS 2012. I created a new solution/project, and made the project a console app. In the provided "Program" class, in the "Main" method, I have added a single line, namely:
Console.WriteLine("Hello World");
This is the ONLY thing I have done.
I right-click on the solution name, and select "Build".
Immediately, a dialog/alert pops up with the title "Microsoft Visual Studio", containing the silver "X" in the red circle, followed by the enormously useful error text that reads:
The operation could not be completed. The parameter is incorrect.
I have done extensive searching on this very informative error, and have come to the conclusion that it pops up in many different circumstances. In my case, I started experiencing it some days ago (on a much more complex MVC app) and it seems intermittent. Sometimes I get the error, sometimes not. Sometimes I can close VS entirely and re-open and it will still be there, sometimes it will be gone for several hours. Rebooting the system (ick) usually makes it go away.
Any help out there? This is now driving me crazy. Many thanks in advance.
ADDITIONAL INFO: If I kill all Visual Studio applications in the task manager (rather than just closing the Visual Studio the more conventional way) it seems to always fix the problem on restarting Visual Studio. Still baffled.
Simply turning VS off and on again removed this error for me.
I tried to solve this by deleting the *.suo files, bin and obj folder, with no success. I tried to restart VS(2015) and reload the solution. All project references were fine.
I then killed all processes related to Visual Studio.
After that I was able to rebuild the solution.
For me this happened when I removed a project from the solution that wasn't at the same path anymore.
Weird, it was a greyed out project, but was still needed for the build somehow?!
I found out where it was referenced, in my .sln file I had a References entry pointing to the guid of a missing or deleted project in the solution. This would cause an error.
You can also check the properties pages of the solution, one of them gives a message about a project with the name "" that doesn't exist.
So basically, cleanup the References section in your .sln until it builds.
This happened to me in a new web project in VS 2015. I got the error when I tried to build or clean the solution. Closing down VS and deleting everything in the bin folder worked for me.
For me what helped was to delete all bin obj folders and rebuild the solution.
I was moving an mvc project from 2013 to 2015.
Strange as it is - happened to 2 solutions, but not for every other I had.
For me, my project was not opening on VS 2022 ,i tried this and it worked!
Directory: Your project folder/.vs/SolutionName/.suo
Solution: Delete All .suo files from above directory
Note: If you cant find , just search '.suo' on project folder.
Run the project.

Visual Studio deployment error

"The application could not be launched for debugging. Please make sure the device is unlocked."
I am getting this error when I try to launch the app on my device for debugging.
I have tried the following:
Relaunch Visual Studio,
Reinstall Visual Studio,
Restart my computer,
I have selected both debug and release in the configuration window.
The problem is that its not getting launched even in the emulator. The emulator opens and never loads the app but gives the same error message. And I have tried to just open a new application on VS and tried to run the default application. That also gives the same problem.
Everything was working fine after I opened a few more projects for reference, It suddenly started giving this error message.
Make sure a Windows project is not set as startup(assuming you have both windoes project and phone project in the same solution). For example If your target platfrom is a Windows phone project WP7, then you cannot have a windows project as startup. This is a known reason for the error you mentioned.
Also what is the operating system you are working with? I know the error you mentioned reprorted on some OS's including Windows server 2003 and 2008. Try running your project in winsdows 7.
I suddenly got exactly the same issue today. I was coding like always and then I got this problem.
// P.S.
// Today I updated Windows from 8 to 8.1
// Then I installed VS 2013 preview
// But continued working in VS 2012 (I need R#)
// After ~ 5 hours of work I got this issue
I tried everything, deleted emulators from Hyper-V, deleted all virtual commutators, restarted VS 2012, restarted laptop, deleted Bin and obj folders from project, rebuilded project.
But nothing helped.
Then I tried to open solution in VS 2013 preview, and it works!!
I hope I help you with this answer.
If somebody know how to fix it in VS 2012, please tell us
I have a similar problem but I’m able to debug my app once I click OK on the error prompt following the “Launching TaskHost.exe failed.” message in the status bar. I haven’t been able to solve it but I’ve found a workaround that might also work for you.
Start the “Simulation Dashboard” under “Tools” and instead of starting the debugger the usual way build your project if needed and then try to start the debugger by clicking “Locked” under “Lock Screen” on the dashboard.
This answer worked for me.
Under the following:
Solution(Right-click) > Properties > Configuration Properties > Configuration
Ensure that your main project is set to 'Deploy.'

This app failed to launch because of an issue with its license

I'm happily in the middle of coding then I try to launch my app in debug mode but I get this error message.
Unable to activate Windows Store app
This app failed to launch because of an issue with its license
The app was launching fine a few minutes earlier so this came as a surprise. I tried restarting Visual Studio but doing so did not help.
I got the annoying "renew your developer license" dialog yesterday I think. It had renewed without issue.
How do I make this error message go away so i can debug my app?
Well, I got it working by deleting the main project's 'bin' and 'obj' folders. Cleaning and Rebuilding wasn't enough. Hope this answer saves someone else the few minutes of confusion I just experienced.
I recently had a similar issue. In my case I had to uninstall the re-install the app to get it working.
Hope this helps someone. Also, to find out further detail about why it failed, you can checkout the event logs:
Event Viewer > Applications and Services logs > Microsoft > Windows > Aps > Microsoft-Windows-TWinUI/Operational
There might be some more detail in there. In my case it was logged as an error event which said the app could not be launched because of a temporary issue with its license.
I just uninstalled the existing version of the app from the start screen, and then launched the app again from Visual Studio and it is launched just fine.
I think the reason behind this is because of renewing the license of Visual Studio and trying to launch an app that was installed when the previous license was active.
I see doing stuff with the bin and obj folders appears to be the accepted answer to this.
I fixed this issue by selecting the 'Uninstall and then re-install my package. All information about the application state is deleted.' check box under the Debug tab of the project properties. You can uncheck it once you've done it once for all future builds.
I haven't had any issue with this solution. Simple fix and you don't have to worry about someone doing something to folders that could cause bigger issues.
http://daxdude.blogspot.com/2013/04/c-error-unable-to-activate-windows.html
I've had this issue a few times now, most of the time deleting the Bin and Obj folders will clear the issue up (These folders are automatically generated during a project build so don't worry about deleting them)
I have found whilst debugging on a remote device (A tablet or phone) that Deleting these folders doesn't solve the problem though - in this case the best solution I have found is just to do a restart on the device I was remote debugging to.
Simple but it works!
I just cleaned my solution and re-started Visual Studio. That did the trick for me - and didn't involve hunting around for files to delete, so you might want to try that first.
go to BUILD-->Clean Solution and click and after its has been cleaned again go to BUILD-->Rebuild Solution. After it has successfully rebuilt your solution just deploy it(Ctrl+F5). This solved the problem for me.

VS2012: Property Pages isn't opening: Object reference not set to an instance of an object

I'm on Visual Studio Premium 2012, Version 11.0.50727.1 RTMREL, Windows 7 Enterprise (SP1).
When I right click on the Solution, and click Properties, I get a popup window showing the the null reference exception (Object reference not set to an instance of an object).
When I try the same in 2010, it works fine, opening up the normal solution properties pages, allowing me to set the startup order etc.
Also, in 2012, View -> Property Pages, gives the same result.
Please advise how to solve this, is this a known bug?
UPDATE 1: Tried running devenv /resetsettings as well as devenv /safemode but the problem persists. Also tried it on a new solution, and the problem persists.
UPDATE 2: Seems that disabling any extension, and trying again, sorts out the issue. Re-enabling extension doesn't bring the bug back.
UPDATE 3: Go vote here if you're still having this issue: https://connect.microsoft.com/VisualStudio/feedback/details/763961/cannot-open-property-pages-for-solution
This happened to me as well. If you have ReSharper installed, try disabling it (Tools -> Options -> ReSharper -> General -> Suspend and restart VS2012. If you do not have ReSharper installed, I'm afraid I have no idea.
After seeing some comments here, and running into it myself, it appears that disabling Re-Sharper doesn't always fix the issue. However, if you disable, restart, re-enable 'other' add ons, the issue will eventually go away temporarily. The next time visual studio opens, you will likely be in the same spot.
In my case, the problem was solution-specific. NuGet was causing this error, but not the extension itself but a NuGet package that generated an error on VS load. When I opened NuGet Package Manager Console I saw a big red text with a description of the error. In my case it was T4Scaffolding.Core package, which in turn is a dependency of MVCMailer.
If this is your case, you will probably see what package generates an error in PM Console.
I was encountering this problem on one of my solutions, while it didn't happen for others. The solution causing the trouble didn't do so until I added a certain project to it; after that I could not view the solution's properties anymore or set the startup projects.
Removing the project from the solution didn't solve it, the only way to 'reset' was to create a new solution file and adding all projects one by one to it. This made it work again, until of course I re-added the offending project.
Today the issue was solved for me by updating the NuGet package manager.
This is my experience with the problem:
(Running VS2012 as administrator, hoping that some setting would be sorted out).
I have a solution with two MVC projects and other projects.
If I unload the two MVC projects without restarting VS, the problem is still there. After restarting VS, with the two projects not loading, but showing in Solution explorer, the problem disappears.
Load the two projects back, Solution properties still work, but after a restart the cycle restarts.
NOTE: There is no difference in the projects and solution files when the two MVC projects are not loaded.

Resources