microsoft / MSBuildSdks

MSBuild project SDKs
MIT License
459 stars 81 forks source link

Microsoft.Build.Artifacts 5.0.0 broken on Linux #463

Closed timmydo closed 1 year ago

timmydo commented 1 year ago

Error changing from 4.2.0 to 5.0.0:

/home/timmy/.nuget/packages/microsoft.build.artifacts/5.0.0/build/Microsoft.Build.Artifacts.Common.targets(51,5): error MSB4061: The "Robocopy" task could not be instantiated from "/home/timmy/.nuget/packages/microsoft.build.artifacts/5.0.0/build/netstandard2.0/Microsoft.Build.Artifacts.dll".  [blah.csproj]
/home/timmy/.nuget/packages/microsoft.build.artifacts/5.0.0/build/Microsoft.Build.Artifacts.Common.targets(51,5): error MSB4061: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Artifacts.FileSystem' threw an exception. [blah.csproj]
/home/timmy/.nuget/packages/microsoft.build.artifacts/5.0.0/build/Microsoft.Build.Artifacts.Common.targets(51,5): error MSB4061:  ---> System.IO.FileNotFoundException: Could not load file or assembly 'CopyOnWrite, Version=0.9.9999.0, Culture=neutral, PublicKeyToken=49642b47d27a30e9'. The system cannot find the file specified. [blah.csproj]
/home/timmy/.nuget/packages/microsoft.build.artifacts/5.0.0/build/Microsoft.Build.Artifacts.Common.targets(51,5): error MSB4061:  [blah.csproj]
/home/timmy/.nuget/packages/microsoft.build.artifacts/5.0.0/build/Microsoft.Build.Artifacts.Common.targets(51,5): error MSB4061: File name: 'CopyOnWrite, Version=0.9.9999.0, Culture=neutral, PublicKeyToken=49642b47d27a30e9' [blah.csproj]
/home/timmy/.nuget/packages/microsoft.build.artifacts/5.0.0/build/Microsoft.Build.Artifacts.Common.targets(51,5): error MSB4061:    --- End of inner exception stack trace --- [blah.csproj]
/home/timmy/.nuget/packages/microsoft.build.artifacts/5.0.0/build/Microsoft.Build.Artifacts.Common.targets(51,5): error MSB4061:    at Microsoft.Build.Artifacts.FileSystem.get_PathComparer() [blah.csproj]
/home/timmy/.nuget/packages/microsoft.build.artifacts/5.0.0/build/Microsoft.Build.Artifacts.Common.targets(51,5): error MSB4061:    at Microsoft.Build.Artifacts.Tasks.Robocopy..ctor() [blah.csproj]
/home/timmy/.nuget/packages/microsoft.build.artifacts/5.0.0/build/Microsoft.Build.Artifacts.Common.targets(51,5): error MSB4061:    at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions) [blah.csproj]
/home/timmy/.nuget/packages/microsoft.build.artifacts/5.0.0/build/Microsoft.Build.Artifacts.Common.targets(51,5): error MSB4060: The "Robocopy" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name. [blah.csproj]

@erikmav

erikmav commented 1 year ago

Have a repro, working on fix.

jeffkl commented 1 year ago

Fixed by https://github.com/microsoft/MSBuildSdks/pull/468 and available in version 5.0.1