-
Notifications
You must be signed in to change notification settings - Fork 257
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
flatten for content files not working #6213
Comments
@rohit21agrawal can you please take a look into this? |
sounds like pack is doing the right thing (@liushuanggang can you paste the nuspec file generated in the nupkg here to verify?) ...this will be a restore bug (for triaging purposes) |
@rohit21agrawal, Sorry later reply. I have pasted my nuspec file below. And I have provided my test sample with one driver: https://1drv.ms/f/s!Ai1sp_yvodHfgQirLftPPOso7tV1
|
seems like the |
|
Still does not work for me.
|
PackageFlatten works only if the consuming project is a .net Framework Project. If you use the new core format csproject Fille (sdk) the files are not flatten in the output directory. |
Create a nuspec like the following:
It packs properly, but the argument
flatten="true"
did not work as expected after install the packed packaged to the project.According to the description of flatten,
And NuGet ContentFiles Demystified:
So if I set the
flatten="true"
, after install this package to project, the TestFile.txt file should be delivered to the root folder of the project. Am I right? But after install this package to project, I still got the that file in the folder RemoveMe.Besides, I also test other argument
buildAction="content" copyToOutput="false"
, both of them works fine.NuGet product used: NuGet.exe
NuGet version: 4.1.0
VS version (if appropriate): VS2017 15.4.4
OS version (i.e. win10 v1607 (14393.321)): Win 10 1703
Worked before? If so, with which NuGet version:
Detailed repro steps so we can see the same problem
Create a .netstand project with VS2017, add a folder
RemoveMe
with a test fileTestFile.txt
in it.set true in the project file for test file.
Sample Project:
I share the onedrive link here, so that you can pack the .nuspec file directly:
https://1drv.ms/f/s!Ai1sp_yvodHfgQirLftPPOso7tV1
The text was updated successfully, but these errors were encountered: