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

Notification

Icon
Error

2 Pages12>
NCrunch failing to build .net core projects
jsheetzati
#1 Posted : Friday, January 26, 2018 5:23:57 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/26/2018(UTC)
Posts: 3

Hello,

I am having an issue where ncrunch is failing to build my .net core projects. Haven't been able to find anything online regarding this particular issue.

Anyone else run into this before? Currently, I am running VS 2017 15.6.0 Preview 3.

Error Screenshot: https://ibb.co/bCsgRw
Remco
#2 Posted : Saturday, January 27, 2018 2:09:29 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for sharing this problem.

This looks like a new one. I wonder if it's related to the preview build. Does compatibility mode make any difference here?
jsheetzati
#3 Posted : Sunday, January 28, 2018 11:17:18 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/26/2018(UTC)
Posts: 3

Tried using all the settings in the link but still the same error.
Remco
#4 Posted : Sunday, January 28, 2018 11:47:25 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks for confirming. Are you able to build a sample project that can produce the error (something you can share with me)? You can submit zipped code through the contact form.

If you have a non preview build of VS2017 installed, I'd also be interested to know if the same project works correctly on the non-preview build.
Der-Albert.com
#5 Posted : Monday, January 29, 2018 8:35:15 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 38 time(s) in 35 post(s)
Have the same message, worked with Preview 2.0.
Der-Albert.com
#6 Posted : Monday, January 29, 2018 8:40:32 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 38 time(s) in 35 post(s)
Local 15.6 Preview 3.0, some projets are not building with the error in the screenshot. On my Grid Node i have still 15.6 Preview 2.0 on this same same solution builds and run.
jsheetzati
#7 Posted : Monday, January 29, 2018 5:53:38 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/26/2018(UTC)
Posts: 3

I can also confirm that the solution built okay with 15.6 Preview 2.0 as well. I installed 15.5 this morning, and everything works as expected. I will stay on this version in the mean time.
Remco
#8 Posted : Monday, January 29, 2018 11:09:36 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks, we're looking into this now. I recommend sticking with 15.5 until this problem is resolved (by either us or MS).
michaelkroes
#9 Posted : Tuesday, January 30, 2018 3:36:24 PM(UTC)
Rank: NCrunch Developer

Groups: Registered
Joined: 9/22/2017(UTC)
Posts: 280
Location: Netherlands

Thanks: 124 times
Was thanked: 63 time(s) in 60 post(s)
I've tried to reproduce this in a test project. I've updated my visual studio to the latest preview build and created a classlibrary targetting netcore 2.0. I've added a NUnit3 test to that. NCrunch and VS are still able to build that solution.

Can someone help me out and reproduce this with a small test project? (Or report the steps taken)
Der-Albert.com
#13 Posted : Thursday, February 8, 2018 9:50:53 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 38 time(s) in 35 post(s)
Still a problem with 15.6 Preview 4.0
Der-Albert.com
#10 Posted : Thursday, February 8, 2018 10:03:14 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 38 time(s) in 35 post(s)
michaelkroes;11737 wrote:
Can someone help me out and reproduce this with a small test project? (Or report the steps taken)

Will do that.
Der-Albert.com
#11 Posted : Thursday, February 8, 2018 1:10:35 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 38 time(s) in 35 post(s)
michaelkroes;11737 wrote:
Can someone help me out and reproduce this with a small test project? (Or report the steps taken)


File New Project=> .NET Core => ASP.NET Web Application => MVC (Not Authentication) => Enable NCrunch

Build Failue
Quote:

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
NCrunch: This project was built on server '(local)'
..\..\..\Program Files\dotnet\sdk\2.1.100-preview-007354\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets (155, 5): The "GenerateRuntimeConfigurationFiles" task failed unexpectedly.
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Newtonsoft.Json.Utilities.DynamicReflectionDelegateFactory.GenerateCreateSetPropertyIL(PropertyInfo propertyInfo, ILGenerator generator)
bei Newtonsoft.Json.Utilities.DynamicReflectionDelegateFactory.CreateSet[T](PropertyInfo propertyInfo)
bei Newtonsoft.Json.Utilities.ReflectionDelegateFactory.CreateSet[T](MemberInfo memberInfo)
bei Newtonsoft.Json.Serialization.DefaultContractResolver.SetExtensionDataDelegates(JsonObjectContract contract, MemberInfo member)
bei Newtonsoft.Json.Serialization.DefaultContractResolver.CreateObjectContract(Type objectType)
bei Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType)
bei Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type)
bei Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
bei Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
bei Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
bei Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
bei Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
bei Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteToJsonFile(String fileName, Object value)
bei Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteRuntimeConfig(ProjectContext projectContext)
bei Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.ExecuteCore()
bei Microsoft.NET.Build.Tasks.TaskBase.Execute()
bei Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
bei Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()




michaelkroes
#12 Posted : Thursday, February 8, 2018 2:01:57 PM(UTC)
Rank: NCrunch Developer

Groups: Registered
Joined: 9/22/2017(UTC)
Posts: 280
Location: Netherlands

Thanks: 124 times
Was thanked: 63 time(s) in 60 post(s)
Der-Albert.com;11765 wrote:
michaelkroes;11737 wrote:
Can someone help me out and reproduce this with a small test project? (Or report the steps taken)


File New Project=> .NET Core => ASP.NET Web Application => MVC (Not Authentication) => Enable NCrunch

