Pack task puts content files in both 'content/' and 'contentFiles/' #3718

Closed
natemcmaster opened this Issue Oct 22, 2016 · 5 comments

Comments

Projects
None yet
5 participants
@natemcmaster

Pack a csproj that includes a 'content' item. The files ends up in both "/content" and "/contentFiles".

Repro:

  <ItemGroup>
    <Content Include="somefile.txt" Pack="true" />
  </ItemGroup>

'dotnet pack3'

Output:
nupkg contains content files twice:

content/
    somefile.txt
contentFiles/
    somefile.txt
lib/
    netcoreapp1.0/
        testapp.dll

Using:
dotnet cli 1.0.0-preview3-003857
microsoft.net.sdk/1.0.0-alpha-20161021-1
NuGet.Build.Tasks.Pack/3.6.0-rc-1984

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Oct 23, 2016

Contributor

believe we are starting to do this by design. @rohit21agrawal?

Contributor

rrelyea commented Oct 23, 2016

believe we are starting to do this by design. @rohit21agrawal?

@rrelyea rrelyea added the Area: Pack label Oct 23, 2016

@rohit21agrawal

This comment has been minimized.

Show comment
Hide comment
@rohit21agrawal

rohit21agrawal Oct 24, 2016

Contributor

@rrelyea yes, this is by design.

Contributor

rohit21agrawal commented Oct 24, 2016

@rrelyea yes, this is by design.

@natemcmaster

This comment has been minimized.

Show comment
Hide comment
@natemcmaster

natemcmaster Oct 25, 2016

@rohit21agrawal can you share more details on this design? Duplicating content in a package is not something I would expected.

@rohit21agrawal can you share more details on this design? Duplicating content in a package is not something I would expected.

@rohit21agrawal rohit21agrawal added this to the 4.0 RC2 milestone Oct 25, 2016

@joelverhagen joelverhagen self-assigned this Nov 9, 2016

@joelverhagen

This comment has been minimized.

Show comment
Hide comment
@joelverhagen

joelverhagen Nov 16, 2016

Member

Spoke to @natemcmaster offline.

This is by design (spec):

Everything gets added to the root of the content and contentFiles folder within a package and preserves the relative directory structure, unless you specify a package path

However, some people may want to only think about PackageReference/project.json consumers. We should consider an opt-out flag like:

<PackLegacyContent>false</PackLegacyContent>
or
<UseLegacyContentPacking>false</UseLegacyContentPacking>

@yishaigalatzer, thoughts?

Member

joelverhagen commented Nov 16, 2016

Spoke to @natemcmaster offline.

This is by design (spec):

Everything gets added to the root of the content and contentFiles folder within a package and preserves the relative directory structure, unless you specify a package path

However, some people may want to only think about PackageReference/project.json consumers. We should consider an opt-out flag like:

<PackLegacyContent>false</PackLegacyContent>
or
<UseLegacyContentPacking>false</UseLegacyContentPacking>

@yishaigalatzer, thoughts?

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Nov 16, 2016

Sounds ok to me

