Background
I want to migrate my repository form .NET5 to .NET6. As there are many projects, the plan is to do it in multiple steps. So it's an intended intermediate step to have some of the projects targeting .NET5 while some other set to .NET6.
I use a personal NuGet feed and the official nuget.org
is disabled.
As the first step, I updated global.json
{
"sdk": {
"version": "6.0.201",
"rollForward": "disable"
}
}
which previously used to target version 5.0.201
.
I made sure 6.0.201
is installed on my machine by using dotnet --list-sdks
╰─ dotnet --list-sdks
5.0.102 [C:\Program Files\dotnet\sdk]
5.0.201 [C:\Program Files\dotnet\sdk]
6.0.201 [C:\Program Files\dotnet\sdk]
6.0.300 [C:\Program Files\dotnet\sdk]
Then I chose a subset of the projects contained in the repository and changed
<TargetFramework>net5.0-windows</TargetFramework>
to
<TargetFramework>net6.0-windows</TargetFramework>
Everything compiles without a problem. Not even a single warning.
However, Team City machine can't build the repo. I'm getting the following error for all the net5.0
projects (so: the not migrated ones)
NU1101: Unable to find package Microsoft.NETCore.App.Host.win-x64. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, MyLocalNuGetCache
I've searched through my machine, but it doesn't contain the package Microsoft.NETCore.App.Host.win-x64
. Despite this fact everything builds nicely.
Also, running dotnet --list-sdks
on my TC machine proves that 6.0.201
is installed:
╰─ dotnet --list-sdks
5.0.102 [C:\Program Files\dotnet\sdk]
5.0.201 [C:\Program Files\dotnet\sdk]
6.0.201 [C:\Program Files\dotnet\sdk]
Questions
- What is
Microsoft.NETCore.App.Host.win-x64
needed for and how can I find it on my machine? - What's the best starting point for an investigation to see why doesn't my repo build on the TC machine?