-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnuget.bat
More file actions
32 lines (23 loc) · 993 Bytes
/
nuget.bat
File metadata and controls
32 lines (23 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@echo off
reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath > nul 2>&1
if ERRORLEVEL 1 goto MissingMSBuildRegistry
for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath') do SET MSBUILDDIR=%%B
IF NOT EXIST "%MSBUILDDIR%" goto MissingMSBuildToolsPath
IF NOT EXIST "%MSBUILDDIR%msbuild.exe" goto MissingMSBuildExe
"%MSBUILDDIR%msbuild.exe" /version
"%MSBUILDDIR%msbuild.exe" Configgy.CommandLineParser.sln /p:Configuration=Release
.\nuget.exe pack Configgy.CommandLineParser\Configgy.CommandLineParser.csproj -Prop Configuration=Release
:Exit
pause
exit
::ERRORS
::---------------------
:MissingMSBuildRegistry
echo Cannot obtain path to MSBuild tools from registry
goto Exit
:MissingMSBuildToolsPath
echo The MSBuild tools path from the registry '%MSBUILDDIR%' does not exist
goto Exit
:MissingMSBuildExe
echo The MSBuild executable could not be found in '%MSBUILDDIR%'
goto Exit