Repository navigation
Description
Issue
Upgrading the sourcelink package from 1.0.0-beta-62925-02 to 1.0.0-beta-63102-01 causes the following compilation error:
C:\Users\michaelw\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta-63102-01\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4062: The "Microsoft.Build.Tasks.Git.LocateRepository" task could not be loaded from the assembly C:\Users\michaelw\.nuget\packages\microsoft.build.tasks.git\1.0.0-beta-63102-01\build\..\tools\netcoreapp2.0\Microsoft.Build.Tasks.Git.dll. Assembly with same name is already loaded Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [D:\github\StarWarsNames\src\StarWars.Names\StarWars.Names.csproj]
Repoducing
- Clone
https://github.com/michael-wolfenden/StarWarsNames - From the root of the repo run
dotnet build .\src\StarWarsNames.sln(should succeed) - Upgrade sourcelink from
1.0.0-beta-62925-02to1.0.0-beta-63102-01 - Run
dotnet build .\src\StarWarsNames.sln(should fail with the message above)
Environment
> dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.1.300
Commit: adab45bf0c
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.300\
Host (useful for support):
Version: 2.1.0
Commit: caa7b7e2ba
.NET Core SDKs installed:
1.0.0 [C:\Program Files\dotnet\sdk]
1.0.3 [C:\Program Files\dotnet\sdk]
1.0.4 [C:\Program Files\dotnet\sdk]
1.1.0 [C:\Program Files\dotnet\sdk]
2.0.0 [C:\Program Files\dotnet\sdk]
2.0.2 [C:\Program Files\dotnet\sdk]
2.0.3 [C:\Program Files\dotnet\sdk]
2.1.2 [C:\Program Files\dotnet\sdk]
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.100 [C:\Program Files\dotnet\sdk]
2.1.101 [C:\Program Files\dotnet\sdk]
2.1.102 [C:\Program Files\dotnet\sdk]
2.1.103 [C:\Program Files\dotnet\sdk]
2.1.104 [C:\Program Files\dotnet\sdk]
2.1.200 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.300 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Activity
tmat commentedon Jul 17, 2018
Can you try to run
dotnet build-server shutdownin between the step 2 and 3?michael-wolfenden commentedon Jul 17, 2018
Running
dotnet build-server shutdownfixed the issue, but I'm not sure how to proceed.Should I be running that command as part of my build script?
Or is it just implicit knowledge that if you update
sourcelink, you have to run this command as a once off?tmat commentedon Jul 18, 2018
If you upgrade any package that has custom build task it is generally a good idea to restart the build servers.
The problem is that they have the assemblies that implement the tasks loaded from previous builds and without restarting them the new assemblies collide, unless the assemblies change their version.
We don't change assembly versions of pre-release builds.