Apple platform
macOS
Framework version
net10.0-*
Affected platform version
10.0.300 / workloads 26.5.10284
Description
I'm trying to include precompiled helper app bundle HeartBeatHandlerMac.app in the other app bundle using the following csproj settings (the precompiled helper bundle placed at ./helper/HeartBeatHandlerMac.app)
<ItemGroup>
<Content Include="helper/**/*">
<PublishFolderType>RootDirectory</PublishFolderType>
<Link>Contents/SharedSupport/%(RecursiveDir)%(Filename)%(Extension)</Link>
</Content>
</ItemGroup>
Expected: all files from the ./helper/HeartBeatHandlerMac.app/ will be copied in the output app bundle in the Contents/SharedSupport/ subfolder, preserving the original folder structure. For example, for debug config the expected output path will be /bin/Debug/net10.0-macos/osx-arm64/TestMacGuiApp.app/Contents/SharedSupport/HeartBeatHandlerMac.app
Observed: the SharedSupport/HeartBeatHandlerMac.app output folder exists and is not empty, but some files are missing.
Let's compare folder structures (the helper app bundle contents was truncated manually to minimize files count and simplify debug)
For the input folder (./helper):
.
└── HeartBeatHandlerMac.app
└── Contents
└── MonoBundle
├── .xamarin
│ ├── osx-arm64
│ │ ├── HeartBeatHandlerMac.dll
│ │ ├── Microsoft.CSharp.dll
│ │ ├── Microsoft.macOS.dll
│ │ └── Microsoft.VisualBasic.dll
│ └── osx-x64
│ ├── HeartBeatHandlerMac.dll
│ ├── Microsoft.CSharp.dll
│ ├── Microsoft.macOS.dll
│ └── Microsoft.VisualBasic.dll
├── AsyncIO.dll
├── HeartbeatHandlerLib.dll
├── libclrgc.dylib
└── System.ServiceModel.Security.dll
7 directories, 12 files
For the output folder (/bin/Debug/net10.0-macos/osx-arm64/TestMacGuiApp.app/Contents/SharedSupport):
.
└── HeartBeatHandlerMac.app
└── Contents
└── MonoBundle
├── .xamarin
│ ├── osx-arm64
│ │ └── HeartBeatHandlerMac.dll
│ └── osx-x64
│ └── HeartBeatHandlerMac.dll
├── AsyncIO.dll
├── HeartbeatHandlerLib.dll
└── System.ServiceModel.Security.dll
7 directories, 5 files
In particular, the following files are lost: libclrgc.dylib, Microsoft.macOS.dll.
Steps to Reproduce
- Download test project Test.zip
dotnet build
- Inspect output folder and compare it with the sources in the
helper folder. Observe that some Content files are missing.
Did you find any workaround?
In some cases we can use BundleResource instead of Content (and this copies all the files), but in this particular case, when we need specific location inside the final app bundle, that workaround is not applicable.
Build logs
See inside Test.zip
Apple platform
macOS
Framework version
net10.0-*
Affected platform version
10.0.300 / workloads 26.5.10284
Description
I'm trying to include precompiled helper app bundle
HeartBeatHandlerMac.appin the other app bundle using the following csproj settings (the precompiled helper bundle placed at./helper/HeartBeatHandlerMac.app)Expected: all files from the
./helper/HeartBeatHandlerMac.app/will be copied in the output app bundle in theContents/SharedSupport/subfolder, preserving the original folder structure. For example, for debug config the expected output path will be/bin/Debug/net10.0-macos/osx-arm64/TestMacGuiApp.app/Contents/SharedSupport/HeartBeatHandlerMac.appObserved: the
SharedSupport/HeartBeatHandlerMac.appoutput folder exists and is not empty, but some files are missing.Let's compare folder structures (the helper app bundle contents was truncated manually to minimize files count and simplify debug)
For the input folder (
./helper):For the output folder (
/bin/Debug/net10.0-macos/osx-arm64/TestMacGuiApp.app/Contents/SharedSupport):In particular, the following files are lost:
libclrgc.dylib, Microsoft.macOS.dll.Steps to Reproduce
dotnet buildhelperfolder. Observe that someContentfiles are missing.Did you find any workaround?
In some cases we can use
BundleResourceinstead ofContent(and this copies all the files), but in this particular case, when we need specific location inside the final app bundle, that workaround is not applicable.Build logs
See inside Test.zip