【发布时间】:2017-04-18 15:31:11
【问题描述】:
我不确定我做了什么,但是 VS 2015 Update 3 曾经在 18 秒内完全重建 13 个 C# 项目,而现在大约需要 143 秒。除此之外,VS 性能没有变化。重新启动,没有变化。
我注意到的一件事是我以前在任务管理器中看到VBCSCompiler.exe,但现在我只看到csc.exe。然后我运行 msbuild.exe Project.sln /t:Clean,Build,它的构建速度与 Visual Studio 过去一样快 - 即使在构建完成后,任务管理器中也会显示 VBCSCompiler.exe。
这是怎么回事?
编辑:大约在这发生的时候,我还安装了 Visual Studio“15”预览版 4(我没有注意这些事件的时间,因为我假设 VS 安装是相互隔离的) -但是 VS 15 在我安装它的第二天就完全崩溃了,现在在启动时崩溃了。我还注意到,当我重新启动 VS 2015 时,它显示“'CSharpVsInteractiveWindowPackage' 包没有正确加载”。 ActivityLog.xml 包含以下错误:
CreateInstance failed for package [CSharpVsInteractiveWindowPackage]Source: 'mscorlib' Description: Could not load file or assembly 'Microsoft.VisualStudio.InteractiveWindow, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.InteractiveWindow, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

File name: 'Microsoft.VisualStudio.InteractiveWindow, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)

at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)

at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)

at System.Activator.CreateInstance(String assemblyName, String typeName)

at System.AppDomain.CreateInstance(String assemblyName, String typeName)



WRN: Assembly binding logging is turned OFF.

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

【问题讨论】:
-
请对比不同构建时间的构建日志,看看哪些步骤浪费了时间。
-
还有 4 天前的快速构建日志吗?那会在哪里?
-
现在可以正常工作了吗?你现在能重现这个问题吗?
-
请提供一个可以通过 OneDrive 重现问题的简单演示。
-
好的。另外,请参见上面的编辑。抱歉,我没有另一台机器可以测试。
标签: .net visual-studio-2015 build msbuild