Skip to content
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

ContentFiles: Embedded resources are always flattened #78

Open
nkolev92 opened this issue Apr 22, 2020 · 0 comments
Open

ContentFiles: Embedded resources are always flattened #78

nkolev92 opened this issue Apr 22, 2020 · 0 comments

Comments

@nkolev92
Copy link
Contributor

When a NuGet package is created with content files in a nested directory structure, the (manifest) resource names of the embedded resources that are created for these files do not contain the relative directory path (with slashes converted to dots).

Steps to reproduce:

  1. Create a NuGet package with the following content:
contentFiles
                any
                        any
                                sub
                                       myResource.txt
  1. In the .nuspec for this package, add the following fragment to the metadata element:
   <contentFiles>
        <files include="**" buildAction="EmbeddedResource" />
    </contentFiles>
  1. Pack & Publish the NuGet package.
  2. Create (for example) a C# Console App project named ConsoleApp1 (with default namespace ConsoleApp1¨) in Visual Studio (15.8).
  3. Ensure that the default package management format is PackageReference in the NuGet Package Manager Settings*.
  4. Add a reference to the NuGet package that we published in step 3.
  5. Build the project.

Expected result:

The myResource.txt file is embedded in the ConsoleApp1.exe assembly with the name 'ConsoleApp1.sub.myResource.txt'.

Actual result:

The myResource.txt file is embedded in the ConsoleApp1.exe assembly with the name 'ConsoleApp1.myResource.txt'.

NuGet product used: VS UI (15.8.1)
OS version: Windows 7 Build 7601

Moved from: NuGet/Home#7255

cc @drieseng @tmeschter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant