Visual Studio 2012 disassembly error dialog - visual-studio-2012

This is a general error with Visual Studio 2012 that has come up recently. While debugging any C++ application and after hitting a break-point, clicking "Go To Disassembly" will produce the following error dialog:
Disassembly cannot be displayed for the source location. Uncaught
exception thrown by method called through Reflection.
I've tried reinstalling and repairing VS2012 with no effect. Even the simplest console application will show the same error, so it's not specific to a project and has to be a problem with the system configuration. At this point I'm just clueless what module Visual Studio is failing to load - google hasn't provided any solutions either.
The only possible link could be my recent removal of older .NET Framework redistributable packages (since I've got .NET 4.5 SDK and multi-target pack, I figured the older ones weren't necessary).
I really need the disassembly view working (it worked quite well before) and I was hoping someone has come across this problem.

Solved: After downloading Visual Studio 2012 Update 2, the problem solved itself. I guess it was a bug with the vanilla release.

Related

Xamarin.ios designer System.AggregateException: One or more errors occurred

I am trying to open my Main.Storyboard in visual studio for mac, and i am getting 'System.AggregateException: One or more errors occurred'. Note that i happened after upgrading Visual Studio to 7.3, the latest up to now and X Code to 9.2, also the latest available to now.
I am getting the following error screen
As I commented above, I have been having exactly the same problem for a week or two.
Originally, Visual Studio was installed under a non-admin user account (using an administrator password where prompted).
I eventually did a complete uninstall using the script mentioned here, and then reinstalled from scratch using an administrator account. This seems to have fixed the problem.
It seems that something failed silently during the earlier installation. I was a bit suspicious because the Visual Studio app didn't have its own icon - it was using the standard MacOSX document icon. Having reinstalled, it has the correct purple icon.

Visual Studio 2015 can't start IIS Express

