Javascriptservices: Build trouble with VS2017RC 15.0.0-RC.3+26127.0 / MSB4018 error

Created on 28 Jan 2017  路  5Comments  路  Source: aspnet/JavaScriptServices

Getting my ReactReduxSPA template based application (or the initial template) to build under the new VS2017RC release just took me hours (MSB4018 error, System.IO.FileNotFoundException: System.IO.FileSystem). Can build and debug it now (in Visual Studio not Chrome) though Webpack isn't working - so no hot updates.
Should have waited but was hoping for some improvements debugging TypeScript code ...

For details please see https://developercommunity.visualstudio.com/content/problem/15227/error-msb4018-when-building-reactreduxspa-filenotf.html

PS: Actually I'm getting hot updates now ... just can't open Chrome dev tools without terminating the session.

Most helpful comment

Thanks for reporting this. I was able to repro the issue with VS 2017 build 26127. Fortunately the problem goes away when we update to a newer (dotnet preview4 style) .csproj format. This is implemented in e7785df, so see that commit for an example of how you can change your .csproj files in existing projects.

This update will be published in generator-aspnetcore-spa version 0.8.0 shortly.

All 5 comments

I am getting the same error code MSB4018. The strange thing in my case is that I initially ran the aspnetcore-spa generator and was able to build successfully and run use both dotnetrun and visual studio to run the project. Only after I ran the project with Visual Studio the first time was I unable to build again. However, I can still execute "dotnet run" in the command prompt to make the project run.

Severity Code Description Project File Line Suppression State
Error MSB4018 The "ResolvePackageDependencies" 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 Microsoft.NET.Build.Tasks.LockFileCache.LoadLockFile(String path)
at Microsoft.NET.Build.Tasks.LockFileCache.GetLockFile(String path)
at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.get_LockFile()
at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.ReadProjectFileDependencies()
at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()

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].
ReactTest C:\Users\name.nuget\packages\microsoft.net.sdk1.0.0-alpha-20161104-2\build\Microsoft.PackageDependencyResolution.targets 138

Same here

Thanks for reporting this. I was able to repro the issue with VS 2017 build 26127. Fortunately the problem goes away when we update to a newer (dotnet preview4 style) .csproj format. This is implemented in e7785df, so see that commit for an example of how you can change your .csproj files in existing projects.

This update will be published in generator-aspnetcore-spa version 0.8.0 shortly.

https://github.com/aspnet/JavaScriptServices/commit/e7785dff01c19ed6bfdbef3981229dc664b5b265 makes the .csproj incompatible with Visual Studio 2015 Update 3:

error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element.

@robert-claypool The .csproj projects generated by these templates have never been compatible with VS2015, as far as I know, because they require the .NET Core 1.0 tooling, which is only supported standalone (e.g., command line) and in VS2017.

This repo dropped VS2015 support when it removed the project.json-based project option.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sampath-Lokuge picture Sampath-Lokuge  路  4Comments

tmedanovic picture tmedanovic  路  4Comments

docrinehart picture docrinehart  路  4Comments

LovedByTheLord picture LovedByTheLord  路  3Comments

asadsahi picture asadsahi  路  3Comments