From: Joel Verhagen [mailto:notifications@github.com]
Sent: Wednesday, November 16, 2016 2:03 PM
To: NuGet/Home Home@noreply.github.com
Cc: Yishai Galatzer yigalatz@microsoft.com; Mention mention@noreply.github.com
Subject: Re: [NuGet/Home] Pack task puts content files in both 'content/' and 'contentFiles/' (#3718)

Spoke to @natemcmasterhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnatemcmaster&data=02%7C01%7Cyigalatz%40microsoft.com%7C9de3114728fc403fec2908d40e6c5830%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636149305878451594&sdata=Lqf9zECeYh2nL4Jhnam3Aoz3hvQmeXq7MHxyNIHLKag%3D&reserved=0 offline.

This is by design (spechttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNuGet%2FHome%2Fwiki%2FAdding-nuget-pack-as-a-msbuild-target%23including-content-in-package&data=02%7C01%7Cyigalatz%40microsoft.com%7C9de3114728fc403fec2908d40e6c5830%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636149305878451594&sdata=0e%2FuBhUD3z2H%2BG010O1mR34PSXJtqN716H%2FexWFA6Ws%3D&reserved=0):

Everything gets added to the root of the content and contentFiles folder within a package and preserves the relative directory structure, unless you specify a package path

However, some people may want to only think about PackageReference/project.json consumers. We should consider an opt-out flag like:

false

or

false

@yishaigalatzerhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyishaigalatzer&data=02%7C01%7Cyigalatz%40microsoft.com%7C9de3114728fc403fec2908d40e6c5830%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636149305878451594&sdata=UDZ6AlfstlFAYsPZQL%2FW7fal3adFM6i7Qn2kpX0zpbI%3D&reserved=0, thoughts?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNuGet%2FHome%2Fissues%2F3718%23issuecomment-261086759&data=02%7C01%7Cyigalatz%40microsoft.com%7C9de3114728fc403fec2908d40e6c5830%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636149305878451594&sdata=2%2FjAPxDgrT3wxN0GOcQV6RJPhvf9UmBt1hkdkhRNkcw%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABLmt2VMoRvQ042OP1bVAk4nTeE_RlrWks5q-32YgaJpZM4KdtLk&data=02%7C01%7Cyigalatz%40microsoft.com%7C9de3114728fc403fec2908d40e6c5830%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636149305878451594&sdata=0eEHmyVJoeenChbPfqciB15CNLVFa5%2FfR138pGDtKYM%3D&reserved=0.

Sounds ok to me

From: Joel Verhagen [mailto:notifications@github.com]
Sent: Wednesday, November 16, 2016 2:03 PM
To: NuGet/Home Home@noreply.github.com
Cc: Yishai Galatzer yigalatz@microsoft.com; Mention mention@noreply.github.com
Subject: Re: [NuGet/Home] Pack task puts content files in both 'content/' and 'contentFiles/' (#3718)

Spoke to @natemcmasterhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnatemcmaster&data=02%7C01%7Cyigalatz%40microsoft.com%7C9de3114728fc403fec2908d40e6c5830%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636149305878451594&sdata=Lqf9zECeYh2nL4Jhnam3Aoz3hvQmeXq7MHxyNIHLKag%3D&reserved=0 offline.

This is by design (spechttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNuGet%2FHome%2Fwiki%2FAdding-nuget-pack-as-a-msbuild-target%23including-content-in-package&data=02%7C01%7Cyigalatz%40microsoft.com%7C9de3114728fc403fec2908d40e6c5830%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636149305878451594&sdata=0e%2FuBhUD3z2H%2BG010O1mR34PSXJtqN716H%2FexWFA6Ws%3D&reserved=0):

Everything gets added to the root of the content and contentFiles folder within a package and preserves the relative directory structure, unless you specify a package path

However, some people may want to only think about PackageReference/project.json consumers. We should consider an opt-out flag like:

false

or

false

@yishaigalatzerhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyishaigalatzer&data=02%7C01%7Cyigalatz%40microsoft.com%7C9de3114728fc403fec2908d40e6c5830%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636149305878451594&sdata=UDZ6AlfstlFAYsPZQL%2FW7fal3adFM6i7Qn2kpX0zpbI%3D&reserved=0, thoughts?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNuGet%2FHome%2Fissues%2F3718%23issuecomment-261086759&data=02%7C01%7Cyigalatz%40microsoft.com%7C9de3114728fc403fec2908d40e6c5830%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636149305878451594&sdata=2%2FjAPxDgrT3wxN0GOcQV6RJPhvf9UmBt1hkdkhRNkcw%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABLmt2VMoRvQ042OP1bVAk4nTeE_RlrWks5q-32YgaJpZM4KdtLk&data=02%7C01%7Cyigalatz%40microsoft.com%7C9de3114728fc403fec2908d40e6c5830%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636149305878451594&sdata=0eEHmyVJoeenChbPfqciB15CNLVFa5%2FfR138pGDtKYM%3D&reserved=0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment