在Visual Studio中打开Unity着色器文件时出错

时间:2018-09-30 02:22:04

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

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

enter image description here

在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]. 

1 个答案:

答案 0 :(得分:1)

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

enter image description here