【问题标题】:Error when opening Unity shader file in Visual Studio在 Visual Studio 中打开 Unity 着色器文件时出错
【发布时间】:2018-09-30 02:22:04
【问题描述】:

每当我在 Visual Studio 中打开 Unity 着色器文件时,都会收到以下错误消息

在 ActivityLog.xml 中,错误提示

LegacySitePackage failed for package [Visual C++ Package]Source: 
'Microsoft.VisualStudio.VC' 
Description: Could not load file or assembly 'Microsoft.VisualStudio.VisualC.Utilities, 
Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one 
of its dependencies. The system cannot find the file 
specified.System.IO.FileNotFoundException: Could not load file or assembly 
'Microsoft.VisualStudio.VisualC.Utilities, Version=15.0.0.0, 
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its 
dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.VisualC.Utilities, Version=15.0.0.0, 
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at 
Microsoft.VisualStudio.VC.ManagedInterop.Initialize(IServiceProvider 
serviceProvider) 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]. 

【问题讨论】:

  • 您是否尝试过启用程序集绑定失败日志记录?有一个来自微软的tool 使它更容易。查看报告的内容并使用结果更新问题。
  • 还有一个类似的问题here。看看其中一种解决方案是否有帮助。
  • 我尝试了您建议的 fuslogvw 程序,但它没有显示任何内容。您发布的第二个链接中的答案之一建议安装“使用 C++ 进行桌面开发”。我这样做了,它解决了这个问题。感谢您的回答。

标签: visual-studio unity3d visual-studio-2017


【解决方案1】:

我通过转到Tools -> Get Tools and Features 并安装“使用 C++ 进行桌面开发”解决了这个问题

【讨论】:

  • 这对我也有用。不过,我必须在安装组件后重新启动 Windows。
猜你喜欢
  • 2022-07-26
  • 2023-04-03
  • 1970-01-01
  • 2013-10-29
  • 2011-10-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-09-14
相关资源
最近更新 更多