microsoft / devops-for-windows-apps

Sample Windows app to show devops best practices
MIT License
61 stars 27 forks source link

Microsoft.NET.Sdk\Sdk\Sdk.NuGet.targets is not found #37

Open FixRM opened 3 years ago

FixRM commented 3 years ago

Hello, local bulid is ok, but I can't build project in Azure Pipelines:

Error MSB4019: The imported project "C:\hostedtoolcache\windows\dotnet\sdk\3.0.103\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.NuGet.targets" was not found. Confirm that the expression in the Import declaration "C:\hostedtoolcache\windows\dotnet\sdk\3.0.103\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.NuGet.targets" is correct, and that the file exists on disk.
rido-min commented 3 years ago

/c @clairernovotny

clairernovotny commented 3 years ago

The repo here uses an old SDK and TFM. It's likely that it needs to be updated to target .NET Core 3.1 or .NET 5. The Pipelines install steps reference 3.0.x, which is out of support. Updating this to 5.x should help: https://github.com/microsoft/devops-for-windows-apps/blob/master/azure-pipelines.yml#L61

FixRM commented 3 years ago

I see, thank you. I already tried to update but it doesn't work as well.

p.s. I also changed dotnet version in "install dotnet" task