dotnet / TorchSharp

A .NET library that provides access to the library that powers PyTorch.
MIT License
1.37k stars 177 forks source link

Builds fail after package validation PR merged #1342

Closed NiklasGustafsson closed 3 months ago

NiklasGustafsson commented 3 months ago

See: https://dev.azure.com/dotnet/TorchSharp/_build/results?buildId=107275&view=logs&j=cb6831a2-077a-5241-4d26-4af1cda3b8c6&t=daeac993-d4bc-5949-e393-2d192db402d8

ericstj commented 3 months ago

Seems like the build is restoring the previous version of the package to

Installed TorchAudio 0.102.6 from https://api.nuget.org/v3/index.json to C:\Users\VssAdministrator\.nuget\packages\torchaudio\0.102.6

But then passing in a different path when validating the package:

 Package 'D:\a\1\s\pkg\TorchAudio\torchaudio\0.102.6\torchaudio.0.102.6.nupkg' not found. Please provide a valid package path. [D:\a\1\s\pkg\TorchAudio\TorchAudio.nupkgproj::TargetFramework=netstandard2.0]
ericstj commented 3 months ago

I suspect the problem here is that the property the SDK uses to construct the path to the baseline package, NuGetPackageRoot is not set. https://github.com/dotnet/sdk/blob/70248bd6a95c9a0c8fdb3bbcad5fede004cdf0b1/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.ValidatePackage.targets#L29

That's causing it to look in the project directory.