我的Visual Studio 2017,ASP.NET Core,MVC Web項目我只是添加了Microsoft.TypeScript.MSBuild NuGet包v2。 3.1,同時將我的ASP.NET Core程序集從1.0。*更新到1.1.1。現在,突然間,當我建立我的項目,我得到下面的異常:「CheckFileSystemCaseSensitive」任務意外失敗,無法加載文件或程序集'System.IO.FileSystem
上異常消息Severity Code Description Project File Line Suppression State
Error MSB4018 The "CheckFileSystemCaseSensitive" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at TypeScript.Tasks.CheckFileSystemCaseSensitive.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
雙擊需要一個在文件Microsoft.TypeScript.targets這些行:
<Target Name="CheckFileSystemCaseSensitive">
<CheckFileSystemCaseSensitive
MSBuildThisFileFullPath="$(MSBuildThisFileFullPath)" >
<Output TaskParameter="IsFileSystemCaseSensitive" PropertyName="IsFileSystemCaseSensitive" />
</CheckFileSystemCaseSensitive>
</Target>
地方說「MSBuildThisFileFullPath未定義」。
我試過添加引用NETStandard.Library
,建議在這裏:https://github.com/dotnet/corefx/issues/16206,但這並沒有什麼區別。
診斷MSBuild的輸出是這樣的:
1>Target "CheckFileSystemCaseSensitive" in file "C:\Users\dkent\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets":
1> Using "CheckFileSystemCaseSensitive" task from assembly "C:\Users\dkent\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\TypeScript.Tasks.dll".
1> Task "CheckFileSystemCaseSensitive"
1> Task Parameter:MSBuildThisFileFullPath=C:\Users\dkent\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets
1> [...]\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets(172,5): error MSB4018: The "CheckFileSystemCaseSensitive" task failed unexpectedly.
1> [...]\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets(172,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
1> [...]\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets(172,5): error MSB4018: File name: 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
1> [...]\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets(172,5): error MSB4018: at TypeScript.Tasks.CheckFileSystemCaseSensitive.Execute()
1> [...]\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets(172,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1> [...]\.nuget\packages\microsoft.typescript.msbuild\2.3.1\tools\netstandard1.3\Microsoft.TypeScript.targets(172,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1> Done executing task "CheckFileSystemCaseSensitive" -- FAILED.
感謝您的任何建議。
我注意到,對於它的價值,這System.IO.FileSystem'的'最新版本是4.3.0,而不是4.0.1.0。 –
MSBuild分發自己的門面程序集副本,允許運行鍼對netstandard構建的任務。我建議在https://github.com/Microsoft/msbuild/issues –
完成https://github.com/Microsoft/msbuild/issues/2061 –