Cannot control startup projects in Visual Studio - visual-studio

Visual Studio 2012 will not allow me to set multiple startup projects.
I have tried:
Right-click the solution / Set StartUp Projects...
Result: Nothing happens.
View / Property Pages
Result: Popup "Object reference not set to an instance of an object."
I have no add-ins running, and disabled all extensions that can be disabled without uninstalling. Active extensions are
Microsoft Web Developer Tools
NuGet Package Manager
Visual Studio Extensions for Windows Library for JavaScript (1.0.8377.0 AND 1.0.9200.20512
VisualSVN
Is this a known issue? Is there a fix/work-around? Can I specify the startup projects by editing the .sln/.csproj file if the VS2012 UI continues to fail?

I'm pretty sure this has to do with NuGet Package Manager. I did as described here.
Uninstalled NuGet Package Manager in Tools => Extensions and Updates... and restarted Visual Studio 2012/Visual Studio 2013 Preview. Now I can happily configure my solution properties again!
Installed NuGet Package Manager again and the problem reappeared. :(
This is a palliative answer. If there's a definitive answer, please share it! :)
Make sure you vote on this Connect Bug.

Found this post while searching for a related issue I was having. I thought it would be helpful for others to know what I found.
My problem was trying to switch between start up projects, IIS Express would always load the same project. My solution was to edit the project properties >Web> assign a different port number for each project. Now when I select Set as StartUp Project... it actually works
Note** I did not have any issues with NuGet probably because I'm using the released version of 2013

Related

Error while opening SSIS package in Visual Studio (Incompatible)

Quite new to SSIS. To open existing SSIS packages in Visual Studio and I clicked SSIS but it has opened Visual-Studio and not my packages.
In solution explorer showing that SSIS packages(incompatible) and below that "the application not installed",but actually in Extensions windows its showing that installed SSIS. Please help me out resolve the below error (Image).
I tried to modify the package and uninstalled the SSIS tool and installed again. But still same problem
I had the same problem and I found this menue choice in Visual Studio. I right clicked the Solution, chose Resolve Errors and it resolved my problem.
I think you need to install SQL Server Data Tools for you to launch the project and test in your local SQL instance. If you're, like me, fairly new to SSIS package, I suggest you follow this Microsoft official tutorial so that you are familiar with ins and outs of SSIS package.
If you are sure that you have installed all necessary components, please ensure that VS > Tools > Extensions and Updates > Microsoft Integration Services Projects is enabled. Once enabled, restart Visual Studio. It might still look the same. Last step is to right-click on the project and choose "Reload Project".
I always ignore and shut down the carking update notification when opening SSIS, until I encountered this error.
I tried googling it and tried "reload project" and "Resolve errors" option, I also uninstalled SSDT and reinstall it, I also disabled and enabled SSIS in "Extensions and Updates" Bar. They all failed.
So I updated SSIS since I'm bored and tired, then I tried "reload project" and "Resolve errors" option again, the magic is everything going fine, like before! It's just my experience, not representative.
I already faced the same problem, for some reasons the SSIS extension was disabled.
So to resolve this issue you need to go to :
Extensions > Manage Extensions > Installed
Make sure that the SSIS extension is enabled then close and reopen you project.

Visual Studio Debugging is stuck at "Attaching to the web server"

When I run my Web API application I get the following window:
It just stays like that indefinantly, until I hit cancel.
When I do hit cancel, this error message is shown:
I have tried rebooting, and running iisreset /restart but it does not fix it.
Any ideas what I can do to get my debugger working again?
NOTE: My Web API 2 project's Servers setting is set to Local IIS. My service is hosted by IIS and when I am not debugging, it works fine.
A possible fix:
Check the "Enable Just My Code" in Tools->Options->Debug
I just did a reset for all the settings for VS and it worked again.
Tools => Import and Export Settings => Reset All Settings
good luck!
I had this issue for Visual Studio 2017 and like with the previous post I had Debugging option "Enable .NET Framework source stepping" ticked. Un-ticking fixed the issue.
So as I commented before I had this same issue, but I now figured out the cause and have a solution.
I just got a new machine last week (this issue was actually one of the reasons why) and after a while I had the same issues, not being able to debug my projects. Luckily because I was installing all the updates one by one I was able to pin-point when it started happening.
It seems the latest update for the "Microsoft ASP.NET and Web Tools" extension breaks something.
Sadly, uninstalling or reverting the Web Tools extension is not easy: Remove this extension by going to the Windows control panel and modifying your Visual Studio installation. I had to remove Visual Studio completely and reinstall it (repair didn't do the trick).
You can update and install all your extensions as you wish, just make sure that you don't update the Web Tools extension
I tested this on my old machine and it did the trick there as well.
I've also created an Issue on GitHub as I won't be updating the extension until this is fixed, if anybody has additional information please add it to the Issue.
In Visual Studio 2015, go to Tools -> Options -> Debugging and deselect "Enable .NET Framework source stepping". This may relate to an issue with loading symbols, so if you want to keep the ability to debug .NET Framework source, then it may help to search the web for how to clear the symbol cache, or preload it, or set your symbol server, and so on.
In Visual Studio 2017, I just restarted my machine and ran the solution, no other windows opened not even a browser, although visual studio took a long time to open (30+ projects in a solution) the problem did not reoccur.
I had the same issue in VS 2017 and un-checking 'Native code' did the trick. Not sure why it was checked.
In my case I set Debugging ->Symbols -> To "Load Only Specified Modules" to include the symbols for, in my case a devops symbols feed for some internal NuGet packages
Options>Debugging>Symbols>Load Only Specified Modules
By checking the option "Always load symbols where located next to modules" the setting won't mess with the regular/classic debugging in VS for your own code
This way the Symbols are still loading where needed and Visual Studio is not trying to load debugging information for all the IIS .net dlls that were loaded by w3wp
Alternatively it can also be configured to not load symbols for microsoft.*.dll and it will also work.
Didn't see this in the current answers, so thought I'd give my 2 cents in 2022:
What worked for me:
Make sure to check that your IIS application pool hasn't been stopped (and restart it if it is), and then if that's not the case, restart your IIS server.
If you don't where those settings are, open our Internet Information Services (IIS) Manager, Application Pools are in the left-hand column, and restart/start/stop your server is in the right column.

VS2013 cannot add item to package

I'm using VS2013 to development and maintain a couple of SP2013 projects. However, I think somehow I managed to corrupt one of the projects.
When I go to the "Package.package" designer, I see only (mapped SP) folders in there (it should also include the feature of the project). When I double-click, thus remove, one of these and try to re-add it, I get the following error msg
http://i.imgur.com/nC8RdOq.png
Same goes when I try to add the feature to the package
What's also strange is that if I go into the Feature designer, I cannot add any items. VS gives a similar type of err msg:
http://i.imgur.com/wqC5nAg.png
Few more details:
the projects were SP2010 projects and I successfully converted these to SP2013 some time ago.
using Visual Studio Premium 2013, Update 3, running as an administrator.
tried removing the feature and re-adding it; did not help.
tried running VS in safe mode, resetting the user settings via the command line devenv; did not help.
tried closing the designer, VS, rebooting; did not help.
i am able to add/remove items to the package/feature in other projects so I suspect it not to be a VS2013 bug
I just had the same Issue when adding items to feature or including features in package. I solved it by updating Visual Studio 2013 Developer Tools.
After updating to: Microsoft Office Developer Tools for Visual Studio 2013 - August 2015 update

set property 'system.windows.resourcedictionary.deferrablecontent' threw an exception

I'm running Visual Studio 2012, when I add a new File/Reference to a project the message box appears showing the error message
set property 'system.windows.resourcedictionary.deferrablecontent' threw an exception
I read an MSDN article suggesting to run the command devenv /resetuserdata on visual studio command prompt to resolve this problem, tried it but didn't work for me. In fact the command prompt shows the Unknown Error message.
Some addins cause this issue for me so have had to workaround it whenever it occurs:
In Vis studio -
Tools > Options > Environment > Add-in Security, uncheck 'Allow Add-in components to load', OK
Restart vis studio
The error shouldn't occur anymore, so go back to
Tools > Options > Environment > Add-in Security and re-check Allow Add-in components to load, OK
To be specific, I get this error when trying to add files to projects and manage Nuget Packages.
Update
I now make a point of opening
'Tools > Nuget package manager > Manage nuget packages for solution'
whenever I open up a new instance of Vis studio, before loading a solution, just to make sure the window loads properly
That way I know I won't get this issue.
In my case it was a style with the same key defined twice in a ResourceDictionary (WPF)
I have Windows azure tools for Microsoft VisulStudio 2013- v2.2 and Windows azure tools for Microsoft lightswitch VisulStudio 2013- v2.2.
I uninstall only Windows azure tools for microsoft lightswitch vs 2013 .
It's working fine...
I fixed it. The resolution was to remove the Windows Azure Tools for Visual Studio 2012 which I was not actually using, and the error went straight away.
In my case it was to first launch Visual Studio in safe mode. You can create a shortcut for visual studio with a target like this:
'"F:\Program Files\Visual Studio\VS2013\Common7\IDE\devenv.exe" -safemode'
Once launched in safe mode, you can remove the problematic extension via the Addin Manager. However, this wont work for some extensions, as the uninstall option might be disabled for certain extensions when running in safe mode, particularly if you have already uninstalled another extension in the same session.
In My case the problem was caused by Paradox Game engine, in which I had uninstalled it via 'Programs and Features' - which in return did not remove the extension which was originally installed via Nuget package. Uninstalling Paradox via "Programs And Features" left the extension itself still registered in Visual Studio, presumably causing a hidden NullReferenceException.
This issue can be caused by any extension that may have an error in it, or by extensions that were not properly uninstalled.
Also, see this article...
The mentioned issue can be resolved by simply restart the Visual Studio. :P
Also seem to be able to get around this by closing the project and vis studio instance, re-opening, then when the start page/open project screen appears selecting Tools > Extensions and Updates..., then pressing Close
Now open the project and the error doesn't get thrown when trying add files or manage nuget packages, weird.
Just annoying you have to remember to open Extensions and Updates each time...
Other wise make sure given Resourcedictionary.xaml path is correct or not
I had to remove Xamarin from Add/Remove Programs in Control panel and restart Visual studio to fix this.
I had this problem with My Devexpress Project in VS 2015
What finally worked for me was.
Close my solution,
Close Visual Studio,
Open Visual Studio,
Create a New dummy project,
Add a form to it,
Close and save the new project,
Reopen original project and all was ok.
for everyone else who are working in silverlight sdk environment with windows phone8 sdk.
The versions of sliverlight which are compatible with visual studio versions -
vs2012- sliverlight sdk 4
vs2013- silverlight sdk 5
I was integrating in vs2013 and as soon as I updated it with silverlight sdk 5, The errors went away.
In my case it was the Line Endings: you can have different formatting and by copy pasting some code one file got a different Line Ending. It was enough to File > Save As and then click the little arrow next to the save button.
Then click on save with encoding and choose the one you are using in all other files.
See Andrew Truckle's answer.
I hope this helps

VS 2010 Properties Page Fail to Show-COM object that has been separated from its underlying RCW cannot be used

I'm using Visual Studio 2010 Ultimate edition, but now it won't show the project properties page. Instead an error message show up saying
An error occurred trying to load the page.
COM object that has been separated from its underlying RCW cannot be used.
This error has plagued me for a long time. I tried almost everything (uninstall/reinstall/repair/uninstall addins, etc) except reinstall
OS.
Help me out. Thx a lot!
Finally I found out what had gone wrong. It's misbehaving addin - TestDriven.NET.
But things could be different for you. But anyway, it's addins.
The process to find this is that you Goto "Tools -> Options" dialog. Goto "Environment -> Add-ins/Macros Security" node. Uncheck "Allow add-in components to load". And then restart VS 2010 to see if the issue goes away. If it does, then it must be an addin in those folders specified. And next step is to enable addins to load, and remove the directories in the list one by one to identity which addin caused the issue. And at last, disable or simply remove/uninstall it.
Restarted VS 2010 SP1 solved my problem!!!
in my case it was the latest update of VSCommands for VS2010...
A complete UnInstall/Re-Install of the VSCommands did the job :)
This also happened to me for some unknown reason and it turned out I had to disable source-control plugin (the default one that had been happily working for a long time):
Tools -> Options -> Source control : set plug-in to "None" and restart VS.
I was facing the same issue in Microsoft Visual Studio Professional 2015 Service pack 1. I found that it was happening due to GhostDoc Community.
I upgraded GhostDoc Community 4.9.x to 5.1.x and issue get resolved in Visual Studio 2015 Service pack 1.

Resources