"Failed to activate Metro style unit test executor. Error: The application cannot be started. Try reinstalling the application to fix the problem."

Answered "Failed to activate Metro style unit test executor. Error: The application cannot be started. Try reinstalling the application to fix the problem."

  • Thursday, July 05, 2012 8:13 PM
     
     

    I have a VS2012 Metro-style .Net class library that I have been testing with the built in VS2012 unit testing tools. This has previously worked fine but today I get the message.

    "Failed to activate Metro style unit test executor. Error: The application cannot be started. Try reinstalling the application to fix the problem."

    I have two unit test projects in my solution - one give the expected results, the other (linked to the above error) never runs.

    I have changed the package name for the problematic test in the package manifest and it now runs fine.

    Has anyone else observed this issue? Are there any better recommendations for solving this problem?

    Thanks,

        Andrew

All Replies

  • Friday, July 06, 2012 9:52 AM
     
     

    The same thing happened to me today. Only one test project in the solution which failed with the same error. Changing the package name fixed the problem.

    Just before that I had to renew my developer licence. Not sure if that's related in any way, though.

  • Friday, July 06, 2012 12:04 PM
     
     

    I hadn't put the two together - but yes, I had just renewed my developer licence.

    Looks like a bug to me - I'll post this onto Connect.

    Andrew

  • Friday, July 06, 2012 12:48 PM
     
     

    Hi,

    Please check if any errors are logged under

    EventViewer -> Application And ServicesLogs -> Microsoft -> Windows -> AppXDeploymentServer/Operational->Microsoft-Windows-AppXDeploymentServer/Operational

    There might be events regarding why it failed to activate the application.

    Thanks

  • Friday, July 06, 2012 7:00 PM
     
     

    I have just checked and there are no errors/warnings related to the problematic package install. The information entries are as shown below. These seem to match with the same entries for the test project within the solution that ran successfully (that appear just before these in the event log)

    Started deployment Register operation on a package with main parameter: file:///C:/Users/Andrew/Documents/Visual%20Studio%202012/Projects/Cocoon/Cocoon.Tests/bin/Debug/AppX/AppxManifest.xml. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.

    Creating Resiliency File C:\ProgramData\Microsoft\Windows\AppRepository\ad31f041-6867-4223-8612-82430d84b782_S-1-5-21-2395704784-711032754-1062224463-1001_3.rslc for Register Operation on Package 2adfad11-5ad0-411f-a970-8c20b4fb821d_1.0.0.0_neutral__yqdhsn7yvy3k6.

    Finished servicing package 2adfad11-5ad0-411f-a970-8c20b4fb821d_1.0.0.0_neutral__yqdhsn7yvy3k6. Setting the package state to enabled returned with 0x80070002.

    Deployment Register operation on Package 2adfad11-5ad0-411f-a970-8c20b4fb821d_1.0.0.0_neutral__yqdhsn7yvy3k6 from:  (C:\Users\Andrew\Documents\Visual Studio 2012\Projects\Cocoon\Cocoon.Tests\bin\Debug\AppX\AppxManifest.xml)  finished successfully.

    Started deployment Remove operation on a package with main parameter: 2adfad11-5ad0-411f-a970-8c20b4fb821d_1.0.0.0_neutral__yqdhsn7yvy3k6. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.

    Creating Resiliency File C:\ProgramData\Microsoft\Windows\AppRepository\ad31f041-6867-4223-8612-82430d84b782_S-1-5-21-2395704784-711032754-1062224463-1001_4.rslc for Remove Operation on Package 2adfad11-5ad0-411f-a970-8c20b4fb821d_1.0.0.0_neutral__yqdhsn7yvy3k6.

    About to service package 2adfad11-5ad0-411f-a970-8c20b4fb821d_1.0.0.0_neutral__yqdhsn7yvy3k6. Setting the package state to disabled returned with 0x0.

    Deployment Remove operation on Package 2adfad11-5ad0-411f-a970-8c20b4fb821d_1.0.0.0_neutral__yqdhsn7yvy3k6 from:  (C:\Users\Andrew\Documents\Visual Studio 2012\Projects\Cocoon\Cocoon.Tests\bin\Debug\AppX)  finished successfully.

  • Tuesday, July 10, 2012 7:29 AM
    Moderator
     
     

    Hi Andy,

    I noticed that you also open a support case on the Microsoft Connect site here: http://connect.microsoft.com/VisualStudio/feedback/details/752605/failed-to-activate-metro-style-unit-test-executor-error-the-application-cannot-be-started-try-reinstalling-the-application-to-fix-the-problem Let's work closely with our PG engineers to resolve your issue.

    Thanks.


    Vicky Song [MSFT]
    MSDN Community Support | Feedback to us

  • Thursday, July 12, 2012 1:32 PM
     
     Answered
    I just got the same problem - right after renewing my developer license. Chaning the package name (GUID) fixed the problem. Thanks!
  • Monday, July 16, 2012 2:33 AM
     
     
    Hi Vicky,

    I'm working on an app for a client in a small team, and I'm hitting a similar error to Andy. The tests ran fine until we try to add the Bing maps SDK. Changing the package name to a new GUID did not fix this. We started this app a little over a month ago, and have renewed our developer licences since.

    I note that you're working with the engineers to resolve this. Is there a hotfix available yet, or alternative information that we can provide that would help in diagnosing this issue?

    I have been able to run unit tests a fresh blank metro app solution with bing maps sdk installed (and running), so I'm not sure why I can't in the existing solution.

    ------ Discover test started ------
    ========== Discover test finished: 1 found (0:00:00.1971048) ==========
    ------ Run test started ------
    Failed to activate Metro style unit test executor. Error: The remote procedure call failed.
    ========== Run test finished: 0 run (0:00:02.3413141) ==========
  • Monday, July 16, 2012 2:52 AM
     
     
  • Monday, July 16, 2012 9:11 AM
     
     

    Hi Josh,

    I've had no further information regarding a hotfix for this issue (Vicky posted the Connect entry above if you want to keep up to date on this). In my case I am able to solve it by changing the package name - this is reproducable and I can change back and forth between the working and problematic package names. If this hasn't worked for you then this may be a slightly different issue.

    Andy

  • Monday, July 16, 2012 1:31 PM
     
     

    Hi Andy,

    Thanks for the reply. It looks like my issue is due to a bug in the app that's not bad enough to show up as a bug (in my case a weird merged resource dictionary issue). I'm going to work out a repro soon.

  • Tuesday, July 17, 2012 4:21 PM
     
     

    Hi Josh,

    Thanks for reporting the issue. Your issue is not related to developer license renewal. We have identified the issue and fixed it for future builds/releases. Only way to avoid this issue in RC is to (when referencing Bing maps SDK) refactor code that you want to test in a class library and test class library instead of app. In future builds, you should be able to test app normally without workaround.

    We are looking into issue of developer license renewal issue reported by others.


    Regards,
    Vikram Agrawal,
    Developer, VSTLM, Microsoft Corporation

  • Wednesday, July 18, 2012 3:12 AM
     
     

    Hi Vikram,

    Thanks for your response. We need to decide whether to implement the workaround or wait for the RTM release of Windows 8 / VS 2012. Can you please provide some information on whether this fix will make it into release that will be available when these RTM?

  • Wednesday, July 18, 2012 1:40 PM
     
     

    Hi Josh,

    Fix should be available in RTM build.

    Note: The fix is for Remote Procedure call failure issue.

    
    
    

    Regards,
    Vikram Agrawal,
    Developer, VSTLM, Microsoft Corporation

  • Friday, September 07, 2012 9:10 AM
     
     
    Any chance to fix this problem in the RC build (11.0.50706.0) ? I changed the unit test project's package name, but it didn't help. Should I change it in other projects in my solution as well?