Closed lacroixdavid1 closed 4 years ago
It seems like you have your project set to use .net core 2.0.0, not 3.1. Check your project.csproj and set the version to 3.1.
I have myself a project running on .net core 3.1 and this lib runs just fine
The problems come form this library csproj file. It still references netcore 2.0. Bumping the net core version in this library csproj file fixes it.
See https://github.com/svenheden/csharp-models-to-typescript/blob/master/lib/csharp-models-to-json/csharp-models-to-json.csproj it still uses net core 2.0.
It probably works on your local setup because it is possible to install multiple net core version to have the ability to build projects using different versions.
Could you please bump your your netcore dependency in the library csproj? My project is using 3.1.
This library was also working fine on my setup until I reformat it and only install net core 3.1. Before formatting, I had both 2.0 and 3.1 installed. I don't want to install net core 2.0 only for this library.
This lib is awesome, I also don't want to fork it only for that reason.
Please merge this PR https://github.com/svenheden/csharp-models-to-typescript/pull/44 and publish on NPM.
Actually bumping up the version to 3.1 will affect people that have lower SDK versions.
You'll have to find a solution that solves your issue and don't affect other people using the lib, like use .net core standard (which idk if it's possible for this lib, I didn't check all of the dependencies) or detecting the framework version, something along those lines.
You'll have to find a solution that solves your issue and don't affect other people using the lib, like use .net core standard (which idk if it's possible for this lib, I didn't check all of the dependencies) or detecting the framework version, something along those lines.
@vanilsonbr netstandard target is only used for libraries, for executable we need to target netcoreapp, but instead just changing to new version, we can use multiple targets, in this link there is more details on how to do that https://docs.microsoft.com/pt-br/dotnet/standard/frameworks
I don't want to waste my time on this. Got a solution working locally.
Am I missing something of is it impossible to use this tool using only Net Core 3 installed? I am getting the following output trying to run the code. Huge thanks I appreciate that library.