我从 Win7+VS2012 升级(全新安装)到 Win8+VS2012。
在那之后我遇到了一个问题:当我尝试使用处理器目标AnyCPU或x86运行任何项目时,vshost.exe 在构建并启动带有Access Violation的项目后立即崩溃。此行为不受更改项目类型(控制台、winforms、wpf)的影响。
但是,当我将架构更改为x64时,调试工作得很好。
如果我启动一个新创建的控制台应用程序,这是我在调试输出窗口中得到的输出:
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Symbols loaded.
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Symbols loaded.
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Symbols loaded.
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Symbols loaded.
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll', Symbols loaded.
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll', Symbols loaded.
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'e:\Users\SeriTools\Documents\Visual Studio 2012\Projects\ConsoleApplication2\ConsoleApplication2\bin\Debug\ConsoleApplication2.vshost.exe', Symbols loaded.
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll', Symbols loaded.
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll', Symbols loaded.
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll', Symbols loaded.
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll', Symbols loaded.
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll', Symbols loaded.
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll', Symbols loaded.
The thread 'vshost.NotifyLoad' (0x1068) has exited with code 0 (0x0).
The thread '<No Name>' (0x16c8) has exited with code 0 (0x0).
The thread '<No Name>' (0x1688) has exited with code 0 (0x0).
The thread 'vshost.LoadReference' (0x233c) has exited with code 0 (0x0).
'ConsoleApplication2.vshost.exe' (Managed (v4.0.30319)): Loaded 'e:\users\seritools\documents\visual studio 2012\Projects\ConsoleApplication2\ConsoleApplication2\bin\Debug\ConsoleApplication2.exe', Symbols loaded.
The program '[5088] ConsoleApplication2.vshost.exe: Program Trace' has exited with code 0 (0x0).
The program '[5088] ConsoleApplication2.vshost.exe: Managed (v4.0.30319)' has exited with code -1073741819 (0xc0000005) 'Access violation'.
我试图解决的问题:
- 完全删除并重新安装 VS,检查是否不应用更新 1 更改任何内容
devenv.exe /ResetSettings
并卸载所有插件/加载项- 以管理员身份运行 VS
有人可以帮我解决这个问题吗?