ghelyar;10500 wrote:Thanks. 3.9.0.1 works for me. I was able to remove the CopyReferencedAssembliesToWorkspace setting, CopyReferencedAssembliesToWorkspaceIsOn warning and AspNetTestHostCompatibility warning with the setup I described above (asp.net core (.net framework)) and all tests ran and passed successfully with no warnings in VS2017.
Hi, apologies for posting on an old thread but this seemed to be a logical place to report our issue. We have recently started a new project with dot net core and are experiencing the same issue with the Microsoft.AspNetCore.TestHost package. We have been using the .NET Framework version with NCrunch for a while without issue, the solutions could be quite large with around 6-8 test projects running, with one utilising the test server, all tests ran fine and swiftly.
When starting a new project we realised that NCrunch would not even execute tests via the test server, from reading the very start of this thread, we needed to update our NCrunch version, we were using a version around 3.0, we upgraded to 3.15 and the projects were building and tests were being ran, albeit with the same warning shown below. Some of us had to request new licenses to use a later version.
When we first started we only had a single test and everything seemed to be OK, we were concerned by the warning but deferred worrying about it because everything seemed ok. However, as we have been adding more functionality and tests NCrunch has become very unusable, we still only have two projects, a simple dot net core Web Api project and a test project which utilises the test server. We all have very modern and powerful dev machines (Intel Xeon 2.8 GHz, 32Gb RAM) but as I understand any code change is causing a build and copying of all binaries which means any code code changes requires > 20 seconds to run our 30 tests.
It appeared that from ghelyar's post that this issue was resolved with 3.9.0.1, but a later post mentioned that .net core 2.0 caused further issues, we have been experiencing this issue with NCrunch 3.15 and I still get it with the recently released 3.16.0.1 with dot net core 2.0. Is this meant to have been resolved or are there any known workarounds? Our team want to continue to leverage the test server and we are all so used to using NCrunch that is now essential to our red green refactor dream.
Many Thanks
Paul
The Microsoft.AspNetCore.TestHost package contains code that extracts dependency data from the .deps files of user projects in its environment. NCrunch is unable to safely provide this dependency data without copying referenced assemblies to the build output directory. This will have an impact on the performance of NCrunch, as extra work must be done to rebuild this project every time one of its dependencies changes. You may also need to turn on the 'Copy referenced assemblies to workspace' NCrunch project-level configuration setting for other projects in this solution to resolve deeper dependency issues related to the use of this package. 'Copy referenced assemblies to workspace' has been implicitly enabled for this project.