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

Notification

Icon
Error

Framework 4.6.2 project failing to build using optimised instrumentation mode
rdavis
#1 Posted : Thursday, November 14, 2019 1:35:21 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/26/2015(UTC)
Posts: 8
Location: United Kingdom

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
I upgraded to NCrunch version 4.1 today (I was previously using version 3.31). When I use the default instrumentation mode (i.e. legacy) in my solution with 31 projects targeting .NET Framework 4.6.2 the NCrunch Tests window says it is monitoring 7,826 tests and the Risk/Progress bar is green and says "OK". Just as it did before I upgraded.

However, when I switch the instrumentation mode to optimised, the NCrunch Tests window shows it loading all 31 projects and starts to tell me that tests are queued for execution, but then says "1 project is failing to build" and does not identify which project it is having trouble with. The Risk/Progress bar says "Build".

NCrunch Tests and Risk/Progress Windows

I am running NCrunch inside Visual Studio Enterprise 2017 Version 15.9.17.

I have submitted a bug report from within Visual Studio with the same message and title to this post.
richardmoss
#2 Posted : Thursday, November 14, 2019 4:41:11 PM(UTC)
Rank: Member

Groups: Registered
Joined: 9/1/2012(UTC)
Posts: 12

Thanks: 3 times
Was thanked: 4 time(s) in 4 post(s)
Hello,

Try installing the preview 4.2 builds from this post, that fixed it for my full-fat Framework solutions that exhibited the same error.

Regards;
Richard Moss
1 user thanked richardmoss for this useful post.
Remco on 11/14/2019(UTC)
rdavis
#3 Posted : Monday, November 18, 2019 2:19:02 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/26/2015(UTC)
Posts: 8
Location: United Kingdom

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
I'm afraid that didn't work, I still see 1 project failing to build when running NCrunch for Visual Studio 2017 version 4.2.0.1 in optimised instrumentation mode.
Remco
#4 Posted : Tuesday, November 19, 2019 1:29:03 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
rdavis;14091 wrote:
I'm afraid that didn't work, I still see 1 project failing to build when running NCrunch for Visual Studio 2017 version 4.2.0.1 in optimised instrumentation mode.


Thanks for confirming this.

I've taken a look at the bug report you've sent through, and it looks like you're experiencing a problem with the new optimised mode that hasn't been reported yet.

Something about this project results in NCrunch trying to resolve v0.0.0.0 of mscorlib. I'm not really sure how that's possible.

Can you tell me a bit more about this project? Which platform is it targeting, and which compiler is it using? Is there any post-build processing of the assembly? (i.e. IL weavers, postsharp, other manipulators).
rdavis
#5 Posted : Tuesday, November 19, 2019 2:14:42 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/26/2015(UTC)
Posts: 8
Location: United Kingdom

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Remco;14098 wrote:
Thanks for confirming this.

I've taken a look at the bug report you've sent through, and it looks like you're experiencing a problem with the new optimised mode that hasn't been reported yet.

Something about this project results in NCrunch trying to resolve v0.0.0.0 of mscorlib. I'm not really sure how that's possible.

Can you tell me a bit more about this project? Which platform is it targeting, and which compiler is it using? Is there any post-build processing of the assembly? (i.e. IL weavers, postsharp, other manipulators).


Thank you for your reply.

The project has been in development for about 7 years, starting life in Visual Studio 2012 as a REST API using ServiceStack and MongoDB, the tests were written using NUnit and Moq.

Over the years it's grown and changed. It now has multiple website and API projects with references to SQL, AWS, NHibernate, xUnit.net, AutoFixture, NSubstitute, Dapper, and many more (but nothing that I can think of as being particularly out in left field).

It currently targets .NET Framework 4.6.2, is developed in Visual Studio 2017 and is deployed to 64-bit Windows Server 2016 running IIS 10 hosted by AWS. NCrunch is running on the same machine the software is developed on, 64-bit Windows 10 Pro computers. It is compiled using the Visual Studio IDE using the Debug configuration and the 'Any CPU' platform target.

I'm not aware of anything that would be doing post-build processing (we're not using any of the manipulators you listed). The only reference to a PostBuildEvent I can find in the csproj files is one instance of this:

Code:
  <PropertyGroup>
    <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
  </PropertyGroup>


I cannot find any explicit references to mscorlib in any of the csproj files.
Remco
#6 Posted : Wednesday, November 20, 2019 7:08:32 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks for these extra details. I'm working on a speculative fix for this and will let you know as soon as a build is available.
1 user thanked Remco for this useful post.
UppSol on 11/20/2019(UTC)
Remco
#7 Posted : Thursday, November 28, 2019 4:24:04 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
1 user thanked Remco for this useful post.
rdavis on 12/9/2019(UTC)
rdavis
#8 Posted : Monday, December 9, 2019 10:41:47 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/26/2015(UTC)
Posts: 8
Location: United Kingdom

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Thank you, and apologies for the delay in replying.

I have now run the speculative fix (version 4.2.0.2) and all my tests are running, the risk bar is green and says OK, and the tests window says NCrunch is monitoring 7,921 tests (I've written more tests since I first posted!)
1 user thanked rdavis for this useful post.
Remco on 12/9/2019(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.056 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download