Hi there,
As a follow-up to http://forum.ncrunch.net/yaf_postst2142_Tests-utilising-Microsoft-AspNet-TestHost-fail-in-NCrunch.aspx, there is still a case where ncrunch fails to successfully execute unit test. That case would be compilation of mvc views.
I have a reproduction repository here:
https://github.com/jp7677/ncrunchbugrepro
There are two testcases, one is a normal MVC Controller, that one succeeds with the latest ncrunch version. The second test involves MVC view compilation. This one fails in ncrunch, but succeeds on the command line. Note that there is a workaround in the csproj file for the test project (https://github.com/jp7677/ncrunchbugrepro/blob/master/NCrunchBugRepro.Test/NCrunchBugRepro.Test.csproj), taken from https://github.com/NuGet/Home/issues/4412.
If I apply this workaround manually to nrcunch, thus copying the NCrunchBugRepro.deps.json into the ncrunch test, ncrunch can successfully execute the test.
Thus I guess a solution would be that the mode "Copy Referenced Assemblies To Workspace" should also include deps.json files.
Regards and thanks for creating and supporting ncrunch!
Jens
Daily Usage Issues
Tests utilising Microsoft.AspNet.TestHost i.c.w. MVC Views fail in NCrunch
Started by jp7677 on 13,753 views
Remco NCrunch Developer
#10584
12 Jun 2017 10:37 UTC
Hi Jens,
Thanks for sharing the extension to this issue. I believe you are correct in that copying the .deps files over when 'Copy referenced assemblies to workspace' is enabled would be the correct solution here. I'll see what I can do about arranging a fix.
Thanks for sharing the extension to this issue. I believe you are correct in that copying the .deps files over when 'Copy referenced assemblies to workspace' is enabled would be the correct solution here. I'll see what I can do about arranging a fix.
Thanks for the fast response! Nice to read that and looking forward to a solution.
Remco NCrunch Developer
#10632
16 Jun 2017 04:05 UTC
A fix for this is now available in the build below:
http://downloads.ncrunch.net/NCrunch_Console_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_Console_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_LicenseServer_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2008_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2012_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2012_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2013_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2013_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2015_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2015_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2017_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2017_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_Console_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_Console_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_LicenseServer_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2008_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2012_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2012_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2013_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2013_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2015_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2015_3.10.0.1.zip
http://downloads.ncrunch.net/NCrunch_VS2017_3.10.0.1.msi
http://downloads.ncrunch.net/NCrunch_VS2017_3.10.0.1.zip
Thanks a lot. works perfectly for my scenarios.
Though I have noticed that view compilation inside ncrunch still fails when one references other projects directly inside the views.
Though I have noticed that view compilation inside ncrunch still fails when one references other projects directly inside the views.
Remco NCrunch Developer
#10640
17 Jun 2017 01:29 UTC
jp7677 wrote:Thanks a lot. works perfectly for my scenarios.
Though I have noticed that view compilation inside ncrunch still fails when one references other projects directly inside the views.
Thanks. I'll see if I can get this sorted in the next dev build.
Remco NCrunch Developer
#10647
19 Jun 2017 11:05 UTC
Ok, a fix for the latest reported issue here is now available.
http://downloads.ncrunch.net/NCrunch_Console_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_Console_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_LicenseServer_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_VS2008_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_VS2012_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_VS2012_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_VS2013_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_VS2013_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_VS2015_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_VS2015_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_VS2017_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_VS2017_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_Console_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_Console_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_LicenseServer_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_VS2008_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_VS2012_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_VS2012_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_VS2013_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_VS2013_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_VS2015_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_VS2015_3.10.0.2.zip
http://downloads.ncrunch.net/NCrunch_VS2017_3.10.0.2.msi
http://downloads.ncrunch.net/NCrunch_VS2017_3.10.0.2.zip
How convenient, I had just updated my reproduction repository at https://github.com/jp7677/ncrunchbugrepro for my latest issue here with directly referenced projects in MVC pages ;)
Unfortunately ncrunch (3.10.0.2) still fails to run my second test while "dotnet test" on the command line succeeds, please see my repository.
Unfortunately ncrunch (3.10.0.2) still fails to run my second test while "dotnet test" on the command line succeeds, please see my repository.
Remco NCrunch Developer
#10721
29 Jun 2017 07:43 UTC
Sorry for the wait. Here's the latest fix.
http://downloads.ncrunch.net/NCrunch_Console_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_Console_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_LicenseServer_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_VS2008_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_VS2012_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_VS2012_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_VS2013_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_VS2013_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_VS2015_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_VS2015_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_VS2017_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_VS2017_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_Console_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_Console_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_GridNodeServer_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_LicenseServer_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_VS2008_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_VS2010_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_VS2012_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_VS2012_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_VS2013_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_VS2013_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_VS2015_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_VS2015_3.10.0.6.zip
http://downloads.ncrunch.net/NCrunch_VS2017_3.10.0.6.msi
http://downloads.ncrunch.net/NCrunch_VS2017_3.10.0.6.zip
Hi there, thanks for version 3.10.0.6. Unfortunately my second issue reported here (posting #8) is not yet fixed on my machine with that version.
Remco NCrunch Developer
#10733
03 Jul 2017 09:53 UTC
jp7677 wrote:Hi there, thanks for version 3.10.0.6. Unfortunately my second issue reported here (posting #8) is not yet fixed on my machine with that version.
Sorry, I should have clarified this. For the fix to work, you'll need to turn on the 'Copy referenced assemblies to workspace' setting for all projects in the dependency chain. NCrunch will implicitly turn this on for any projects that reference AspNet.TestHost, but it can't do this automatically for projects deeper down the chain.
Remco wrote:For the fix to work, you'll need to turn on the 'Copy referenced assemblies to workspace' setting for all projects in the dependency chain.
Yes, that did the trick, thanks a lot!
Remco NCrunch Developer
#10791
18 Jul 2017 01:18 UTC
NCrunch v3.10 has now been released.
Post a reply
Log in to reply.