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

Notification

Icon
Error

.NET framework 4.6.1
mjmckp
#1 Posted : Monday, December 7, 2015 10:05:47 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/13/2015(UTC)
Posts: 10
Location: Australia

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
I've updated my projects to target .NET framework 4.6.1, and NCrunch builds the tests but fails to run them, giving the error:

Quote:
An error occurred while analysing this project after it was built: System.BadImageFormatException: Could not load file or assembly 'file:///C:\MyProject\bin\Debug\MyProject.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
File name: 'file:///C:\Users\User\AppData\Local\NCrunch\8880\155\MyProject\bin\Debug\MyProject.dll'
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(TestFrameworkDescription[] applicableFrameworks, ComponentUniqueName testComponentUniqueName)


Is there some NCrunch configuration setting I need to change, or does this require an updated version of NCrunch?

Cheers
Remco
#2 Posted : Monday, December 7, 2015 10:12:39 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks or sharing this.

I had thought that 4.6.1 was an over-the-top replacement for 4.6, but it looks like it's a whole new version of the framework that will need its own task runner. This means to get 4.6.1 to run inside your test environment, we'll need to add a new task runner to NCrunch.

I'll ensure this is in the next release. For the time being, I recommend sticking with v4.6 on your test projects.
1 user thanked Remco for this useful post.
mjmckp on 12/7/2015(UTC)
plillevold
#4 Posted : Sunday, December 13, 2015 12:03:53 AM(UTC)
Rank: Member

Groups: Registered
Joined: 2/1/2013(UTC)
Posts: 11
Location: Norway

Thanks: 6 times
Was thanked: 1 time(s) in 1 post(s)
Just a note on the "sticking with v4.6 on your test projects", this will require that your main projects are v4.6 as well, since v4.6 projects are not able to reference v4.6.1 projects.

- Peter
1 user thanked plillevold for this useful post.
Remco on 12/13/2015(UTC)
Gamefaster
#3 Posted : Wednesday, December 30, 2015 9:20:14 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/30/2015(UTC)
Posts: 7
Location: United Kingdom

Thanks: 1 times
Remco;8119 wrote:
Hi, thanks or sharing this.

I had thought that 4.6.1 was an over-the-top replacement for 4.6, but it looks like it's a whole new version of the framework that will need its own task runner. This means to get 4.6.1 to run inside your test environment, we'll need to add a new task runner to NCrunch.

I'll ensure this is in the next release. For the time being, I recommend sticking with v4.6 on your test projects.


Hi,
Do you know when this will be released?
Remco
#5 Posted : Wednesday, December 30, 2015 10:40:44 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Sorry, I should have updated this thread with the notification.

The new task runner is in the 2.19 release of NCrunch that went out earlier this month.
bryanjoseph
#6 Posted : Monday, January 4, 2016 7:44:19 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/4/2016(UTC)
Posts: 3

I am on 2.19 and am getting the following error after updating ncrunch:
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.Exception: The requested version of the .NET framework, 'Framework461' is not installed on this system
at nCrunch.Core.ProcessManagement.ExternalProcessManager.(ProcessorArchitecture , ProcessLoadParameters )
at nCrunch.Core.ProcessManagement.ExternalProcessManager.LoadExternalProcess(ProcessLoadParameters parameters, GridClientId client)
at nCrunch.Core.TestManagement.TestRunnerProcess..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.TestManagement.TestRunnerProcess.(Boolean , FilePath , GridClientId , CustomEnvironmentVariable[] )
at nCrunch.Core.TestManagement.TestRunnerProcess..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.Processing.AnalysisTaskLogic.DoProcessTaskAndReturnSuccessFlag()
Remco
#7 Posted : Monday, January 4, 2016 11:02:33 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
1 user thanked Remco for this useful post.
ahasnaini on 2/5/2016(UTC)
bryanjoseph
#8 Posted : Monday, January 4, 2016 11:48:21 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/4/2016(UTC)
Posts: 3

Seems to work. Thank you :)

When can the rest of my team see this as an update on your site or within vs?

I noticed a new alert though. I am using funnel because I work in a large solution so I unload projects that are not relevant to what I am currently working on. Is there a setting in ncrunch to ignore unloaded projects when initializing?

There are projects in this solution that have not been reported as loaded by the IDE within the 60 second timeout period allowed during NCrunch initialisation. It is possible that these projects are of an unusual type and NCrunch has been unable to correctly detect them, or alternatively you may be experiencing IDE solution loading times that are much higher than normal.

If these projects are not required for your NCrunch session, it is recommended that you ignore them using the NCrunch 'Ignore this component completely' configuration setting. This will result in faster NCrunch initialisation times as the engine no longer needs to wait for data related to these projects.

The following projects exist in this solution but could not be resolved by NCrunch during initialisation:
...
Remco
#9 Posted : Tuesday, January 5, 2016 12:10:03 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
bryanjoseph;8194 wrote:
Seems to work. Thank you :)


Great, thanks for confirming :)

bryanjoseph;8194 wrote:

When can the rest of my team see this as an update on your site or within vs?


This will happen when 2.20 is officially released, which unfortunately can't be without some level of ceremony. Right now the 2.20 build only contains the fix for the above problem, which isn't required for all environments. The build you're using is stable enough to be production ready, so I'd recommend to the rest of your team to simply install this update using the above links.

