Skip to content
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

I cant compile c# 6 code easily without latest visual studio #4

Closed
slothbag opened this issue Feb 27, 2016 · 6 comments
Closed

I cant compile c# 6 code easily without latest visual studio #4

slothbag opened this issue Feb 27, 2016 · 6 comments

Comments

@slothbag
Copy link

Would be nice to take out the c# 6 syntax so Xamarin and Sharpdevelop and older VS can compile this library. At least until c# 6 is better supported.

@juanfranblanco
Copy link
Member

When moving to netstandard both universal and xamarin will be supported but first Linux windows and osx using core.

@slothbag
Copy link
Author

slothbag commented Mar 1, 2016

This is more a discussion on my own grasp of the new .Net world than a bug or request..

I have had no luck getting anything to run using the new dotnet coreclr / dnx / netstandard etc, as mentioned I was able to compile but then it didn't work with my old school .Net framework 4.5.2. Which is fine, the whole .Net is in flux right now.

I have written a build script which takes the sources of JsonRpc.Client & Nethereum and builds one Nethereum.dll with it all included internally. This also resolves another problem I had where JsonRpc.Client references an older Json.Net and my project uses the newer version.

I guess, is it worth me maintaining this setup as a forked repo with the changes following Nethereum and JsonRpc or should I just release Nethereum.dll as my own .Net Framework ready nuget package or have I wasted my time because I missed an obvious solution already :)

@juanfranblanco
Copy link
Member

Don't worry, the .net world is changing, and you are not the only one.. RC2 is supposed to be when everything will settle down. VS still uses dnx to compile hence the issues with .net cli as Json.net has not been ported to dotnet5x which will later be netstandardx.

For the time being if that works for you, specially with your setup go ahead. If you build your own, you will get fixes faster than via nugets ;)

Next nugets will target dotnet52, net451 and dnxcore50, so you should be able to use them.

@slothbag
Copy link
Author

slothbag commented Mar 8, 2016

For anyone without the latest VS, this nuget package Microsoft.Net.Compilers contains a recent build of the Roslyn compiler which supports c# 6 code. I use the latest stable 1.1.1

I have been using it to compile this library.

@slothbag slothbag closed this as completed Mar 8, 2016
@juanfranblanco
Copy link
Member

Thanks im putting an special XS Solution with autogenerated project

@juanfranblanco
Copy link
Member

Here is the solution for XS together with a quick utility to rebuild the project file
https://github.com/Nethereum/Nethereum/tree/master/Nethereum-XS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants