Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

project using project.json can't find `system.net.http`
moswald
#1 Posted : Wednesday, November 30, 2016 3:30:18 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/31/2012(UTC)
Posts: 16
Location: Austin, TX

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
This is the entire project.json file:

Code:
{
  "dependencies": {
    "System.Collections.Immutable": "1.2.0",
    "System.Net.Http": "4.0.0"
  },
  "frameworks": {
    "net461": {}
  },
  "runtimes": {
    "win": {},
    "win-x64": {} 
  }
}


It builds fine in VS2015, and it builds fine using our Cake build script on the build server. However, NCrunch fails when building:

Code:
Http\XHeaderProviderHandler.cs (3, 22): The type or namespace name 'Http' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)
Http\XHeaderProviderHandler.cs (15, 51): The type or namespace name 'DelegatingHandler' could not be found (are you missing a using directive or an assembly reference?)
Http\XHeaderProviderHandler.cs (28, 64): The type or namespace name 'HttpRequestMessage' could not be found (are you missing a using directive or an assembly reference?)
Http\XHeaderProviderHandler.cs (28, 33): The type or namespace name 'HttpResponseMessage' could not be found (are you missing a using directive or an assembly reference?)
Http\XHeaderProviderHandler.cs (28, 54): 'XHeaderProviderHandler<TValue>.SendAsync(HttpRequestMessage, CancellationToken)': no suitable method found to override


If it matters, the project is x64 only.
Remco
#2 Posted : Wednesday, November 30, 2016 6:57:56 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,996

Thanks: 932 times
Was thanked: 1258 time(s) in 1171 post(s)
Hi,

Support for .NET Core isn't here yet with NCrunch unfortunately. Although the release of the tooling for this a week ago now makes it possible for NCrunch to support this, some development is still required. Likely it will be available in January.
moswald
#3 Posted : Wednesday, November 30, 2016 8:20:37 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/31/2012(UTC)
Posts: 16
Location: Austin, TX

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Hrm. This isn't a .NET Core library, though. It's just using `project.json` as the nuget source. I thought at one point this was working, but maybe I'm misremembering.
Remco
#4 Posted : Wednesday, November 30, 2016 10:29:01 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,996

Thanks: 932 times
Was thanked: 1258 time(s) in 1171 post(s)
moswald;9448 wrote:
Hrm. This isn't a .NET Core library, though. It's just using `project.json` as the nuget source. I thought at one point this was working, but maybe I'm misremembering.


Ahh, sorry. I misunderstood. Does a restore packages and rebuild work correctly? Does the project build correctly under NCrunch in VS2015?

There haven't been any significant steps in NCrunch to support project.json. But if this was something that used to work but no longer works, then it may warrant some investigation.
moswald
#5 Posted : Wednesday, November 30, 2016 11:35:17 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/31/2012(UTC)
Posts: 16
Location: Austin, TX

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
It restores and builds properly from within VS2015, but NCrunch 3 does not build it. I'm fairly certain this project was working fine under v2.4, but I'll have to wait until tomorrow to test that out.
Remco
#6 Posted : Thursday, December 1, 2016 2:30:31 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,996

Thanks: 932 times
Was thanked: 1258 time(s) in 1171 post(s)
moswald;9450 wrote:
It restores and builds properly from within VS2015, but NCrunch 3 does not build it. I'm fairly certain this project was working fine under v2.4, but I'll have to wait until tomorrow to test that out.


Thanks. I'm keen to hear how this goes.
moswald
#7 Posted : Thursday, December 1, 2016 5:08:25 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/31/2012(UTC)
Posts: 16
Location: Austin, TX

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Yes, NCrunch 2.4 builds the project properly, but 3.1 does not.
Remco
#8 Posted : Thursday, December 1, 2016 6:03:04 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,996

Thanks: 932 times
Was thanked: 1258 time(s) in 1171 post(s)
moswald;9464 wrote:
Yes, NCrunch 2.4 builds the project properly, but 3.1 does not.


Thanks for confirming this. I'll look into this on my side to see what I can find. Can you confirm that the project.json file is copied into the NCrunch workspace?

Edit: Is it also possible for you to share a sample project that can reproduce this problem? With a basic Nuget project.json setup on my side, NCrunch seems to be building correctly.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.042 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download