bryanjoseph;8194 wrote:

I noticed a new alert though. I am using funnel because I work in a large solution so I unload projects that are not relevant to what I am currently working on. Is there a setting in ncrunch to ignore unloaded projects when initializing?

There are projects in this solution that have not been reported as loaded by the IDE within the 60 second timeout period allowed during NCrunch initialisation. It is possible that these projects are of an unusual type and NCrunch has been unable to correctly detect them, or alternatively you may be experiencing IDE solution loading times that are much higher than normal.

If these projects are not required for your NCrunch session, it is recommended that you ignore them using the NCrunch 'Ignore this component completely' configuration setting. This will result in faster NCrunch initialisation times as the engine no longer needs to wait for data related to these projects.

The following projects exist in this solution but could not be resolved by NCrunch during initialisation:
...


2.19 introduced changes to the way that NCrunch handles projects that are not reported by the IDE during initialisation. This has recently become a big problem with the release of VS2015, as VS can now take much, much longer to initialise and fully load all projects (especially when other 3rd party VS packages are installed). The key issue is that when a project is unloaded, VS simply won't report it as existing within the solution in an understandable state. From VS2012, projects are loaded asynchronously and there is no determined point at which all projects are said to be loaded. To deal with this, NCrunch considers your solution (.sln) file to be the main source of information on which projects exist in the solution and still need to be loaded. The 60 second timeout is a fallback method to catch situations where projects exist in the solution and are not reported by VS, as without this NCrunch would simply hang forever waiting for the unloaded projects to be reported.

So to cut a long story short, it's an issue caused by the limitations of VS integration. You have three options here:

1. Set the 'Ignore this project completely' NCrunch project-level configuration setting to 'True' for projects that you leave unloaded in the IDE. In this way, the engine knows not to expect these projects and won't wait for the IDE to report them.
2. Avoid working with unloaded projects in the solution. Consider creating separate solutions to represent different views of the software you're working on
3. Ignore the warning and live with slightly higher initialisation times for NCrunch. It will still work, and will be stable - but it will wait for 60 seconds during its initialisation for the missing projects to be reported.
bryanjoseph
#10 Posted : Tuesday, January 5, 2016 12:16:31 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/4/2016(UTC)
Posts: 3

Regarding unloaded projects. I will be going with option #3. A suggestion for another option might be to add a configuration to set the amount of time you have to wait for projects to load. I would be happy with half that time or less.
Remco
#11 Posted : Tuesday, January 5, 2016 12:57:43 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
bryanjoseph;8196 wrote:
Regarding unloaded projects. I will be going with option #3. A suggestion for another option might be to add a configuration to set the amount of time you have to wait for projects to load. I would be happy with half that time or less.


I was just thinking the exact same thing. I don't doubt that others will also be hit with this. I've added it in the backlog for the next release :)
1 user thanked Remco for this useful post.
bj97301 on 1/13/2016(UTC)
bj97301
#12 Posted : Wednesday, January 13, 2016 12:10:32 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/13/2016(UTC)
Posts: 1
Location: United States of America

Thanks: 1 times
Awesome! Thanks for all your help.
Dustin Moris Gorski
#13 Posted : Thursday, February 4, 2016 11:17:53 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/4/2016(UTC)
Posts: 1
Location: United Kingdom

I am keen on this fix as well. Could you not just release a hotfix 2.19.1 which includes only this change?
Remco
#14 Posted : Thursday, February 4, 2016 11:37:16 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Dustin Moris Gorski;8297 wrote:
I am keen on this fix as well. Could you not just release a hotfix 2.19.1 which includes only this change?


Sorry - I'm not sure exactly what you're asking here ... Do you mean a fix for .NET 4.6.1 support? This is essentially what the 2.20 build above is - I think the 4.6.1 fix is the only thing in this build.
gregm
#15 Posted : Friday, March 11, 2016 7:52:12 PM(UTC)
Rank: Member

Groups: Registered
Joined: 4/3/2014(UTC)
Posts: 10
Location: United States of America

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
I am having this issue as well. I cannot test NET 4.61. The link provided above for 2.20 does not work, so I can't use that. Could that link be fixed? Or is 2.20 close to being released?
Remco
#16 Posted : Friday, March 11, 2016 9:35:07 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi,

Can you share your experiences with the 2.20 link above? On all angles I've tested, this does introduce support for 4.6.1. I'm concerned you may be encountering a different problem with the build.
1 user thanked Remco for this useful post.
gregm on 3/11/2016(UTC)
gregm
#17 Posted : Friday, March 11, 2016 10:23:33 PM(UTC)
Rank: Member

Groups: Registered
Joined: 4/3/2014(UTC)
Posts: 10
Location: United States of America

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
I was actually having trouble downloading the files (so I never got to the part of using this version of NCrunch with 4.6.1).

However, based on your response, I got suspicious and copied the link into Firefox (rather than clicking it right here in the post within Chrome) and that worked, so I now have this version. If I do have troubles, I'll let you know.
1 user thanked gregm for this useful post.
Remco on 3/12/2016(UTC)
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.127 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download