codaxy / xsd2

Improved version of xsd.exe
MIT License
34 stars 21 forks source link

Meirkr/upgrade to net sdk and expose xsd2 env by nuget #13

Closed meirkr closed 4 years ago

meirkr commented 4 years ago

Upgrade to .NET framework 4.7.1.

Using the new .NET SDK format for projects (like in .net Core/Standard).

Nuget will extern to the projects using the nuget, an environment variable which points to the exact location of the specific nuget in the private nuget cache folder. The csproj referncing the nuget could then, easily run xsd2 using that env variable csproj during build. It will ensure it always uses the correct version of the referenced xsd2 nuget.

Use the new format for nuget dependencies using ProjectReference rather than the old packages.config

Upgrade Fody and Mono nugets (Fody upgraded to most version possible in VS 2017. Fody 5.0 and later requires VS 2019, so we keep this project based on 2017)

mstijak commented 4 years ago

Hi @fubar-coder, @meirkr. Just to want to say that I have hard time following. I'll accept whatever you two agree on.

meirkr commented 4 years ago

@mstijak

Regardless to the example of managing the generated files, dicussed above, and which I have also improved already by another comit, that it will call xsd2.exe only to the xsd files which have changed rather than all... (That was all about the readme file only).

Please check about the other changes... Pay attention that it includes a solution of calling the exe file from the correct place. For example, when some project , at least if using the new .NET SDK in csproj (new .NET sdk format is used by default in .net core and .net standrd but also works with .net frameworks as target framework), the uget is restored into the user profile's folders. Under a specific folder based on the nuget release version. By this PR, it is very easy to call the exe using the environment variable that the nuget brings and exposes it out to the hosting project of this nuget. Meaning, each project will run the exact xsd2.exe version it is depended on. This magic of using environment variable to the tool path, is very common in many nuget packages.

Can you please approve this PR and publish a new nuget version, so I could start using it in my build environment as a client of this fantastic tool?

I'll really appriciate it.

mstijak commented 4 years ago

Published as 0.10.0. Thanks!