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

Notification

Icon
Error

process has no package identity
tblack
#1 Posted : Monday, February 2, 2015 9:51:55 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/31/2014(UTC)
Posts: 3
Location: United States of America

Thanks: 1 times
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.

Remco
#2 Posted : Tuesday, February 3, 2015 12:55:57 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)
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
1 user thanked Remco for this useful post.
tblack on 2/3/2015(UTC)
tblack
#3 Posted : Tuesday, February 3, 2015 1:34:43 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/31/2014(UTC)
Posts: 3
Location: United States of America

Thanks: 1 times
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.
Remco
#4 Posted : Tuesday, February 3, 2015 2:37:00 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)
tblack;6921 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.
tblack
#5 Posted : Tuesday, February 3, 2015 2:09:45 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/31/2014(UTC)
Posts: 3
Location: United States of America

Thanks: 1 times
Umm.. so how do i know when its fixed. is there a bug tracking email system that i can subscribe to?
Remco
#6 Posted : Wednesday, February 4, 2015 5:14:57 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)
AlSki
#7 Posted : Tuesday, March 31, 2015 10:52:47 PM(UTC)
Rank: Member

Groups: Registered
Joined: 2/28/2012(UTC)
Posts: 17
Location: London

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
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.
Remco
#8 Posted : Tuesday, March 31, 2015 10:54:31 PM(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)
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?
AlSki
#9 Posted : Tuesday, March 31, 2015 10:58:10 PM(UTC)
Rank: Member

Groups: Registered
Joined: 2/28/2012(UTC)
Posts: 17
Location: London

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Submitted
Remco
#10 Posted : Tuesday, March 31, 2015 11:02:57 PM(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)
Is this a Windows Phone application? Note that at the moment NCrunch only supports Windows Store App test environments (Windows Phone excluded) - https://www.ncrunch.net/support/frameworks.
1 user thanked Remco for this useful post.
AlSki on 3/31/2015(UTC)
AlSki
#11 Posted : Tuesday, March 31, 2015 11:09:25 PM(UTC)
Rank: Member

Groups: Registered
Joined: 2/28/2012(UTC)
Posts: 17
Location: London

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
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.
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.072 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download