Closed beatcracker closed 7 years ago
@beatcracker thanks for reporting the issue. Please file a PR with the suggested fix when you've time and we'll review accordingly.
grep -rE 'http(s|)://nuget\.org/nuget\.exe' ./modules/
modules/swagger-codegen/src/main/resources/csharp/compile-mono.sh.mustache:wget -nc https://nuget.org/nuget.exe;
modules/swagger-codegen/src/main/resources/csharp/compile.mustache:if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')"
modules/swagger-codegen/src/main/resources/csharp/mono_nunit_test.mustache:wget -nc https://nuget.org/nuget.exe
modules/swagger-codegen/src/main/resources/csharp/mono_nunit_test.mustache:wget -nc https://nuget.org/nuget.exe
modules/swagger-codegen/src/main/resources/CsharpDotNet2/compile-mono.sh.mustache:wget -nc https://nuget.org/nuget.exe;
NuGet 2.x users Because there are a few breaking changes introduced in NuGet 3.2, https://nuget.org/nuget.exe points to the latest stable NuGet 2.x release to prevent CI systems from potentially breaking at this time.
Assuming that we wouldn't hit any compatibility issues:
https://nuget.org/nuget.exe
-> https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
With fallback:
https://nuget.org/nuget.exe
by default, try to catch errors during the build. If there are eny errors, try to self-update nuget.exe update -self
and rebuild.
Description
Building C# client using
build.bat
script fails with error:Swagger-codegen version
Swagger declaration file content or url
Any declaration will do. I'm using this swagger.yaml for XKCD.
Command line used for generation
Steps to reproduce
build.bat
Suggested fix
If
nuget.exe
doesn't exist in current directory,build.bat
downloads it fromhttps://nuget.org/nuget.exe
, which has NuGet v.2.8.60717.93
.Replacing
nuget.exe
with v.4.1.0
downloaded from https://dist.nuget.org/win-x86-commandline/latest/nuget.exe fixes this issue.