0
我正在嘗試使用swagger-codegen來生成.NET Core的寵物商店示例。當我嘗試生成項目,我看到這個錯誤:Swagger-codegen:錯誤構建.NET Core的寵物商店示例
/home/username/test/src/IO.Swagger/IO.Swagger.xproj(7,5): error MSB4019:
The imported project "/usr/share/dotnet/sdk/1.0.4/Microsoft/VisualStudio/v14.0/
DotNet/Microsoft.DotNet.Props"
was not found. Confirm that the path in the <Import> declaration is correct,
and that the file exists on disk.
我是跑的具體步驟:
$ java -jar swagger-codegen-cli.jar generate -i
http://petstore.swagger.io/v2/swagger.json -l aspnetcore -o test/
$ cd test/
$ chmod +x build.sh
$ ./build.sh
版本:
$ dotnet --version
1.0.4
$ java -jar swagger-codegen-cli.jar version
2.2.3
它看起來像產生.NET核心項目與我正在使用的.NET核心版本不兼容。我怎樣才能輕鬆更新生成的項目,使其工作?