shayhatsor / zookeeper

Apache ZooKeeper .NET async Client
https://nuget.org/packages/ZooKeeperNetEx/
Apache License 2.0
236 stars 53 forks source link

build error,"netcoreapp1.0" is an unsupported framework. #8

Closed 24code closed 8 years ago

24code commented 8 years ago

hey shay. I download source,and build 'ZooKeeperNetEx' but have some build errors. like this "netcoreapp1.0" is an unsupported framework. ZooKeeperNetEx.Tests D:\githubProj\zookeeper\src\csharp\test\ZooKeeperNetEx.Tests\project.json 14 "netstandard13" is an unsupported framework. ZooKeeperNetEx D:\githubProj\zookeeper\src\csharp\src\ZooKeeperNetEx\project.json 34 I don't know where has wrong,can you help me?

shayhatsor commented 8 years ago

Right now, the code isn't easy to compile out of the box, since I'm always following Microsoft's pre releases of .NET Core. They make breaking changes from time to time, but several days ago RC2 was out: https://blogs.msdn.microsoft.com/dotnet/2016/05/16/announcing-net-core-rc2/

I'm working on aligning the build with the latest changes. I can ping you here when I'm done. In the meantime, make sure you have installed:

The code itself builds fine, the only thing I'm having problems with are the test projects. Hope this helps.

shayhatsor commented 8 years ago

@ShengboZhang, I've just finished upgrading to .NET Core RC2. Please pull latest commit in order to be able to build in Visual Studio. Update me if you're still having issues.

24code commented 8 years ago

hello,I have installed .net core rc2 and vs2015 update 2. but still failed,load project is failed,the notice is

D:\githubProj\zookeeper\src\csharp\src\ZooKeeperNetEx\ZooKeeperNetEx.xproj : error : The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. D:\githubProj\zookeeper\src\csharp\src\ZooKeeperNetEx\ZooKeeperNetEx.xproj

my computer don't exist this directory,should i install other things?

24code commented 8 years ago

May I suggest adding base requires to the readme,for example base environment requires(like lowest visual studio verison,necessary component)

shayhatsor commented 8 years ago

Hi @ShengboZhang, I took your advice and updated the Readme.md file to include build steps. Update me if you're still having issues, thanks for the suggestion.

24code commented 8 years ago

hi @shayhatsor ,why are you change .xproj file from "DNX\Microsoft.DNX.Props" to "DotNet\Microsoft.DotNet.Props"? my computer have no this directory,and I change to "DNX\Microsoft.DNX.Props",but still load fail. notic info

D:\githubProj\zookeeper\src\csharp\src\ZooKeeperNetEx\ZooKeeperNetEx.xproj : error : The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. D:\githubProj\zookeeper\src\csharp\src\ZooKeeperNetEx\ZooKeeperNetEx.xproj

shayhatsor commented 8 years ago

I changed the props and targets in the xproj files because I've upgraded from the now deprecated DNX which was relevant in .Net Core RC1, to DotNet which is relevant since .Net Core RC2. What you're missing is Microsoft .NET Core 1.0.0 RC2 - VS 2015 Tooling Preview 1 (I added it to the readme.md). You might have installed Microsoft .NET Core 1.0.0 RC2 - SDK Preview 1 which doesn't include the files needed to build in Visual Studio. To make sure this is correct, I've tested it locally. I removed Microsoft.DotNet.Props from c:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\ and then reinstalled Microsoft .NET Core 1.0.0 RC2 - VS 2015 Tooling Preview 1 which fixed the issue. I hope my explanation was helpful, ping me if you're still having issues.

shayhatsor commented 8 years ago

@ShengboZhang, after installing Microsoft .NET Core 1.0.0 RC2 - VS 2015 Tooling Preview 1, was the issue resolved ?

24code commented 8 years ago

@shayhatsor thank you also answer me so late. and install Microsoft .NET Core 1.0.0 RC2 - VS 2015 Tooling Preview 1, nuget references error is OK. but now ,have new error about zookeeper references error.

Severity Code Description Project File Line Suppression State Error CS0234 The type or namespace name 'data' does not exist in the namespace 'org.apache.zookeeper' (are you missing an assembly reference?) ZooKeeperNetEx D:\githubProj\zookeeper\src\csharp\src\ZooKeeperNetEx\zookeeper\Transaction.cs 4

loss org.apache.zookeeper.data and org.apache.zookeeper.proto namespace

shayhatsor commented 8 years ago

As noted in Readme.md, the first step for building from source is to install Apache Ant and run it on the root folder of the repository. It will generate the classes you're missing.

24code commented 8 years ago

I fllow the first strp in readme.md, I build the zookeeper using ant on linux. but not have any difference.

shayhatsor commented 8 years ago

well, I've never tried the codegen on Linux, always on windows. I'll try and see if there's a difference on Linux.

24code commented 8 years ago

hello,I run ant in windows,it's build success,thanks. I will learn the csharp source.