When I am trying to run an ASP.Net Core project in Visual Studio 2015, a Microsoft Visual Studio dialog appears "The project doesn't know how to run the profile IIS Express".
Does anyone know anything about this message, or how to fix it? I've searched Google and the MSDN. There's nothing in the build logs, or the Windows event log.
This dialog showed up for me when I had migrated a project from dotnet RC1 to RC2.
Before the fix I could still run it using dotnet run and from Visual Studio choosing the profile other than "IIS Express".
I had misread this guide and forgot the .Web
\DNX\Microsoft.DNX.targets –> \DotNet.Web\Microsoft.DotNet.Web.targets
After fixing this and restarting Visual Studio(not sure if needed) I could run the project using the IIS Express profile.
Should also be noted that as per the comments, adding .Web in the top level node is required in the xproj. <Project Sdk="Microsoft.NET.Sdk"> should be <Project Sdk="Microsoft.NET.Sdk.Web">.
In my case the issue was solved after added the ASP.NET and web development tool extension to my VS instalation.
To clarify the answer from hultqvist, it is a problem with the xproj. To fix it, edit the xproj directly and change this
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets"
Condition="'$(VSToolsPath)' != ''" />
to this
<Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets"
Condition="'$(VSToolsPath)' != ''" />
That is, insert Web twice.
There is an associated issue in the aspnet tooling repo.
I had the same issue and found a very simple solution for Visual Studio 2017. In Visual Studio 2017 go to Solution Explorer then right click on your project file. In the menu you will see "Set as StartUp Project". If you can select it then select it. Now run your project again.
I had a similar issue but with "MyProjectName" instead of IIS Express.
In my case, I was trying to start as a standalone application, so I cleaned the launchSettings.json
I inadvertently changed the "commandName" parameter from "Project" to "MyProjectName" and that caused the popup to show up.
Resetting it back to "Project" solved my issue, silly me 😁
I had a similar issue, In my case ASP.NET and web development is enabled but Development time IIS support is not checked in the optional sections.
Once I enable the Development time IIS support solved my issue.
You can get this error with RTM if <BaseIntermediateOutputPath gets corrupted or is incorrect in your .xproj file.
I had this same issue and after digging around for a while I discovered that I had dotnet preview v1.0.0-preview2 installed under Programs Files (x86) and a non-preview version in x64. I think VS is launching the x86 (preview) version but expecting to see the full version. To fix this, I did the following.
from programs and feature uninstall every visible dotnet core. (note: this did not remove the x86 preview)
go to https://www.microsoft.com/net/download/core#/sdk and install BOTH x86 and x64 SDK packages
open command line and from the root directory check run: dotnet --version (at the time of writting it was 1.0.4
fire up .net core project in VS 2017 and run.
When I did all of the above, I was able to start up the site in IIS Express from VS.
This happened to me after a failed update of visual studio 2017 15.9.4
Setup completed with warnings and when I checked the problems saw that .NET core SDK 2.1 installation is failed.
I will try to install it manually.
Otherwise currently the only solution I found is to uninstall visual studio and re-install it.
In visual Studio 2017, i fixed this error by doing the following two steps.
I went to add or remove a program in windows, and deleted everything ending with ".net". I then reinstalled them in the visual studio installer. Then loading the project again produced a new error, which condiosluzverde provided the solution to here:
How Can I Fix the Microsoft Visual Studio Error: "Package Did Not Load Correctly"?
Same thing happened to me, my project was working fine. I didn't do any RC1 to RC2 update & this popup appeared from nowhere.
I fixed the problem by updating visual studio. You can also consider repairing VS.

Visual Studio 2012 Express is suddenly "incompatible with this version of Windows"?

I'm running Visual Studio Express 2012 on Windows 7. I've been running it with no problems for several months now.
Last Friday, when I shut down my PC, a lot of Windows updates were installed. This morning, when I started up and opened a VS2012 solution, I got this error message:
This program has known compatibility issues
...
Visual Studio 2012 Express for Windows Desktop is incompatible with this version of Windows.
There's a button for Run Program, and when I click it, the solution opens normally. I haven't changed anything about my Windows configuration. This happens every time I open a solution. Did MS release a flawed patch in the batch of updates that got applied last Friday?
EDIT: I'm not sure why people are voting to close this question. The answer that's been linked to isn't related to my issue; that answer seems to pertain to trying to open a VS2012 project in VS2010. I'm trying to open a VS2012 project in VS2012. If you really think that the question needs to be closed, please let me know why in the comments, so that I can change it appropriately.
The .NET updates installed on Friday were:
KB2805226
KB2805221
KB2804582
UPDATE: I gave up, more or less, and clicked the "Don't show this window again" checkbox on the error window. Visual Studio seems to be running ok.
I received the same message on Visual Studio 2012 Premium (on PC where Windows 7 re-installed in last month) - the suggested fix was "Update for Microsoft Visual Studio 2012 (KB2781514)" which seems to have fixed it
www.microsoft.com/en-us/download/details.aspx?id=36020
Install Visual Studio 2012 Update 2 solved my problem. No previous update needed for this one. Here's the descriptions of the update.
(I'm using Windows 8, installed all important updates for Windows, then tried repair Visual Studio in Programs and Features, problem still here until installed Update 2.)
I've been running VS2012 for about 2 weeks now since I clicked the "Don't show this window again" button. I haven't encountered any problems. For now I'm going to consider this an adequate solution.
I've just installed VS2012 at home and came across the same problem. The 1st solution I found is that webdeploy doesn't work after Oct 2013 and I should install Web deploy V3.0.
Done that, no joy. I let Win7 search for compatibility solution on-line and it found an update patch (KB2781514) which did work.
This is the same solution as mentioned before by #John M.
Should've looked here first, just posting this again if someone comes across this again these days..
Thanks to all other users who helped with this thread.
I had a similar problem with VS2012 awhile ago it was along the lines of:
"this solution has no errors and could potentially be damaged"
*yet still opened fine.
as far as fixing it went I performed a clean install of VS2012 and the error has not bugged me since in saying that I am probably out of date at this time and may find if I updated I would have the same issue.
Food for thought.
Even i had the same problem on Windows 7 with Visual studio 2012.
Installed Update for Microsoft Visual Studio 2012 -KB2781514 and it fixed the issue.
Note: "Just clicking on Run program was also opening up the solution file without any issues in my case."

Cannot open xaml pages in Blend after installing Visual Studio 2012 Update 2 (CTP)

I am experiencing something weird at the moment. After I installed Visual Studio 2012 Update 2 (CTP), I can no longer open xaml pages properly in Blend designer view.
Looks like everything from other namespaces just cannot be found (see screenshot below)...
Please also note that the whole solution compiles ok if I close up all the xaml pages, and runs well too. But as soon as I open any of the xaml pages, it will throw me those errors...
UPDATE 13 MAY 2013
Just an update, a couple of days ago (after I installed the VS Update 2) the same error came back again. What I did to fix this was I had to change my build name from something else to 'Release' (or 'Debug') and did a 'Clean' and 'Build'.
Edited answer:
Updating to Visual Studio 2012 Update 2 should fix the issue: http://microsoft.com/en-au/download/details.aspx?id=38188
Check that the platform configurations for all projects linked together in the solution match ("Any CPU" or "x86"). For more info, see:
http://blogs.interknowlogy.com/2013/04/05/blend-for-visual-studio-2012-platform-errors/
This also seems to be a problem with the RTW version of VS2012 Update 2. I experienced this with a solution containing WP8 and Win8 Metro projects.

Visual Studio 2012 doesn't convert vs2010 solution?

I opened my vs2010 solution with vs2012 but it didn't make any conversion as from 2008 to 2010 was happening. So my solution still remains the same as 10 label on it. when I make a new solution of course it has 11 label on it. I haven't got any problem running like that but I am curious. Is there any difference? if yes, how to convert into vs2012 solution?
I managed to 'convert' the solution file to change the line containing '# Visual Studio 2010' to '# Visual Studio 2012' in the .SLN file.
Manual editing of the solution file is not necessary, or recommended. Simply open the VS2010 solution in VS2012, left-click the solution (at the very top of the Solution Explorer), then use File | Save As to overwrite the original file. This will effectively convert the VS2010 solution file to a VS2012 solution file.
There are some exceptions, but mostly you'll be able to open the same project and solution files files in both VS2012 and VS2010 SP1.
VS2012 may convert projects when you first open them, but the changes are (except noted in the document linked) backward compatible with VS2010 (ie using conditionals where needed to only apply to either version when loaded) Most project types will be left entirely untouched though.
It is about Visual Studio 2012 Compatibility
If you created your assets in Visual Studio 2010 with Service Pack 1 (SP1), many of them will load and run in Visual Studio 2012 without any further action on your part.
Many assets will also open again in Visual Studio 2010 with SP1 without any issues, even after you open those assets in Visual Studio 2012
For C++ projects it makes a difference, as the 2012 compiler (VC11) will only be used on projects that are explicitly 2012, not on 2010 projects opened in VS 2012. Some C++11 improvements are available with the VC11 compiler but not with VC10 (see this SO Answer for a summary), including:
Range based for-loops
New standard library headers (atomic, mutex, thread,...)
Smaller standard library container sizes
(And more to follow when the Nov 2012 CTP is delivered to VS 2012)
In order to convert from VS 2010 project to VS2012 there is no need to manually edit the solution file or 'Save As' over the existing project. Instead:
If you decline the update when first prompted, you can update the project later by opening the Project menu and choosing Update VC++ projects... [at the top of the menu options]
From MSDN's "How to: Upgrade Visual C++ Projects to Visual Studio 2012"
(This page was linked from #Joachim's MSDN link, but I wanted to have the answer here on SO since a number of other answers suggested manual workarounds instead of this VS 2012 feature)
In my case, I had some Visual Source Safe stuff (my project was created with Visual Studio 2003/2005, yes, very old!)
Once I manually removed the VSS stuff, the conversion succeeded.
PS: I know it's about VS2010, but maybe this helps others.
You can convert a project from VS2010 to VS2012 by doing the following:
Add the 2010 project to your VS2012 solution by right-click on your solution in the Solution Explorer and Select Add --> Existing Project...
The project will appear in the solution and will have (Visual Studio 2010) appended to its name.
Right-click on the added project and select Properties.
In the Configuration Properties --> General pane, change the setting in Platform Toolset field to Visual Studio 2012 (v110)
Repeat for each configuration type, e.g. Release and Debug.
I came across this question while googling for a solution to a specific problem: MSBuild was failing to execute the Publish target against a VS2012 solution that had started life in VS2010 when called from the command line (specifically through TeamCity):
error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure Tools\2.3\Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
MSBuild was looking for the Azure SDK 2.3 targets in the VS10 location (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure Tools\2.3\Microsoft.WindowsAzure.targets). The cause is explained by Sayed Ibrahim Hashimi in a blog post and, as I understood it, boils down to some decisions they made while enabling cross-version compatibility for solution files. The solution was simple: add the VisualStudioVersion property to the MSBuild invocation, something like this:
msbuild.exe MyAwesomeWeb.sln /p:VisualStudioVersion=11.0
Practically speaking, this overrides the following in each csproj file:
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
Presumably you could get the same result by editing all of these by hand to replace 10.0 with 11.0 but that might break backwards-compatibility -- I haven't tried it. I also haven't tried an update to VS2013 to see if the problem persists.
So to wrap this up by answering the question: yes, there are some differences before you "convert" (using any of the methods offered by other answerers) and some differences remain afterwards.
This is slightly different, but along the same lines so in case it helps anyone:
I was loading a project where it looked like it was loading and then kept showing all projects as unavailable. No errors were on the migration report. I tried reloading the solution and projects many times, using various methods including suggestions here.
Finally I found a "Resolve Errors" option when right clicking on the solution in the Solution Explorer. VS went through a load process again and it worked; no problems.
I don't know what it did differently that time, but apparently it made a difference.
it's to simple just edit the .sol file
change the version to 11
like this
Microsoft Visual Studio Solution File, Format Version 12.00
Visual Studio 2012

Resources