[BUG] [csharp-netcore]: Failing to load the project
Created by: saigiridhar21
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
- Visual studio is failing to load the SDK client project which is generated for
netstandard2.0. -
netcoreapp's test project is missingxunitrelated dependencies. - When no
targetFrameworkis provided, openapi-generator is pickingv4.6.1as default. It should benetstandard2.0. - Removed the hard-coded paths of
NETStandard.Library.2.0.3in the csproj files.
openapi-generator version
4.1.0
OpenAPI declaration file content or url
Command line used for generation
Use PetStore project to check.
Steps to reproduce
Open Petstore project(generated for netstandard2.0) on visual studio and it will fail to load the client project stating that it needs migration.
Related issues/PRs
Suggest a fix
- Fix the
Project.mustacheas per the standards ofnetstandard. - Fix the
netcoreapp's test project to includexunitrelated dependencies. - Update the default value to
netstandard2.0when user doesn't providetargetFrameworkoption.