You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgrade from 1.0.0-beta-62925-02 to 1.0.0-beta-63102-01 is causing error MSB4062: The "Microsoft.Build.Tasks.Git.LocateRepository" task could not be loaded from the assembly
#123
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]
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.
Issue
Upgrading the sourcelink package from
1.0.0-beta-62925-02
to1.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
https://github.com/michael-wolfenden/StarWarsNames
dotnet build .\src\StarWarsNames.sln
(should succeed)1.0.0-beta-62925-02
to1.0.0-beta-63102-01
dotnet build .\src\StarWarsNames.sln
(should fail with the message above)Environment
The text was updated successfully, but these errors were encountered: