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

Notification

Icon
Error

VS2022 (17.1.0) Preview 2.0 appears to break Ncrunch
NeilMacMullen
#1 Posted : Tuesday, January 11, 2022 10:11:39 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 12/15/2016(UTC)
Posts: 49
Location: United Kingdom

Thanks: 26 times
Was thanked: 11 time(s) in 10 post(s)
I rashly upgraded and I think this has broken Ncrunch. On starting up VS, I see a dialog saying...

Quote:
"The 'Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage' package did not load correctly.

The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the [ActivityLog.xml file in appdata]"


Activitylog.xml contains this report....

Quote:
<description>SetSite failed for package [Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage]Source: &apos;Microsoft.VisualStudio.QualityTools.CodeCoverage&apos; Description: Could not load file or assembly &apos;Microsoft.VisualStudio.Coverage.Analysis.Net, Version=17.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;System.IO.FileNotFoundException: Could not load file or assembly &apos;Microsoft.VisualStudio.Coverage.Analysis.Net, Version=17.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;Microsoft.VisualStudio.Coverage.Analysis.Net, Version=17.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos;&#x000D;&#x000A; at Microsoft.VisualStudio.TestTools.CodeCoverage.CodeCoverageManager..ctor()&#x000D;&#x000A; at Microsoft.VisualStudio.TestTools.TestCaseManagement.QualityToolsPackage.&lt;InitializeAsync&gt;d__20.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass20_0.&lt;&lt;Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)&#x000D;&#x000A; at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)&#x000D;&#x000A;&#x000D;&#x000A;WRN: Assembly binding logging is turned OFF.&#x000D;&#x000A;To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.&#x000D;&#x000A;Note: There is some performance penalty associated with assembly bind failure logging.&#x000D;&#x000A;To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].&#x000D;&#x000A;</description>


The relevant part (I think) being "System.IO.FileNotFoundException: Could not load file or assembly &apos;Microsoft.VisualStudio.Coverage.Analysis.Net"

If I ignore the error at VS startup, NCrunch just fails to initialise and generates these errors in the Test Output window (possibly a red herring)...

Quote:
The following errors and warnings have occured during test discovery (enable debug mode for more information):
ERROR: Could not find out Visual Studio version: A 32 bit processes cannot access modules of a 64 bit process.
Warning: Could not identify Visual Studio version. Test Adapter for Google Test requires at least Visual Studio 2012 Update 1.
Could not locate debug symbols for 'D:\work\code\b4\Backend\CSharp\FirmwareEmulation\DeviceSim\bin\Debug\DeviceSim.exe'. To make use of '--list_content' discovery, ensure that debug symbols are available or make use of '<ForceListContent>' via a .runsettings file.
NUnit Adapter 4.1.0.0: Test discovery starting
NUnit Adapter 4.1.0.0: Test discovery complete
No test is available in D:\work\code\b4\Backend\CSharp\FirmwareEmulation\DeviceSim\bin\Debug\DeviceSim.exe. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
NUnit Adapter 4.1.0.0: Test discovery starting
NUnit Adapter 4.1.0.0: Test discovery complete
NUnit Adapter 4.1.0.0: Test discovery starting
NUnit Adapter 4.1.0.0: Test discovery complete
NUnit Adapter 4.1.0.0: Test discovery starting
NUnit Adapter 4.1.0.0: Test discovery complete
NUnit Adapter 4.1.0.0: Test discovery starting
NUnit Adapter 4.1.0.0: Test discovery complete
No test is available in D:\work\code\b4\Backend\CSharp\Tests\WebTests\bin\Debug\net5.0\WebTests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
NUnit Adapter 4.1.0.0: Test discovery starting
NUnit Adapter 4.1.0.0: Test discovery complete
Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Could not find testhost
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.GetTestHostProcessStartInfo(IEnumerable`1 sources, IDictionary`2 environmentVariables, TestRunnerConnectionInfo connectionInfo)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, String runSettings)
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
========== Test discovery aborted: 1491 Tests found in 38.8 sec ==========



If you can remind me where to find the NCrunch log files I'll also have a look in those.

This occurs on two machines so while it _could_ be a personal configuration problem, the VS upgrade seems to be the smoking gun....





Remco
#2 Posted : Tuesday, January 11, 2022 10:43:32 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 868 times
Was thanked: 1179 time(s) in 1099 post(s)
Hi, thanks for sharing this issue.

NCrunch actually has no integration at all with VSTest or MSTest (we added all support for this using our own emulator). This means that the errors you're seeing here related to VSTest and in the Test Output Window (which we don't output to) most likely have nothing to do with NCrunch.

Can you describe for me in more detail how NCrunch is failing for you in the UI? Is it preventing you from enabling the engine? Are there any errors appearing in the Tests Window?

If the NCrunch package is being loaded correctly by VS, the 'Submit Bug Report' option under the NCrunch menu should allow you to export a log file, or submit it straight through to us for review.
1 user thanked Remco for this useful post.
NeilMacMullen on 1/11/2022(UTC)
NeilMacMullen
#3 Posted : Tuesday, January 11, 2022 11:08:05 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 12/15/2016(UTC)
Posts: 49
Location: United Kingdom

Thanks: 26 times
Was thanked: 11 time(s) in 10 post(s)
I've submitted a bug report. The UI behaviour is that the Ncrunch icon indicates "initialising" but no items are seen in the processing queue. If I then do a VS build, the icon changes to green but indicates that no tests were found (again, the processing queue remains empty).
Remco
#4 Posted : Tuesday, January 11, 2022 11:13:56 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 868 times
Was thanked: 1179 time(s) in 1099 post(s)
Thanks for sending this through. The log doesn't show any obvious erroneous behaviour, but there is a shortage of detected projects.

Do you have a solution open in the IDE? Note that NCrunch doesn't work very well if it's just a project file open (make sure you have a .sln).

I wonder if the other errors you're hitting in the IDE are having a downstream effect on the project reporting. Or... perhaps they've changed the project system in a way that's broken us again.
NeilMacMullen
#5 Posted : Tuesday, January 11, 2022 11:24:46 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 12/15/2016(UTC)
Posts: 49
Location: United Kingdom

Thanks: 26 times
Was thanked: 11 time(s) in 10 post(s)
Yes, there's a solution file open (with 188 projects). It may be relevant that when I open this solution the Processing Queue window doesn't even show the "loading X projects" spinner (icon popup dialog is stuck on "Ncrunch engine is initialising") I've submitted a second bug report from this state in case it is helpful.

However, I also have a much simpler solution with only two projects - that appears to load fine and Ncrunch works correctly so as you suggest this may be a downstream problem caused by VS changes to certain project types.
Remco
#6 Posted : Tuesday, January 11, 2022 11:28:27 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 868 times
Was thanked: 1179 time(s) in 1099 post(s)
NeilMacMullen;15937 wrote:

However, I also have a much simpler solution with only two projects - that appears to load fine and Ncrunch works correctly so as you suggest this may be a downstream problem caused by VS changes to certain project types.


My suspicion here is that there is work in progress in VS that might be tripping us up.

In the interests of wanting to avoid investigating issues that we likely can't do much about, I would prefer to wait until this iteration of the IDE is more stable before investing time on this issue. Is rolling back your VS an option for you?
NeilMacMullen
#7 Posted : Tuesday, January 11, 2022 11:30:37 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 12/15/2016(UTC)
Posts: 49
Location: United Kingdom

Thanks: 26 times
Was thanked: 11 time(s) in 10 post(s)
>In the interests of wanting to avoid investigating issues that we likely can't do much about, I would prefer to wait until this iteration of the IDE is more stable

Yes, completely understand :-) I'll probably roll back to VS2019 for now...
NeilMacMullen
#8 Posted : Tuesday, January 11, 2022 11:33:25 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 12/15/2016(UTC)
Posts: 49
Location: United Kingdom

Thanks: 26 times
Was thanked: 11 time(s) in 10 post(s)
FWIW -found an existing problem report for the initial VS error dialog... https://developercommuni...2-4c84-914c-dbf0242dada6
1 user thanked NeilMacMullen for this useful post.
Remco on 1/11/2022(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.083 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download