-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port to .net core #8
Comments
Hi Ruskin, Thanks for your interest in this project! I would be interested in a ,.net core version of this. However, I would want the .net 4.x and .net core versions to share the code. That is, no duplication of source files. Otherwise, any maintenance of the source code becomes a lot more time consuming. I looked at your repo for a few minutes, but couldn't figure out whether it involved duplicating the source files. Matt |
Unfortunately yes I have duplicated the files as they reside in a different namespace. I can convert them to a shared links but eventually .net core will deviate and you might end up having some duplicates and some not which might be worse than having all duplicates. Let's leave it as a fork then until we can come up with a better solution?! :) |
Actually I lie, they do have the same namespace! So maybe I can try sharing them? And see how long we can do that until code deviates? |
Have a look at my package JSNLog. It has the same problem - needs a .net 4.x version and a core version: Looking at jsnlog.csproj, you'll see it is a core style csproj (short, contains the nuget package definitions). That file is used to generate the nuget package for the core version. I use a powershell script to build and publish the entire jsnlog eco system. The relevant bit that builds the 2 nuget packages is ($version contains the version number):
` In case you need different code for 4.x and core versions, have a look at these lines in the jsnlog.csproj: Those variables are used in #if statements in the jsnlog code base. For your core version of semantictypes, you could follow the same idea. You'd need to include a build script that takes care of building both the 4.x and core packages. Lastly, please pull the latest jsnlog code. I just implemented a pull request to support XML serialization. |
Can we just not port this to .net standard? |
Hi, I have ported this solution to .net core. Please visit my fork, if you are happy with it's structure then I can create a PR and you can publish this to your Nuget feed?
https://github.com/ruskindantra/semantictypes/releases/tag/v0.0.1-dotnetcore
Regards,
Ruskin
The text was updated successfully, but these errors were encountered: