Reputation: 195
We have been building our portal website (solely asp.net framework 4.8.1) on our team foundation on prem. Recently I have decided to remove our membership from this website and replace it with Identity.
To facilitate this I added a .net standard 2.0 (the first non framework project) project to the solution. It builds perfectly locally, but the build on our on prem tf server is giving errors.
Everytime it gives the following error now:
C:\Program Files\dotnet\sdk\2.2.110\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(208,5): Error NETSDK1004: Assets file 'c:\TF-Agents\Agent2017-002\_work\1\s\System\Web.Core\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
This error is on the build step, it successfully completes the nuget restore step
The nuget restore step looks like this:
And the build step looks like this:
Any pointers on what i can try? I already tried including that json file in my solution but that does not change the error
Upvotes: 2
Views: 54
Reputation: 195
I inserted a dotnet restore step right before the build of the solution. This fixed the error message
Upvotes: 0
Reputation: 16553
The NuGet Installer v0 task is deprecated per MSFT documentation:
This task is deprecated. Builds that use it will break on 11-27-2023. Please switch to using NuGetCommand@2's restore option as soon as possible. For more information, see Migrate from NuGetInstaller@0 or NuGetRestore@1.
It also looks like you're using the .Net Core v2.2 SDK... My recommendation is to update the SDK to the latest LTS version and migrate the NuGetInstaller@0
task to the NuGetCommand@2
task with inputs command
as restore
and restoreSolution
as <path to .sln>
Upvotes: 0