-
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
Bundle resources in NuGet package not installed #7258
Comments
@babak-f Thank you for your feedback! For us to investigate this further, could you please provide your full build logs, crash reports (if any), solution files (to reproduce) and all your version information. For your issue, it would also be useful if you could include the Nuget package that you are installing. To get full build logs just set the log verbosity to diagnostic at the following locations:
On Visual Studio for Windows you also want to add Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic. The easiest way to get exact version information:
Then copy/paste the version information (you can use the "Copy Information" button). We look forward to hearing from you! |
Hello there, we have the same issue with our NuGet, we need to include a custom font for our views but we don't add successfully the file. We use the tutorial from James Montemagno (https://montemagno.com/converting-xamarin-libraries-to-sdk-style-multi-targeted-projects/) for our project, but I try to use the nuspec method but neither the csproj Nuget and the nuspec Nuget have the file. Could you give us some updates ? |
So, you are using multi-targeting here with SDK Extras: https://github.com/onovotny/MSBuildSdkExtras usually I would ask questions there as there are special flags usually you need to set to get things packages and it is a third party library. You will want to update to 2.0.54 to ensure all files are picked up for sure. For Android items the naming of the folder is very important such as how we use it in Essentials: https://github.com/xamarin/Essentials/blob/master/Xamarin.Essentials/Xamarin.Essentials.csproj#L76 I am not sure about iOS, but can ask @onovotny if he has done it |
Also, you can look: https://github.com/jsmarcus/Iconize/blob/master/src/Fonts/Plugin.Iconize.FontAwesome/Plugin.Iconize.FontAwesome.csproj which does font bundling. @jsmarcus has a good system there. |
It sounds like this is a naming issues and not a macios bug, so I'm going to close it for now. |
I have a NuGet package with a number of files, that should be added to the source code of the target package as bundle resource. But they don't get added.
The NuGet package does not contain a Visual Studio solution (sln), i.e. contains just files.
Steps to Reproduce
Expected Behavior
The files be copied into the
Resources
folder of the Xamarin project's source code, with "bundle resource" as build action.OR:
The files be copied to the iOS app's target directory as bundle resource, upon buidling the app.
Actual Behavior
No files are copied to the
Resources
folder. The bundle resources are not present either, once you run the app. I.e., the files are not installed in neither the source directory nor the output directory.Environment
Also fails on Visual Studio for Mac (latest version).
But it does not fail on Visual Studio for Windows 2017.
Build Logs
No error is logged by the NuGet package installation, and it says that package installation was successful.
Other Remarks
Tried setting the build action to
Content
(in the nuspec file), which didn't work either.The text was updated successfully, but these errors were encountered: