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

Notification

Icon
Error

Issue Building .NET Core Project in VS2017 with 3.3
jbarket
#1 Posted : Wednesday, January 18, 2017 4:37:48 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/18/2017(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
Having some issues getting my .NET Core projects to build. I get the following error after enabling NCrunch:

Quote:
System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Errors occurred while trying to load the project file:
Your project is not referencing the ".NETFramework,Version=v4.0" framework. Add a reference to ".NETFramework,Version=v4.0" in the "frameworks" section of your project.json, and then re-run NuGet restore.
at nCrunch.Compiler.RemoteBuildRunner.(FilePath ,   , String , String , DirectoryPath , String )
at nCrunch.Compiler.RemoteBuildRunner.AnalyseComponentBuild(FilePath projectFilePath, BuildXml buildXml, String useBuildConfiguration, String useBuildPlatform, DirectoryPath solutionDir, String solutionName, List`1 importExpressionsToEvaluate, ProcessorArchitecture buildProcessProcessorArchitecture, DirectoryPath workspaceBasePath)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.(CallMethodMessage )
at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data)
at nCrunch.TaskRunner.Ipc.RemoteInstance.[T](Byte[] )
at nCrunch.TaskRunner.Ipc.RemoteInstance.Invoke(IMessage msg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at nCrunch.Compiler.IRemoteBuildRunner.AnalyseComponentBuild(FilePath projectFilePath, BuildXml buildXml, String useBuildConfiguration, String useBuildPlatform, DirectoryPath solutionDir, String solutionName, List`1 importExpressionsToEvaluate, ProcessorArchitecture buildProcessProcessorArchitecture, DirectoryPath workspaceBasePath)
at nCrunch.Core.BuildManagement.BuildProcessLauncher..(IRemoteBuildRunner )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , FilePath , String , ExternalProcess )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , ProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(FilePath projectFilePath, BuildXml buildXml, String useBuildConfiguration, String useBuildPlatform, DirectoryPath solutionDir, String solutionName, List`1 importExpressionsToEvaluate, ProcessorArchitecture processorArchitecture, VisualStudioVersion vsVersion, IList`1 customEnvironmentVariables)
at nCrunch.Client.ComponentLoader.SnapshotComponentFactory.(ProcessorArchitecture )
at nCrunch.Client.ComponentLoader.SnapshotComponentFactory.CreateSnapshotComponentFromXml(FilePath projectFilePath, BuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, VisualStudioVersion vsVersion)


They're using csproj, not project.json, and I'm targeting netstandard1.4. What am I missing here?
jbarket
#2 Posted : Wednesday, January 18, 2017 5:01:39 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/18/2017(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
Just read the support notes about the priority of this for 3.3. That's no problem. If this is something I can fix on my end, or I can provide information to help debug, let me know. Otherwise, I'll go back to waiting patiently.
Remco
#3 Posted : Wednesday, January 18, 2017 11:07:51 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for sharing this issue.

As you've discovered, .NET Core build support is still a work in progress. Though I'd really like to know more about this problem to make sure it's properly handled in the next release. Is there any chance you could share with me the non-source components of your .csproj and project.json files? I'd like to be able to recreate this so I can investigate further.
jbarket
#4 Posted : Wednesday, January 18, 2017 11:11:28 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/18/2017(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
Absolutely. Is there somewhere I can email these instead of tossing them up here?
Remco
#5 Posted : Wednesday, January 18, 2017 11:19:09 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
Sure, just put them through the contact form at https://www.ncrunch.net/support/contact. I only need the structural parts of these files to figure out how to produce the problem. Any domain related elements you a very welcome to remove if you are concerned about IP.
Remco
#6 Posted : Sunday, January 22, 2017 3:59:36 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
jbarket
#7 Posted : Sunday, January 22, 2017 5:06:52 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/18/2017(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
I think we're getting somewhere. I'm getting an error on a few projects, but it seems to be related to this issue: https://github.com/dotnet/sdk/pull/478

I'm going to update the projects with problems with deep references and see if I can get them to build. I'll let you know how it turns out.
jbarket
#8 Posted : Sunday, January 22, 2017 6:11:58 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/18/2017(UTC)
Posts: 7
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
Less sure about that now. I've taken the two simplest projects in the solution. The first one has no other project dependencies and built fine in NCrunch out of the box. The other threw the error I'm seeing. I duplicated all nuget references directly into the other project so that there's no way it's using any transitive project references that I can see. Same error, even after unloading/reloading, etc.

I'm going to keep playing with it, but it may still be a genuine issue.

Here's the error:

NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/d...ng_project-build-issues
..\..\..\..\..\..\Users\jbarket\.nuget\packages\microsoft.net.sdk\1.0.0-alpha-20161104-2\build\Microsoft.NET.Sdk.targets (77, 5): The "GenerateDepsFile" task failed unexpectedly.
System.Exception: Could not find valid a SingleProjectInfo for project 'C:\Users\jbarket\AppData\Local\NCrunch\7216\2\Development\redacted\Shared.Data\Shared.Data.csproj'
at Microsoft.NET.Build.Tasks.DependencyContextBuilder.GetProjectInfo(LockFileLibrary library)
at Microsoft.NET.Build.Tasks.DependencyContextBuilder.GetLibrary(LockFileTargetLibrary export, LockFileLookup libraryLookup, IDictionary`2 dependencyLookup, Boolean runtime)
at Microsoft.NET.Build.Tasks.DependencyContextBuilder.<>c__DisplayClass19_0.<GetLibraries>b__0(LockFileTargetLibrary export)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Enumerable.<CastIterator>d__94`1.MoveNext()
at System.Linq.Enumerable.<ConcatIterator>d__58`1.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Microsoft.Extensions.DependencyModel.DependencyContext..ctor(TargetInfo target, CompilationOptions compilationOptions, IEnumerable`1 compileLibraries, IEnumerable`1 runtimeLibraries, IEnumerable`1 runtimeGraph)
Remco
#9 Posted : Monday, January 23, 2017 7:52:15 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks! I've managed to reproduce this. It looks to be related to how .NET Core handles project references.

I have a few other improvements for the .NET Core support in the works. I'll try to get a fix out with these later in the week.
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.067 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download