We need to build a msix package (wapproj) with our DevOps pipeline. We only want to build for platform x64 on windows for the time being. We have a bunch of projects with target framework netstandard2.1 projects and some with net5.0-windows10.0.17763.0.
When building with Visual Studio, we have no problems. But when building with msbuild (locally or on DevOps) we get the following error:
[error]C:\Program Files\dotnet\sdk\6.0.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5): Error NETSDK1047: Assets file 'D:\a\1\s\iv-core\IV.Math\obj\project.assets.json' doesn't have a target for 'netstandard2.1/win-x64'. Ensure that restore has run and that you have included 'netstandard2.1' in the TargetFrameworks for your project. You may also need to include 'win-x64' in your project's RuntimeIdentifiers.
Setting the runtime identifier in the .cproj file of the to all .netstandard projects lets the build pass, but that cannot be the solution since .netstandard dlls should work on all platforms. What are we missing?
Executable project file referenced by the wapproj:
<PackageReference Include="Ninject" Version="3.3.4" />
<ProjectReference Include="..\iv-core\IV.UI.WPF\IV.UI.WPF.csproj" />
<ProjectReference Include="..\iv-core\IV.Update\IV.Update.csproj" />
One of the referenced csproj that throws the error: