Build/Test Issues

process has no package identity

Started by tblack on 12,740 views

When I upgrade nCruch to the any version after 2.10.0.4 it stops working.

Here are the versions I tested on:
• Version VS2013_2.10.0.4 – works
• Version VS2013_2.11.0.23 – throws exception below.
• Version VS2013_2.12.0.2 – throws exception below.

Exception:
System.InvalidOperationException: The process has no package identity. (Exception from HRESULT: 0x80073D54)
at Windows.ApplicationModel.Package.get_Current()
at UnitTestLibrary1.UnitTest1.TestMethod1() in C:\Users\ty.black\documents\visual studio 2013\Projects\App1\UnitTestLibrary1\UnitTest1.cs:line 12
Here the simplest example I could make.
using Windows.ApplicationModel;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;

namespace UnitTestLibrary1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
PackageVersion version = Package.Current.Id.Version;
}
}
}

How to make this exception occur.
1. Create a new project using template Visual C#/ Store Apps / Windows Apps/ Blank App
2. Navigate First Time nCrunch dialogs.
3. Wait for nCrunch to build the app the first time.
4. Add a new project Windows App/ Unit Test Library (Windows).
5. Add the next line inside TestMethod1
a. PackageVersion version = Package.Current.Id.Version;
6. Wait for nCrunch…
7. Get exception above.

Hi, thanks for sharing this issue.

This looks to be caused by a service initialisation problem introduced by the engine separation in 2.11. Setting your 'Engine hosting strategy' (global config setting) to 'HostInsideIDE' should allow you to work around this problem.

I'll see what I can do about arranging a proper fix.


Cheers,

Remco
Awesome,
Just work it into the exception message handler. saying go here and click this.
Or detect that that the user is running win RT code and say go here and click this.
thanks awesome.
I thought it was a config issues.
tblack wrote:Awesome,
Just work it into the exception message handler. saying go here and click this.
Or detect that that the user is running win RT code and say go here and click this.
thanks awesome.
I thought it was a config issues.


The fix will be for it to just work, regardless of how the engine is hosted :)

The problem is that right now when the engine is hosted outside the IDE, the initialiser neglects to register a service responsible for initialising the windows store app container.

In theory, this should be simple to fix. And it is a bug. A flat out evil regression. Sorry for the trouble.
Umm.. so how do i know when its fixed. is there a bug tracking email system that i can subscribe to?
A fix for this is now available in the dev build below:

http://downloads.ncrunch.net/NCrunch_Console_2.13.0.4.msi
http://downloads.ncrunch.net/NCrunch_Console_2.13.0.4.zip
http://downloads.ncrunch.net/NCrunch_GridNodeServer_2.13.0.4.msi
http://downloads.ncrunch.net/NCrunch_GridNodeServer_2.13.0.4.zip
http://downloads.ncrunch.net/NCrunch_VS2008_2.13.0.4.msi
http://downloads.ncrunch.net/NCrunch_VS2010_2.13.0.4.msi
http://downloads.ncrunch.net/NCrunch_VS2010_2.13.0.4.zip
http://downloads.ncrunch.net/NCrunch_VS2012_2.13.0.4.msi
http://downloads.ncrunch.net/NCrunch_VS2012_2.13.0.4.zip
http://downloads.ncrunch.net/NCrunch_VS2013_2.13.0.4.msi
http://downloads.ncrunch.net/NCrunch_VS2013_2.13.0.4.zip
http://downloads.ncrunch.net/NCrunch_VS2015_2.13.0.4.msi
http://downloads.ncrunch.net/NCrunch_VS2015_2.13.0.4.zip
I can still replicate this in 2.13.0.4 and 2.13.0.5 by following the exact instructions above. Switching to HostInsideIDE doesn't help unfortunately.

Any suggestions or is there anything else that might help you diagnose?

Running VS2013 Premium update 4. The tests work via MS test explorer and ReSharpers test runner.

Edited

Hi AlSki,

Although you're experiencing the same symptom, this is likely to be a different problem.

Would you be able to submit a bug report straight after you've been hit with this error?
Submitted
D'oh. Must read the instructions next time.

Its a VS2013 Universal app, so shared.dll +WIndows.dll +WindowsPhone.dll. I'm currently testing against the WinPhone dll but I'll switch the testing onto the Windows side.

Thanks.

Post a reply

Log in to reply.