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

Notification

Icon
Error

Ensure that restore has run and that you have included 'netcoreapp2.0'
IanBowyer
#1 Posted : Thursday, June 21, 2018 7:45:55 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/21/2018(UTC)
Posts: 2
Location: United Kingdom

Hi

I am having problem setting up ncrunch on a new project.

I have setup a new solution which is a dotnet core 2.0 web api
I have created a test project which only has a test in with "Assert.Pass" but as NCrunch is initialising it shows a load status of "Load Failure" with the following message in the description

"Ensure that restore has run and that you have included 'netcoreapp2.0' in the TargetFrameworks for your project."

I have checked that the projects are using netcoreapp2.0 and also the project.assets.json


Here is the full exception

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:
Assets file 'C:\Users\ian\Source\ic8-cloud\ic8-cloud\Ic8.Cloud.EndpointTests\obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v2.0'. Ensure that restore has run and that you have included 'netcoreapp2.0' in the TargetFrameworks for your project.
at nCrunch.Compiler.RemoteBuildRunner.(FilePath , LoadTimeQuery , String , String , DirectoryPath , String , String )
at nCrunch.Compiler.RemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
--- 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.(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(ComponentLoadParameters parameters)
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 , Nullable`1 , GridAddress )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(ComponentLoadParameters parameters, IList`1 customEnvironmentVariables)
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(ProcessorArchitecture , String )
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, VisualStudioVersion vsVersion, ComponentUniqueName componentName, TaskSettings componentTaskSettings, Exception parseException, String targetFramework)


Any ideas what I am missing?

Remco
#2 Posted : Thursday, June 21, 2018 10:34:17 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,373

Thanks: 705 times
Was thanked: 878 time(s) in 835 post(s)
Hi, thanks for sharing this issue.

This can happen sometimes if the underlying platform gets itself in a bind and ends up out of sync. Try the following:

1. Close all instances of VS
2. Remove the contents of your 'bin' and 'obj' directories in ALL related projects
3. Restart VS and open the solution
4. VS should perform a package restore and regenerate the project.assets.json file
5. Start NCrunch. Hopefully things should work now
IanBowyer
#3 Posted : Monday, July 2, 2018 9:01:52 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/21/2018(UTC)
Posts: 2
Location: United Kingdom

I tried the above and had no luck...

I was using an old version so I decided to try the 30 day trial of the latest version, which worked ok.

I have updated to the latest version and all is working ok now :)
Remco
#4 Posted : Monday, July 2, 2018 9:32:16 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,373

Thanks: 705 times
Was thanked: 878 time(s) in 835 post(s)
IanBowyer wrote:

I was using an old version so I decided to try the 30 day trial of the latest version, which worked ok.


Ahh, that makes sense. .NET Core has been moving very quickly, so I definitely recommend keeping your NCrunch updated if you're working on this platform. Thanks for taking the time to confirm that the problem is solved for you :)
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.051 seconds.