mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-24 01:39:08 +00:00
[csharp-netcore]: Fixing the build issues (#3681)
* fix(csharp-netcore): Fixing the build issues * fix(csharp-netcore): Fixing the build issues * fix(csharp-netcore): Fixing the Pet project * fix(csharp-netcore): help fixes
This commit is contained in:
committed by
William Cheng
parent
10a310ef69
commit
94eb6860aa
@@ -65,7 +65,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
|
||||
protected String modelDocPath = "docs/";
|
||||
|
||||
// Defines TargetFrameworkVersion in csproj files
|
||||
protected String targetFramework = defaultFramework.dotNetFrameworkVersion;
|
||||
protected String targetFramework = defaultFramework.name;
|
||||
|
||||
// Defines nuget identifiers for target framework
|
||||
protected String targetFrameworkNuget = targetFramework;
|
||||
@@ -470,7 +470,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
|
||||
}
|
||||
clientPackage = "Client";
|
||||
|
||||
String framework = (String) additionalProperties.getOrDefault(CodegenConstants.DOTNET_FRAMEWORK, defaultFramework.dotNetFrameworkVersion);
|
||||
String framework = (String) additionalProperties.getOrDefault(CodegenConstants.DOTNET_FRAMEWORK, defaultFramework.name);
|
||||
FrameworkStrategy strategy = defaultFramework;
|
||||
for (FrameworkStrategy frameworkStrategy : frameworkStrategies) {
|
||||
if (framework.equals(frameworkStrategy.name)) {
|
||||
@@ -481,7 +481,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
|
||||
strategy.configureAdditionalProperties(additionalProperties);
|
||||
|
||||
setTargetFrameworkNuget(strategy.getNugetFrameworkIdentifier());
|
||||
setTargetFramework(strategy.dotNetFrameworkVersion);
|
||||
setTargetFramework(strategy.name);
|
||||
|
||||
if (strategy != FrameworkStrategy.NETSTANDARD_2_0) {
|
||||
LOGGER.warn("If using built-in templates-RestSharp only supports netstandard 2.0 or later.");
|
||||
@@ -800,7 +800,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
|
||||
}
|
||||
|
||||
protected void configureAdditionalProperties(final Map<String, Object> properties) {
|
||||
properties.putIfAbsent(CodegenConstants.DOTNET_FRAMEWORK, this.dotNetFrameworkVersion);
|
||||
properties.putIfAbsent(CodegenConstants.DOTNET_FRAMEWORK, this.name);
|
||||
|
||||
// not intended to be user-settable
|
||||
properties.put(TARGET_FRAMEWORK_IDENTIFIER, this.getTargetFrameworkIdentifier());
|
||||
|
||||
Reference in New Issue
Block a user