Build Failue
Quote:

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
NCrunch: This project was built on server '(local)'
..\..\..\Program Files\dotnet\sdk\2.1.100-preview-007354\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets (155, 5): The "GenerateRuntimeConfigurationFiles" task failed unexpectedly.
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Newtonsoft.Json.Utilities.DynamicReflectionDelegateFactory.GenerateCreateSetPropertyIL(PropertyInfo propertyInfo, ILGenerator generator)
bei Newtonsoft.Json.Utilities.DynamicReflectionDelegateFactory.CreateSet[T](PropertyInfo propertyInfo)
bei Newtonsoft.Json.Utilities.ReflectionDelegateFactory.CreateSet[T](MemberInfo memberInfo)
bei Newtonsoft.Json.Serialization.DefaultContractResolver.SetExtensionDataDelegates(JsonObjectContract contract, MemberInfo member)
bei Newtonsoft.Json.Serialization.DefaultContractResolver.CreateObjectContract(Type objectType)
bei Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType)
bei Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type)
bei Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
bei Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
bei Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
bei Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
bei Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
bei Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteToJsonFile(String fileName, Object value)
bei Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteRuntimeConfig(ProjectContext projectContext)
bei Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.ExecuteCore()
bei Microsoft.NET.Build.Tasks.TaskBase.Execute()
bei Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
bei Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()






Thank you for this! I've got it reproduced and will look into it.
Der-Albert.com
#14 Posted : Friday, February 9, 2018 5:11:08 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 38 time(s) in 35 post(s)
JFI. 15.6 Preview 4 seems the be the last preview of 15.6.
adrianvinca
#15 Posted : Monday, February 12, 2018 11:37:19 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/12/2018(UTC)
Posts: 1
Location: United States of America

Hi,
I took a look at this issue and I wonder if it could be casued by an older bug in Newtonsoft.Json that was fixed a few years ago:
https://github.com/James...tonsoft.Json/issues/508

From what I see, NCrunch bundles a copy of Newtonsoft.Json.dll 6.0.8.18111 which may explain this issue (I used the manual installation instructions).

Thanks,
Adrian Vinca
Software Engineer - Microsoft Visual Studio IDE
Remco
#16 Posted : Tuesday, February 13, 2018 1:26:17 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Adrian,

Thanks for taking the time to post here! You are absolutely correct. We had, actually, just a couple of hours earlier arrived at the exact same conclusion ourselves and we're in the process of fixing the problem. Including 3rd party assemblies in the NCrunch build system is something we should be trying to avoid anyway (for these kinds of reasons), so we're taking steps to remove the dependency. We should have a fix for this coming in NCrunch v3.13.

My assumption is that replacing NCrunch's packaged copy of Newtonsoft.Json in an installation of NCrunch would probably work around the problem if waiting for v3.13 isn't an option (note: I haven't yet tested this).
Der-Albert.com
#17 Posted : Tuesday, February 13, 2018 8:35:41 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 38 time(s) in 35 post(s)
Remco;11790 wrote:
My assumption is that replacing NCrunch's packaged copy of Newtonsoft.Json in an installation of NCrunch would probably work around the problem if waiting for v3.13 isn't an option (note: I haven't yet tested this).

Your assumption seems right, I replaced Newtonsoft.Json with the current 10.0.3 Version (net45) and quick test builds the complete solution and runs all tests.
1 user thanked Der-Albert.com for this useful post.
Remco on 2/13/2018(UTC)
Der-Albert.com
#18 Posted : Tuesday, February 13, 2018 10:10:57 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 38 time(s) in 35 post(s)
Btw. the Grid Node Server does not have this problem. I've updated to 15.6 Preview 4 on the Grid Node (no NCrunch installed in VS), and swapped the Newtonsoft.Json in the Install Folder of the Grid Node.

Quote:
NCrunch: This project was built on server 'DELL-E-6420'
NCrunch: The tests in this project were discovered on server 'DELL-E-6420'

An error occurred while analysing this project after it was built: NCrunch encountered an unexpected error occurred while building an environment to analyse an assembly: System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
at nCrunch.Compiler.ProjectAssetsJson.FindRuntimeAssemblies(String platformName, String packageName, String packageVersion)
at nCrunch.Core.PlatformTypes.DotNetClassicPlatformType.GetRuntimeAssemblyReference(SnapshotComponent component, FilePath reference)
at nCrunch.Core.TestManagement.TestProcessReferenceResolver.ResolveReferencesForTestProcess(SnapshotComponent primaryComponent, IList`1 allComponentsInProcess)
at nCrunch.Core.TestManagement.TestRunnerProcess.()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.TestManagement.TestRunnerProcess.LoadTestRunnerProcessForProjectReturningProcessId(SnapshotComponent snapshotComponent, IList`1 componentsInProcess, TestFrameworkDescription[] testingFrameworks, Nullable`1 newProcessTag, FilePath solutionFilePath, GridClientId client, CustomEnvironmentVariable[] customEnvironmentVariables)
at nCrunch.Core.Processing.AnalysisTaskLogic.DoProcessTaskAndReturnSuccessFlag()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


Ok, switched back to the old one and it still worked.

It worked with Preview 2.0, I did not check if it works after the Update to Preview 4.0, i directly switched to a newer NewtonSoft.Json.
Der-Albert.com
#19 Posted : Tuesday, February 13, 2018 12:38:56 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 38 time(s) in 35 post(s)
Sadly, that it works in the Grid Node is not enterly true. It depends on the Project. Same error as in VS (which makes more Sense that my described behavior)
Remco
#20 Posted : Wednesday, February 14, 2018 2:56:10 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Users browsing this topic
Guest
2 Pages12>
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.123 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download