Odd error when building a .net core project with Visual Studio Code. This built a few weeks ago – went back it it and I’m getting this
C:\Program Files\dotnet\sdk\2.0.0\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(165,5): error : Assets file ‘myproject\obj\project.assets.json’ doesn’t have a target for ‘.NETStandard,Version=v2.0’. Ensure that restore has run and that you have included ‘netstandard2.0’ in the TargetFrameworks for your project. [myproject\MyProject.csproj]
.Net Core has been installed, it used to work and there is not much on the Internet. Bafflement.
Turns out the bin and obj folders for each of the project need to be manually deleted. Once done then the command
gave me the green light and normal service has been resumed. No idea what it going on but sorted now – so I thought I would take a minute and post the solution to my small corner of the Internet. Cheers.