With the latest update of the Windows Runner Image
Image: windows-2019
Version: 20241125.1.0
a previously running pipeline now fails with the following error for all projects creating an executable (here WinExe net473, x64)
[error]C:\Program Files\dotnet\sdk\6.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5): Error NETSDK1047: Assets file 'D:\a\1\s\WpfApp\obj\project.assets.json' doesn't have a target for 'net461/win7-x64'. Ensure that restore has run and that you have included 'net461' in the TargetFrameworks for your project. You may also need to include 'win7-x64' in your project's RuntimeIdentifiers.
the same worked fine with
Image: windows-2019
Version: 20241021.1.0
the only workaround seams to be to specify win7-x64 within the project. This was not necessary before.
Projects with an output type of WinExe should build successfully.
Actual behavior
Projects with an output type of WinExe fail to build with:
Files\dotnet\sdk\6.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5): Error NETSDK1047: Assets file 'D:\a\1\s\WpfApp\obj\project.assets.json' doesn't have a target for 'net461/win7-x64'. Ensure that restore has run and that you have included 'net461' in the TargetFrameworks for your project. You may also need to include 'win7-x64' in your project's RuntimeIdentifiers.
Hi @deonberlin Thank you for bringing this issue to our attention. We are looking into this issue and will update you on this issue after investigating
Description
With the latest update of the Windows Runner Image Image: windows-2019 Version: 20241125.1.0
a previously running pipeline now fails with the following error for all projects creating an executable (here WinExe net473, x64)
[error]C:\Program Files\dotnet\sdk\6.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5): Error NETSDK1047: Assets file 'D:\a\1\s\WpfApp\obj\project.assets.json' doesn't have a target for 'net461/win7-x64'. Ensure that restore has run and that you have included 'net461' in the TargetFrameworks for your project. You may also need to include 'win7-x64' in your project's RuntimeIdentifiers.
the same worked fine with Image: windows-2019 Version: 20241021.1.0
the only workaround seams to be to specifywin7-x64 within the project. This was not necessary before.
See also: https://developercommunity.visualstudio.com/t/Build-failes-with-missing-RuntimeIdentif/10801032?viewtype=all
Platforms affected
Runner images affected
Image version and build link
Image: windows-2019 Version: 20241125.1.0
Is it regression?
Yes, working with 20241021.1.0
Expected behavior
Projects with an output type of WinExe should build successfully.
Actual behavior
Projects with an output type of WinExe fail to build with:
Files\dotnet\sdk\6.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5): Error NETSDK1047: Assets file 'D:\a\1\s\WpfApp\obj\project.assets.json' doesn't have a target for 'net461/win7-x64'. Ensure that restore has run and that you have included 'net461' in the TargetFrameworks for your project. You may also need to include 'win7-x64' in your project's RuntimeIdentifiers.
Repro steps
Run the attached yaml pipeline for the project. AzurePipelineIssue.zip