-
Notifications
You must be signed in to change notification settings - Fork 555
Description
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
- Create a NuGet package that contains a number of files. Nuspec file:
<package>
<metadata>
<id>...</id>
<version>...</version>
<title>...</title>
<authors>...</authors>
<owners>...</owners>
<requireLicenseAcceptance>...</requireLicenseAcceptance>
<description>...</description>
<copyright>...</copyright>
<tags>...</tags>
<dependencies>
</dependencies>
<contentFiles>
<files include="Resources\*" buildAction="BundleResource" flatten="true" />
</contentFiles>
</metadata>
<files>
<file src="Folder1\**\*.*" target="content\Resources\Folder1" />
<file src="Folder2\**\*.*" target="content\Resources\Folder2" />
</files>
</package>- Publish the NuGet package to a package repository
- Create a Xamarin iOS project
- Install the NuGet package in this project
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
Microsoft Visual Studio Professional 2019
Version 16.3.5
VisualStudio.16.Release/16.3.5+29411.108
Microsoft .NET Framework
Version 4.8.03752
Installed Version: Professional
Mono Debugging for Visual Studio 16.3.7 (9d260c5)
Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 5.3.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
Xamarin.iOS and Xamarin.Mac SDK 13.4.0.2 (e37549b)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Xamarin 16.3.0.277 (d16-3@c0fcab7)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
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.