我嘗試建立與MSBuild的命令行的解決方案(清潔機器)時僅生成工具2015年,.NET開發包和.NET SDK安裝我得到以下錯誤:的MSBuild錯誤MSB4018:在「GenerateResource」任務意外失敗
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: The "GenerateResource" task failed unexpectedly.
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.Tasks.ResGenDependencies.GetResXFileInfo(String resxFile)
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.ShouldRebuildResgenOutputFile(String sourceFilePath, String outputFilePath)
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.GetResourcesToProcess(List`1& inputsToProcess, List`1& outputsToProcess, List`1& cachedOutputFiles)
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.Execute()
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
怎麼了?
MSBuild現在是GitHub上的開源代碼,因此您可以檢查函數以查看可能引發異常的位置。這應該引導您找到解決方案。 –
的可能的複製[Visual Studio的錯誤:「GenerateResource」任務意外失敗...該文件存在(http://stackoverflow.com/questions/7795926/visual-studio-error-the-generateresource-task-failed-意外的是,這個fil) –