ReSharper causing build to fail

Hi guys,

Don't know how many people this is happening to but since the latest update to VS2017 (15.6.3) my solution has been failing builds. This only happens when ReSharper Ultimate is installed. When it isn't builds work every time.

When it is installed weird thing is I can run unit tests from ReSharper and it will build but not through VS test explorer or a normal build. I have deleted ReSharper's cache, removed .suo file for the solution, obj and bin file from all projects in solution to no success.

The error I am getting is:

 

18>C:\Program Files\dotnet\sdk\2.1.102\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file '\obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v2.0'. Ensure that restore has run and that you have included 'netcoreapp2.0' in the TargetFrameworks for your project.

18>Done building project ".csproj" -- FAILED.

 

If I then rebuild again about 7 other projects will fail with this same message.

 

Regards,

 

Henry

0
7 comments
Official comment

Hello Henry, it is a known issue https://youtrack.jetbrains.com/issue/RSRP-468758 due to a bug partially in Visual Studio (https://github.com/dotnet/sdk/issues/2068#issuecomment-374868287), partially in ReSharper. We are going to publish a bugfix update very soon (I hope tomorrow).

Thanks! 

Avatar
Permanently deleted user

Installed VS 2017 15.6.4 today together with R# 2018.1 EAP 3 2018-03-17.

The error is still existing:

C:\Program Files\dotnet\sdk\2.1.200-preview-007474\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(167,5): error : Assets file 'C:\Src\SF-Dev\Fab1\Web1\obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v2.0/win7-x64'. Ensure that restore has run and that you have included 'netcoreapp2.0' in the TargetFrameworks for your project. You may also need to include 'win7-x64' in your project's RuntimeIdentifiers.

This is really frustrating.

0
Avatar
Permanently deleted user

Thank you for fixing this so quickly!

 

Axel you might want to try uninstalling and installing ReSharper again as it works for me now.

0

Axel, Microsoft team fixed the issue in "dotnet sdk 2.1.103" version which is shipped with Visual Studio 15.6.4. But looks like another sdk version is installed on your machine - 2.1.200-preview-007474. According to e.g. a page history here, this version was published Wed, 14 Mar 2018 04:38:31 GMT and it means that it can't contain the fix.

Thanks! 

0

By the way, we've just released ReSharper Ultimate 2017.3.5 with our part of the fix. More technical details why the issue has happened is here https://blog.jetbrains.com/dotnet/2018/03/23/build-failures-visual-studio-15-6-3-resharper-ultimate-2017-3-5-rescue/. Thanks!

0
Avatar
Permanently deleted user

Hi. I didn't realize I had a preview version of Visual Studio 2017 installed in addition to the release branch. I removed the preview versions and installed the newest Visual Studio and ReSharper builds. It works now.

Thanks for your support and the quick fix :-)

0

Please sign in to leave a comment.