Last active
June 6, 2022 08:00
-
-
Save kingofnull/784dd39d34099ebc1a7d0de75c66a4f0 to your computer and use it in GitHub Desktop.
NuGet package auto build dll and publish in Ms Windows and VS2019 using a batch file (set project name and api key then run it in project directory next to .csprj file)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
del *.nupkg | |
set API_KEY= <---API-KEY---> | |
set PRJ_FILE= <---Project-Name--->.csproj | |
REM nuget pack -Build "%PRJ_FILE%" -Symbols -IncludeReferencedProjects -properties Configuration=Release -Properties NoWarn=NU5128 | |
nuget pack -Build "%PRJ_FILE%" -IncludeReferencedProjects -properties Configuration=Release -Properties NoWarn=NU5128 | |
Nuget push *.nupkg -Source https://www.nuget.org/api/v2/package %API_KEY% | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<package > | |
<metadata> | |
<id>$id$</id> | |
<version>$version$</version> | |
<title>$title$</title> | |
<authors>MSS</authors> | |
<requireLicenseAcceptance>false</requireLicenseAcceptance> | |
<license type="expression">MIT</license> | |
<!-- <icon>icon.png</icon> --> | |
<!-- <projectUrl>http://project_url_here_or_delete_this_line/</projectUrl> --> | |
<description>$description$</description> | |
<!-- <releaseNotes>Summary of changes made in this release of the package.</releaseNotes> --> | |
<copyright>$copyright$</copyright> | |
<!-- <tags>Tag1 Tag2</tags> --> | |
<dependencies> | |
<group targetFramework=".NETFramework4.5" /> | |
</dependencies> | |
</metadata> | |
</package> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment