-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<PublishFolderType> for transitive <Content> files inconsistent behaviour for the non-macos tfm #20947
Comments
I did some brief research and here are the results.
So, looks like that I can just add the
property in the P.S. And I'm still curious anyway if the current behaviour of the "is it is a content file" heuristic check is intended or not. |
As the name indicates, I believe this is just an optimization, so your build might be ever so slightly slower or consume more memory. I don't think this should be an issue unless you have a lot of Content items in your projects though.
Yes, the behavior and the reasons behind this design is documented here: https://github.com/xamarin/xamarin-macios/blob/main/dotnet/BundleContents.md The easiest fix is probably multi-target the class library, so that you build for net8.0-macos as well as net8.0. I'm not entirely sure what we can do to fix this, but I'm leaving this open, because the current behavior is obviously not optimal. One possibility might be to change the definition of |
From my experience while researching the current behavior after reading the docs, I would say that it might be helpful to emphasize the following moments in the documentation:
I can make a PR, but my English is far from perfect, so I'm not sure such a PR will be useful (e.g. will not require to full editing/rewriting in the normal English) |
That's a good idea, I'll look into that. |
I wonder if we can set |
|
Steps to Reproduce
ClassLibrary1.csproj
and make sure, that thePublishFolderType
set for all content of theData
subfoldermacOSApp1.csproj
/macOSApp1/bin/Debug/net8.0-macos/osx-x64/macOSApp1.app/Contents/Resources/Data/
Expected Behavior
Data
folder (1.jpg+2.psd
) copied into the app bundle/macOSApp1/bin/Debug/net8.0-macos/osx-x64/macOSApp1.app/Contents/Resources/Data/
Actual Behavior
1.jpg
is copied into the app bundle, the2.psd
is missing.Environment
Version information (`dotnet --info`)
Build Logs
msbuild.zip
Example Project (If Possible)
test.zip
Additional information
ClassLibrary1.csproj
from thenet8.0
tonet8.0-macos
, then2.psd
will be copied as expected (and build warnings will go away). Multitargeting (net8.0;net8.0-macos
) will also work.1.png
is copied (fornet8.0
tfm) thanks to the extension-based heuristics.<Content/>
, but it looks like it does not handle this specific case with2.psd
(although it is a<Content/>
) for thenet8.0
tfm.The text was updated successfully, but these errors were encountered: