VS2010 Hosted Debugger Crash
I am fairly new to .NET development and have just installed a clean install of Visual Studio 2010 (no plugins etc.). I also run windows update to ensure it was fully up to date. However, whenever I run a .NET based project (C#, VB, etc.) the debugger crashes before it has even started with this error message:
An unhandled exception of type 'System.AccessViolationException' occurred in Microsoft.VisualStudio.HostingProcess.Utilities.dll
To clarify this is just with the automatically generated blank console app from the wizard, so I have written no additional code to cause this for completeness here is an example C# program:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
}
}
}
Anyway from some heavy googling I managed to find this link, which seemed to suggest disabling the Visual Studio hosting process. This seems to completely fix the problem, although it is slightly annoying having to do this for every new project I create.
So finally, the question is: Is开发者_StackOverflow中文版 this a known problem with the hosting process, am I likely doing anything stupid that is causing this, or is it likely that I need to reinstall the .NET framework/VS2010 to fix the issue?
EDIT: Apologies forgot to mention I am running Windows XP SP3 and am on an account with administrator privileges.
You need to run the application as an Administrator to prevent this issue. If you are having to manually run it as an administrator each time you launch the application, consider following the short tutorial outlined below to change the .exe to run as an Administrator permanently. It might be a quirk on your system even though your user account is in the administrators group.
Run Visual Studio 2010 as Administrator Automatically:
http://www.codeease.com/run-visual-studio-2010-as-administrator-automatically-in-windows-7.html
精彩评论