-
Notifications
You must be signed in to change notification settings - Fork 255
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
content files are not being included in old format project #6675
Comments
can you attach a repro project for old style csproj (PackageReference based) which does not work for you? |
Sorry for the delayed answer, I didn't have access to the work pc on the weekend. I have attached a project that references the testpackage. The output says that the installation is done, but there is no change in project structure (no content added). Cheers and thanks for the interest in helping me out :-) |
@rohit21agrawal do I have to remove the label (if so then how do I do it?) or is it enough that I answered the thread for it to not be waiting for customer anymore? |
the best part about contentFile feature in NuGet is that the addition of content is done behind the scenes during build time . The content will be available to you when you need it. If you modify your nuspec and set copyToOutput=true :
then it will also be copied to the build output folder on build. I verified this with your project and package |
Am i correct to interpret this as "Not a bug"? |
The issue is not resolved.
…On Mon, Apr 16, 2018, 20:45 Nikolche Kolev ***@***.***> wrote:
Am i correct to interpret this as "Not a bug"?
Has the issue been resolved here?
@ElMaxxi <https://github.com/ElMaxxi> @rohit21agrawal
<https://github.com/rohit21agrawal>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6675 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AP4DqoT6WtQHI4fYnIv4v3-yqtMVDVd7ks5tpOa3gaJpZM4SqQSp>
.
|
@ElMaxxi if it's not resolved, can you please reply to my earlier comment? |
On Apr 16, 2018 21:59, "Rohit Agrawal" <[email protected]> wrote:
@ElMaxxi <https://github.com/ElMaxxi> if it's not resolved, can you please
reply to my earlier comment
<#6675 (comment)>?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6675 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AP4DqsNdTechR5xfVsBjrJlRdTqcgLqRks5tpPgQgaJpZM4SqQSp>
.
I am sorry, it seems that my last Reilly wasn't sent correctly. no wonder I
never got a reply hehe
I do not need the files as content in my output folder, I need them as
compile time content.
|
So change the buildAction to Compile |
so, if I understood you correctly, what I was missing is the buildAction?
I'm on the road right now so I can't test it right away.
…On Mon, Apr 16, 2018, 22:18 Rohit Agrawal ***@***.***> wrote:
So change the buildAction to Compile
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6675 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AP4DqtXOwsNNZZM1_jon6y1BewvPfzQ-ks5tpPx_gaJpZM4SqQSp>
.
|
@ElMaxxi Simply reply whenever you have change to test it, no rush :) |
Hey, |
So I changed the nuspec file buildAction to compile and then called "nuget pack". Then I added the .nuget package that was created to the aforementioned project and nothing happened. No files added or anything. No to mention that I do not want to add files that will be compiled, I just want to add files as content to the project. If you help me figure out how I can debug nuget locally, I will try to find the error myself. |
@ElMaxxi Sorry for the confusion, if you just want to add files as Content then you can just set buildAction to You can also look at this sample - https://github.com/NuGet/Samples/tree/master/ContentFilesExample |
@jainaashish Thanks for the answer. I have fiddled around with the example that you linked and I am experiencing some peculiar behavior. I remove the "authoring" package to the "consuming" project and it can't build (OK so far). I add the package that I created using the .ps1 script and now it builds. HOWEVER, inside visual studio I do NOT see the files anywhere in the solution explorer. |
Can you reload the solution and see if that shows th file then? And what's the content of |
In the old project format content files are not displayed in the UI. |
Alright guys, I was finally about to try a couple of things. I hadn't known about the UI issue and that is why I got really confused. Thank you all so much for the help and for your input. |
Glad you figured it out @ElMaxxi |
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
NuGet Version: 4.3.0.4406
VS version (if appropriate): 2017
OS version: Version 10.0.14393
I am trying to create a nuget package that will add content to a project. I have followed many online tutorials on how to do it, and ended up with the following:
folder layout>
content of nuspec file:
call nuget pack and the package is created.
Adding this package to a project with the new csproj format works fine.
Adding this package to a project with the old csproj format doesn't work.
Both use PackageReference.
Nuget.exe verbose log:
NuGet Version: 4.3.0.4406
Attempting to build package from 'testPackage.nuspec'.
Id: testPackage
Version: 1.0.0.0
Authors: Komax AG
Description: Test data for Database Administration Tool
Dependencies: None
Added file '[Content_Types].xml'.
Added file '_rels/.rels'.
Added file 'package/services/metadata/core-properties/0f0de1437e974b06b6c339e64c1477e2.psmdcp'.
Added file 'TestData/TopWin2/17.10/A530/MigrationMapping/CrimpModules.xml'.
Added file 'TestData/TopWin2/17.10/A530/MigrationMapping/Machine.xml'.
Added file 'TestData/TopWin2/17.10/A530/MigrationMapping/Prefeeder.xml'.
Added file 'TestData/TopWin2/17.10/A530/MigrationMapping/PrintModules.xml'.
Added file 'TestData/TopWin2/17.10/A530/MigrationMapping/Q1240.xml'.
Added file 'TestData/TopWin2/17.10/A530/MigrationMapping/RingSensor.xml'.
Added file 'TestData/TopWin2/17.10/A530/MigrationMapping/SealModules.xml'.
Added file 'TestData/TopWin2/17.10/A530/MigrationMapping/WireChangeDetection.xml'.
Added file 'TestData/TopWin2/17.10/A530/MigrationMapping/WireStraightener.xml'.
Added file 'TestData/TopWin2/17.10/A530/TopWin2_Alpha530.kback'.
Added file 'TestData/TopWin2/17.10/A550/MigrationMapping/CrimpModules.xml'.
Added file 'TestData/TopWin2/17.10/A550/MigrationMapping/Machine.xml'.
Added file 'TestData/TopWin2/17.10/A550/MigrationMapping/Prefeeder.xml'.
Added file 'TestData/TopWin2/17.10/A550/MigrationMapping/Q1240.xml'.
Added file 'TestData/TopWin2/17.10/A550/MigrationMapping/SealModules.xml'.
Added file 'TestData/TopWin2/17.10/A550/MigrationMapping/Splice.xml'.
Added file 'TestData/TopWin2/17.10/A550/MigrationMapping/WireChangeDetection.xml'.
Added file 'TestData/TopWin2/17.10/A550/MigrationMapping/WireStraightener.xml'.
Added file 'TestData/TopWin2/17.10/A550/TopWin2_Alpha550.kback'.
Added file 'TestData/TopWin4/17.12/Alpha530/topwindata_emptyWithElectricEndPoints.mdf'.
Added file 'TestData/TopWin4/17.12/Alpha530/topwindata_emptyWithElectricEndPoints_log.ldf'.
Added file 'TestData/TopWin4/17.12/Alpha550/topwindata_emptyWithElectricEndPoints.mdf'.
Added file 'TestData/TopWin4/17.12/Alpha550/topwindata_emptyWithElectricEndPoints_log.ldf'.
Added file 'TestData/TopWin4/topwindata.bak'.
Added file 'testPackage.nuspec'.
Successfully created package '..\testPackage.1.0.0.nupkg'.
What am I doing wrong?
testPackage.zip
The text was updated successfully, but these errors were encountered: