RuntimeIdentifier
is not correctly populated when not supplied
#43356
Labels
Area-NetSDK
needs team triage
Requires a full team discussion
untriaged
Request triage from a team member
Something has changed drastically with msbuild.
From #43339 /cc @rainersigwald
Update 3:
Looking further, it seems it is the way that
Microsoft.NETCore.ILAsm
andMicrosoft.NETCore.ILDAsm
is packaged.Closing as I dont think anything not working as expected.
Update 2:
Starting to think something was actually fixed in the latest release and I was basing my assumptions off buggy code. The 'solution' (to my problem) with
UseCurrentRuntimeIdentifier
works correctly under .NET 8 SDK too.My actual issue is that I need ILASM/ILDASM during build time. But the final output is targetted for
anycpu
. The problem is thatPackageReference
assumes runtime target and not build time target.Is there some analoguous
PackageReference
for build time? Like NodeJS devDependencies?Update:
Everything works as previously if you add
-p:RuntimeIdentifier=win-x64
even the .NET 2 issue is not present. So it seems it does not pick this up automatically anymore like it did. Edit: for .NET 2/4 this is incorrectly detected aswin-x86
. For .NET 9, the default is blank.Testing repo: https://github.com/IronScheme/appveyor-test/tree/main
Orignal follows:
Worked yesterday before installing RC1 / updating VS2022 Preview.
Example project
Invoke options:
dotnet build -restore -tl:off -v:m --maxcpucount:1
dotnet msbuild -restore -tl:off -v:m --maxcpucount:1
msbuild -restore -tl:off -v:m --maxcpucount:1
.NET 2 and .NET 4 targets work in all cases.
NET 9.0 fails all cases. Packages (ilasm/ildasm) not present in output dir.
.NET 9.0 works when adding
--ucr
withdotnet build
. Others dont accept this option..NET 2 target copies native framework libs to output dir when using
msbuild
.Also tested with previous .NET Core targets, all fail the same.
I suspect something is fishy with platform and/or PackageReference.
The text was updated successfully, but these errors were encountered: