aspnetcore: Error on Building the Repository
I can’t build the repository. I’m getting this error.
E:\Github\Repos\Kahbazi\AspNetCore.dotnet\sdk\5.0.100-preview.5.20258.4\Sdks\Microsoft.NET.Sdk\targets\Microsoft.Packa geDependencyResolution.targets(234,5): error NETSDK1005: Assets file ‘E:\Github\Repos\Kahbazi\AspNetCore\artifacts\obj
RepoTasks\project.assets.json’ doesn’t have a target for ‘.NETCoreApp,Version=v5.0’. Ensure that restore has run and th at you have included ‘net5.0’ in the TargetFrameworks for your project. [E:\Github\Repos\Kahbazi\AspNetCore\eng\tools\R epoTasks\RepoTasks.csproj]
I checked the artifacts\obj\RepoTasks\project.assets.json and I saw .NETFramework,Version=v5.0 in the targets. Is this correct? Do we have `.NETFramework,Version=v5.0``?
Is there anything I can do to fix the build?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (26 by maintainers)
We saw this error when running our build pipeline on agents with an older version of Visual Studio. The root cause is that version ships with an
msbuildthat does not understand thenet5.0TFM. Visual Studio 2019 16.6 preview 2 or later.I recommend you all upgrade your Visual Studio installations. 16.6 RTM is now available for download: https://visualstudio.microsoft.com/downloads/