Skip to content

Conversation

@Alikhalesi
Copy link

Fix #122524

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 13, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Dec 13, 2025
@@ -22,6 +22,7 @@
<PlatformManifestFileEntry Include="libhostpolicy.so" IsNative="true" />
<PlatformManifestFileEntry Include="libhostpolicy.dylib" IsNative="true" />
<PlatformManifestFileEntry Include="hostfxr.dll" IsNative="true" />
<PlatformManifestFileEntry Include="clrinterpreter.dll" IsNative="true" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interpreter dll isn't ready for shipping yet. This is not the desired fix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe the interpreter will ever be shipped on windows. It is a feature intended for ios/wasm.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what would be the fix? I assume clrinterpreter.dll should be excluded. How can I manage that?

@@ -34,7 +34,13 @@ else()
add_custom_target(clrinterpreter_exports DEPENDS ${EXPORTS_FILE})
endif()

add_library_clr(clrinterpreter_objects OBJECT ${INTERPRETER_SOURCES})
if(CLR_CMAKE_TARGET_WIN32)
set(INTERPRETER_RESOURCES Native.rc)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does adding a native resource file change the build?

Copy link
Author

@Alikhalesi Alikhalesi Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as #118581, after adding clrinterpreter.dll as PlatformManifestEntry,
another build error is raised, due to not setting file version on clrinterpreter.dll:

C:\Users\kg\.nuget\packages\microsoft.dotnet.sharedframework.sdk\10.0.0-beta.25406.102\targets\sharedfx.targets(527,5): error : Missing FileVersion in 1 shared framework files: [Z:\runtime\src\installer\pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Runtime.
CoreCLR.sfxproj]
C:\Users\kg\.nuget\packages\microsoft.dotnet.sharedframework.sdk\10.0.0-beta.25406.102\targets\sharedfx.targets(527,5): error : Z:\runtime\artifacts\bin\coreclr\windows.x64.Checked\sharedFramework\clrinterpreter.dll [Z:\runtime\src\installer\pkg\sfx\Microsoft.NET
Core.App\Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj]
Z:\runtime\src\installer\pkg\sfx\bundle\Microsoft.NETCore.App.Bundle.bundleproj(35,5): error MSB4181: The "MSBuild" task returned false but did not log an error.

This resource adds file version, product detail, ... to the dll and fixes the issue, then the build is fine.

@jkotas
Copy link
Member

jkotas commented Dec 14, 2025

What are the repro steps for the problem you are trying to fix?

@Alikhalesi
Copy link
Author

Alikhalesi commented Dec 14, 2025

@jkotas build.cmd -s clr+libs+packs on windows x64 Causes:

All projects are up-to-date for restore.
C:\Users\kg\.nuget\packages\microsoft.dotnet.sharedframework.sdk\10.0.0-beta.25406.102\targets\sharedfx.targets(305,5): error : The following files are missing entries in the templated manifest: [Z:\runtime\src\installer\pkg\sfx\Microsoft.NETCore.App\Microsoft.NE
TCore.App.Runtime.CoreCLR.sfxproj]
C:\Users\kg\.nuget\packages\microsoft.dotnet.sharedframework.sdk\10.0.0-beta.25406.102\targets\sharedfx.targets(305,5): error : clrinterpreter.dll. Add these file names with extensions to the 'PlatformManifestFileEntry' item group for the runtime pack and corresp
onding ref pack to include them in the platform manifest. [Z:\runtime\src\installer\pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj]
Z:\runtime\src\installer\pkg\sfx\bundle\Microsoft.NETCore.App.Bundle.bundleproj(35,5): error MSB4181: The "MSBuild" task returned false but did not log an error. 

After adding the clrinterpreter.dll to manifest, i am getting:

C:\Users\kg\.nuget\packages\microsoft.dotnet.sharedframework.sdk\10.0.0-beta.25406.102\targets\sharedfx.targets(527,5): error : Missing FileVersion in 1 shared framework files: [Z:\runtime\src\installer\pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Runtime.
CoreCLR.sfxproj]
C:\Users\kg\.nuget\packages\microsoft.dotnet.sharedframework.sdk\10.0.0-beta.25406.102\targets\sharedfx.targets(527,5): error : Z:\runtime\artifacts\bin\coreclr\windows.x64.Checked\sharedFramework\clrinterpreter.dll [Z:\runtime\src\installer\pkg\sfx\Microsoft.NET
Core.App\Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj]
Z:\runtime\src\installer\pkg\sfx\bundle\Microsoft.NETCore.App.Bundle.bundleproj(35,5): error MSB4181: The "MSBuild" task returned false but did not log an error.

Adding resource and version to clrinterpreter.dll solves the issue. Maybe the right way is exclude this dll from ref packs when building for windows?
https://github.com/dotnet/runtime/issues/118581

@jkotas
Copy link
Member

jkotas commented Dec 14, 2025

Why do you need to build debug version of packs? Would build.cmd -s clr+libs+packs -c release work for you?

@Alikhalesi
Copy link
Author

@jkotas Yes, building "packs" is ok on Release builds, .

@am11 am11 mentioned this pull request Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates that the PR has been added by a community member needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build fails on "packs"

4 participants