Tworzenie paczek NuGet

W skrócie opisze jak tworzyć paczki nuget bezpośrednio z projektu VS.

Wszystkie polecenia będziemy wykonywać narzędziem nuget.exe

Tworzenie paczki release

W folderze z projektem (plik .csporj) uruchamiamy

nuget spec

Po uruchomieniu zostanie utworzony specjalny plik .nuspec o takiej samej nazwie jak nazwa projektu. Plik ten zawiera meta informację na temat paczki.

[xml]
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<releaseNotes>My project release notes</releaseNotes>
<copyright>Copyright 2016</copyright>
<tags>tag1 tag2</tags>
</metadata>
</package>
[/xml]

Dane w formacie $xyz$ oznaczają że te informacje są pobierane z pliku dll.

Gdy plik nuspec mamy już gotowy to budujemy projekt i tworzymy paczkę uruchamiając polecenie:

nuget pack MyProject.csproj

Jeśli chcemy dodać zależne biblioteki to dodajemy parametr IncludeReferencedProjects

nuget pack MyProject.csproj -IncludeReferencedProjects -Prop Configuration=Release

Jeśli paczka się utworzy to wysyłamy ją na serwer poleceniem:

nuget push MyProject.1.0.0.nupkg -s http://yourdomain.com/nuget API_KEY

Tworzenie paczki prerelease

Jeśłi paczkę tworzymy z pliku projektu (.csproj lub .vbproj) to utworzenie paczki prelese ogranicza się do dodania atrybutu AssemblyInformationalVersionAttribute i określeniu wersji:

[assembly: AssemblyInformationalVersion("1.0.1-alpha")]

NuGet użyje tej wartości zamiast danych z AssemblyVersion.

Więcej informacji

6,596 thoughts on “Tworzenie paczek NuGet”

  1. There are certainly quite a lot of particulars like that to take into consideration. That could be a great level to carry up. I supply the ideas above as basic inspiration however clearly there are questions just like the one you bring up where a very powerful thing might be working in sincere good faith. I don?t know if greatest practices have emerged around issues like that, but I am positive that your job is clearly identified as a good game. Both girls and boys feel the impression of only a moment抯 pleasure, for the rest of their lives.

  2. I don’t know if it’s just me or if perhaps everyone else encountering issues with your site.
    Seems like as though some of the text inside your posts are running away from the screen. Can another person please
    comment and tell me should this be happening for them as well?
    This may become a problem with my browser because I’ve had this happen previously.
    Cheers

  3. hi!,I love your writing very a lot! share we keep in toch
    extr approximately your article on AOL? I require an expert on this area to resolve my problem.
    Maybe that’s you! Having a loook forward to see you.

  4. Great beat ! I wish to apprentice while you amend your site, how can i subscribe for a blog website? The account helped me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear concept

  5. to answer your question – what was realistic in AVATAR was the manner in which The Company preys on natural resources, and people, and demonstrates the idea that there are no longer governments, just corporates (which run them and their militaries).

  6. Just want to say your article is as astounding. The clearness in your publish is simply spectacular and i can suppose you are knowledgeable in this subject.
    Fine along with your permission allow me to
    grab your RSS feed to stay up to date with forthcoming post.
    Thanks one million and please continue the gratifying work.

  7. You could definitely see your enthusiasm in the work you write.
    The arena hopes for even more passionate writers like you who aren’t afraid to
    say how they believe. All the time go after your heart.

  8. Hi would you mind sharing which blog platform you’re using?
    I’m planning to start my own blog in the near future but I’m having a hard time
    deciding between BlogEngine/Wordpress/B2evolution and Drupal.

    The reason I ask is because your design and style seems different then most blogs and I’m looking for something completely
    unique. P.S Sorry for getting off-topic but I had to ask!

  9. You really make it seem really easy with your presentation but I to find this topic to be actually one thing which I think I might by no means understand. It seems too complicated and extremely wide for me. I’m looking ahead for your next put up, I will try to get the hang of it!

  10. I loved as much as you’ll receive carried out right here. The sketch is tasteful, your authored material stylish. nonetheless, you command get bought an impatience over that you wish be delivering the following. unwell unquestionably come more formerly again since exactly the same nearly very often inside case you shield this increase.

  11. you are actually a good webmaster. The website loading velocity is amazing. It seems that you are doing any distinctive trick. In addition, The contents are masterpiece. you’ve done a excellent process on this subject!

  12. Its confusing when people say content is king, if your site has 0 links
    it still wont perform well
    Added a post on Facebook, hope thats okay!

  13. Heya i am for the first time here. I found this board and I find It truly helpful & it helped me out a
    lot. I’m hoping to provide something back and aid others such as you aided me.

  14. We absolutely love your blog and find many of your post’s to be exactly what I’m looking
    for. can you offer guest writers to write content available for you?
    I wouldn’t mind writing a post or elaborating on some of the subjects you write in relation to here.
    Again, awesome weblog!

  15. Can I simply say what a relief to find somebody who actually is aware of what theyre speaking about on the internet. You positively know learn how to bring a difficulty to light and make it important. More individuals need to learn this and understand this side of the story. I cant imagine youre no more common since you definitely have the gift.

  16. Hey, you used to write fantastic, but the last several posts have been kinda boring¡K I miss your tremendous writings. Past several posts are just a little out of track! come on!

  17. Flying to Vegas to evaluate real estate marketplaces that are possible is see-through vacationing disguised as business journey,
    particularly if you invest 2 3 out of every 2 4 hours in the casino!

  18. As I web-site possessor I believe the content matter here is rattling fantastic , appreciate it for your hard work. You should keep it up forever! Best of luck.

  19. Cereal or 6ct Granola Bars $2.75 each -$1.00 off any ONE Kashi GOLEAN Cereal or use $1/1 Kashi GOLEAN Crisp! Cinnamon Crumble Cereal, Any or use $1/1 Kashi Cereal or TLC Snack, Any (must sign up and answer question) or use $1/1 Kashi

  20. Hurrah! Finally I got a webpage from where I be capable of genuinely get useful information regarding
    my study and knowledge.

  21. Hi there just wanted to give you a brief heads up and let you know a
    few of the images aren’t loading correctly. I’m not sure why but I think its a linking issue.
    I’ve tried it in two different web browsers and
    both show the same results.

  22. When it is simple to insert day-to-day content of priceless altering information,
    once customers are knowledgeable about site and the agent
    it could be of use.

  23. Thanks for the sensible critique. Me and my neighbor were just preparing to do some research on this. We got a grab a book from our area library but I think I learned more from this post. I’m very glad to see such great info being shared freely out there.

  24. I as well as my guys were actually digesting the good ideas from your web site then at once I had a terrible feeling I never expressed respect to you for those secrets. The men ended up for that reason warmed to read them and have really been enjoying them. Appreciation for actually being quite kind as well as for making a decision on certain amazing subject matter most people are really wanting to be informed on. My sincere regret for not expressing gratitude to you earlier.

  25. Upkeep prices with single family houses and apartment buildings have
    turned out to be the undoing of many real-estate investors.

Leave a Reply

Your email address will not be published. Required fields are marked *