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.

<package >
<releaseNotes>My project release notes</releaseNotes>
<copyright>Copyright 2016</copyright>
<tags>tag1 tag2</tags>

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 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,590 thoughts on “Tworzenie paczek NuGet”

  1. 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.

  2. 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.

  3. 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

  4. 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).

  5. 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.

  6. 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.

  7. 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!

  8. 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!

  9. 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.

  10. 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!

  11. 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!

  12. 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.

  13. 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!

  14. 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.

  15. 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!

  16. 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!

  17. 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.

  18. 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

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

  20. 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.

  21. 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.

  22. 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.

  23. 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.

Leave a Reply