The followint steps only apply for the following two types of Visual Studio projects:
Class Library (.NET Framework)
,WPF User Control Library (.NET Framework)
- Update Documentation and perform a check of the content for any erros (e.g. using MS Word)
- Update Changelog
- document new features
- document open issues that have a direct impact regarding the functionality
Add a "> Solved with Version x.x.x" mark at any open issue when it is solved in a later version.
- document solved bugs
- Simplify code
- remove unnecessary imports
- check autocompletion hints
- Build and release library
- configure project and nuget
- first setup:
- configure project > Tab Application:
- Assembly name
- Assembly information:
- Title
- Description
- Assembly version
- File version
- Neutral language
- set
Build > Configuration Manager
to Debug - run
Build > Build Solution
- for first setup:
- open
Tools > Command Line > Developer Command Prompt
- open folder in which the
.csproj
is located - run
nuget spec NameOfTheProject
- edit generated
NameOfTheProject.nuspec
<?xml version="1.0" encoding="utf-8"?> <package > <metadata> <id>$id$</id> <version>$version$</version> <title>$title$</title> <authors>...</authors> <requireLicenseAcceptance>true</requireLicenseAcceptance> <license type="file">LICENSE.md</license> <readme>docs\Documentation.md</readme> <projectUrl>https://.../</projectUrl> <description>$description$</description> <copyright>$copyright$</copyright> <tags>... ...</tags> </metadata> <files> <file src="..\..\LICENSE.md" target="" /> <file src="..\..\Documentation.md" target="docs\" /> </files> </package>
- insert
author
- set
<requireLicenseAcceptance>true</requireLicenseAcceptance>
- set
<license type="file">LICENSE.md</license>
- add
<readme>docs\Documentation.md</readme>
- remove empty
icon
line - set
projectUrl
- remove empty
releaseNotes
line - set
tags
separated by space - add
files
section from license and readme
- insert
- open
- configure project > Tab Application:
- subsequent updates:
- configure project > Tab Application:
- Assembly information: increase Assembly version and File version
- set
Build > Configuration Manager
to Debug - run
Build > Build Solution
- configure project > Tab Application:
- first setup:
- run
nuget pack
Packed .nupkg-file will be shown in console output
- test package locally
- open
Manage NuGet Packages
- open NuGet Settings (top right corner)
- add package source that points to the folder of the generated package
- install the package
- update the code and run the application
- open
- if expired, create a new API key: https://www.nuget.org/account/apikeys
- Glob Pattern:
*
- Glob Pattern:
- publish package:
- Prod:
dotnet nuget push someFile.nupkg --api-key someKey --source https://api.nuget.org/v3/index.json
- Prod:
- configure project and nuget
- Create Release in Repository
git checkout -b X.X.X-rc
- push new branch
- Github > Tags > Create a new Release
- Tag: "vX.X.X" -> set to create "on publish"
- Target branch: "X.X.X-rc"
- Title: "vX.X.X"
- Description: Copy from Changelog
- Files: add nuget package
Run once:
git remote add template https://github.com/Joschiller/Library_Project_Template
git fetch --all
git merge template/main --allow-unrelated-histories