Unable to Activate Windows Store App
Asked Answered
N

29

44

I installed a retail version of Windows 8 Pro. I downloaded and installed Visual Studio Express 2012. I asked for and received a developers certificate. Then I tried to create a hello world app.

From there I get a "Unable to Activate Windows Store App" message box when I try to debug the app. Most commentary on the web says delete build directories. This didn't work for me

Does anyone have a solution for how to fix this and debug my app?

Naomanaomi answered 15/11, 2012 at 19:1 Comment(3)
Please look at this may be related problem and solution: #36149855Chambertin
check this answer https://mcmap.net/q/375123/-unable-to-activate-windows-store-app-visual-studio-2015-windows-10-version-1511 which enabling .Net native tools resolved my problemJournalize
Rebooting windows helped meJeer
L
51

This happened to me once too, but the deleting build directories advice fixed it. Specifically, you just need to delete the bin\Debug and bld\Debug folders in your projects. Their contents will be regenerated by Visual Studio when you rebuild. I assume that this is only one project since it's a Hello World app; otherwise I would ask if you deleted build directories from all projects in your solution.

You can also try running "Clean Solution" from the BUILD menu in Visual Studio.

I'm sorry...it's horrible if this is happening on a clean install as you describe.

Lipcombe answered 15/11, 2012 at 20:24 Comment(4)
Well I got it to work. I deleted my test apps (I had 4) and then renewed my Developer Licence. This fixed the problem when I created a new app.Naomanaomi
+1, I have just ran into this problem too, deleting the build directories worked fine for me. Cheers.Corvin
I've contacted Michael and the link is working again. But basically, you just need to delete the bin\Debug and bld\Debug folders in your projects. Their contents will be regenerated by Visual Studio when you rebuild.Lipcombe
This happened to me with VS2022, and I changed (incremented) the project version, which causes all the 'apps' to reload/reinstall...Stun
W
21

I ran into the same issue, and tried rebuilding, cleaning, deleting temp files, rebooting the computer, etc... and nothing helped.

Then finally I made a release build then went back to debug. And now it works.

I have no idea what happened, nor if that really helped, but it's worth a try.

Wakayama answered 27/3, 2013 at 19:15 Comment(4)
Perfect- this should be the selected answerCia
This is still a thing four years later - I'm using VS2017 for a Hololens project; deleting the bin/ folders didn't work, but this fixed the issue.Tilton
The Release build works, but going back to the Debug build does not fix things. Still, this should be the answer.Noiseless
This issue occurred for me after switching the target framework of my UWP app to 17134. Release build worked for me but not Debug. Compared the settings and found that "compile with .NET native tool chain" was unticked for Debug, but ticked for Release. Synchronising these settings fixed the Debug build.Sieracki
M
8

For me a RESTART of pc solved this error message.

Misery answered 7/1, 2014 at 19:21 Comment(1)
Same here. I tried all kinds of other methods to no avail, but restarting the PC fixed the problem.Armillda
E
7

For me the problem was that I created the app on a TrueCrypt mounted virtual drive and when I moved the project files to a normal drive then everything worked just fine. Weird.

Experienced answered 12/5, 2014 at 10:48 Comment(2)
Same for me. The most strangest thing I ever encountered. Why does this happen? MS really stresses my nerves with these things... :(Stubstad
My issue was related, I'm using Stablebit Drivepool to create a partition which contains several physical drives. I was creating the project on this drive and ran into all sorts of errors like the one above, to a KernelBase error and certain exceptions. Thank you!Brayer
D
5

I was getting the exact same error. In my case the culprit was a NuGet package. It had added an app.config file to the project and it was confusing VS. I removed the app.config file and it solved my issue.

I got the solution at Iris Classon's site.

Damian answered 11/4, 2013 at 19:45 Comment(1)
In Visual Studio 2013 using there is a "helpful" warning that informs of multiple targeted assemblies with different versions. Clicking the warning will generate an app.config file for you which will then crash your Modern app! I didn't even notice the creation of this file until I read your post.Carp
X
3

This can be solved by Uninstalling the app from the start screen then again building the app from Visual Studio.

Xanthe answered 30/11, 2014 at 16:40 Comment(0)
H
2

I had a similar problem, and the cause was creating the project on a USB thumb drive. Creating a project on a normal hard drive volume works.

Heatherheatherly answered 19/5, 2015 at 3:17 Comment(2)
This is more of a comment than an answer.Psychomotor
It may actually be the answer though. I've seen many posts about this issue and most suggestions don't work for the original poster. A couple of hints at the project drive being an issue, and then I found this which suggests moving to C drive. I have normal drives, C and E. Moving my project from E to C and bingo! it works - social.msdn.microsoft.com/Forums/vstudio/en-US/…Facer
P
2

this can happen when the application signing key (.pfx file) is missing.

Try the following:

  • Open the Package.appxmanifest file in Visual Studio
  • Go to the register "Packaging"
  • Select [Choose Certificate…]
    • Select the test certificate using [Configure Certificate…] [From File…], or create a new one using [Configure Certificate…] [Test Certificate…]
    • When using a test certificate, ensure that it is in the .gitignore file. There should be an entry like !**\*_TemporaryKey.pfx to include the key in Git.
      • Note: The certificate for release build should only be available to the build server and not included in Git.
  • Rebuild the project
Pteranodon answered 24/1, 2017 at 18:23 Comment(0)
F
1

This has happened to me in the past and I have always found that deleting the build directories resolves it.

However this time this is not working for me. I have tried - Rebooting - Deleting build directories - Running Build | Clean Solution in VS - Renewing Developer Account

The only thing that will work for me is changing my Package name under the Package.appxmanifest

However I am not overly happy with this as a solution. I will keep investigating.

Frith answered 17/6, 2015 at 10:31 Comment(0)
M
1

The issue might be caused because NuGet will try to add an app.config with binding redirects to Windows Store apps if it thinks it is needed. However, Windows Store apps don’t need app.config, and will actually fail to start with a very confusing error message if it is present.

And the solution in this case would be to Remove the App.config

Mutton answered 8/12, 2015 at 7:31 Comment(0)
F
1

This error generally comes when you try to deploy in debug mode.

I would suggest, deploy the app first in release mode and then try in debug mode.

This worked for me.

Freewheel answered 25/5, 2016 at 7:26 Comment(0)
B
1

Making a new certificate works for me. For this, go to Package.manifest->Packaging, and follow the Choose certificate.... Click on Configure certificate and select Create test certificate. Give it a name and press OK.

Bonnee answered 2/6, 2018 at 12:21 Comment(0)
L
1

Increasing the revision number of the package worked for me

Livi answered 7/12, 2018 at 9:47 Comment(0)
E
1

Tried so many of the above fixes. Nothing worked (deleting bin, obj dirs, editing the manifest, editing the registry, changing package name, etc, etc.) My Avast antivirus software was running and so I uninstalled it completely. That was it. App now runs fine.

Eckhardt answered 10/1, 2021 at 16:34 Comment(0)
O
0

This sort of problems are common with Windows 8 Visual Studio. Such errors encounters when your developer license of Visual Studio has expired so you may want to renew or get a new developer license here's how you get that. How to get a developer license in Windows 8

And similar problem may also encounter with E_Fail issues here's how to solve Unable to activate Windows Store app E_Fail Issue

Organicism answered 28/2, 2013 at 12:34 Comment(0)
T
0

For me, the fix was a combination of two of these answers -

  1. Renew the developer license (How to get a developer license in Windows 8)
  2. And deleting the build directories (though I deleted more then the screenshot depicted) Delete the Build directories
Tuttifrutti answered 12/10, 2013 at 2:43 Comment(0)
G
0

NuGet will try to add an app.config with binding redirects to Windows Store apps if it thinks it is needed. However, Windows Store apps don’t need app.config, and will actually fail to start with a very confusing error message if it is present.

Solution:

Remove the App.config

and build again

Glister answered 10/7, 2014 at 9:14 Comment(0)
Z
0

For those who get a similar error but who are searching for a solution while debugging an IOT background app on a local machine specifically - you can find it here.

Using the search term "unable to activate windows store app the activation request failed with error" brought me here.

Zeba answered 24/1, 2017 at 7:29 Comment(0)
F
0

Because of Two things i resolved this issue.

  1. Basically, we just need to delete the bin\Debug and bld\Debug folders in our projects. Those contents will be regenerated by Visual Studio when you rebuild project.

  2. Just Restart the Visual Studio. And Clean Build and Rebuild the solution and RUN it.

Fazeli answered 14/7, 2017 at 10:16 Comment(0)
N
0

Playing with this issue for 3 days, tried every suggestions, nothing works. Until now!!!

The solution was this for me:

  • renew developer licence
  • build and deploy solution in Release mode (after this step it still not worked, but VS installed some packages in rpi)
  • start VS remote debugger with default account (http://:8080/#Debug%20settings)
  • configure remote device with Universal authentication mode (VS2017 -> Project settings -> debug -> target device: remote machine, authentication mode: Universal (unencrypted protocol))
Neoterize answered 12/4, 2018 at 18:23 Comment(0)
S
0

This gift was courtesy of Microsoft's automatic updates for VS2015 which was one of the 2 culprits:

KB3022398 KB3165756

It also broke SourceTree and other apps that draw the GUI - making an outline of the app but not drawing the contents.

Sojourn answered 21/5, 2018 at 16:45 Comment(0)
S
0

For me changing the Package Name in Package.appxmanifest fixed the problem

Sub answered 24/5, 2018 at 8:2 Comment(0)
J
0

In my case, the C# UWP app had a native library which failed in the application startup code, and called exit(1). The symptoms were identical to those in the question, though. Visual Studio would throw a message:

Unable to activate Windows Store app '88888888-6666-5555-4444-111111111111_abcdefgh!App'. The Acme.exe process started, but the activation request failed with error 'Operation not supported. Unknown error: 0x80040905'.

In addition, there was a message in the UWP app Windows log under Microsoft\Windows\Apps\Microsoft-Windows-TWinUI/Operational: event ID 5961, message:

Activation for 88888888-6666-5555-4444-111111111111_abcdefgh!App failed. Error code: Unknown HResult Error code: 0x80040905. Activation phase: COM App activation

Internally, the C# part would try to construct a native class instance from the App constructor, the native class constructor would encounter an unrecoverable error and bail. From the UWP subsystem standpoint, and from the debugger standpoint, though, this looked as something distinct from the mere programmatic exit. I'll leave this answer here, 'cause I've spent some time chasing various UWP failure scenarios instead of running under a native debugger.

I've replaced the exit() call with throw ref new Exception(E_INVALIDARG). At least this way the error manifests in the managed debugger, and the message is descriptive.

Jobe answered 2/5, 2019 at 15:43 Comment(0)
S
0

I've been having this problem a lot with a UWP Windows 10 app on Visual Studio 2019...for me the reliable workaround is to bump the Build number in the Package.appxmanifest file (Packaging tab). It's a huge pain...really hope Microsoft will sort this out soon

Stockbreeder answered 7/11, 2019 at 9:9 Comment(0)
R
0

Any existing error in the code can also cause this issue. Make sure your previous version of the code is working fine. Compare the difference and make sure all looks good.

Ruralize answered 7/5, 2021 at 22:33 Comment(0)
E
0

I was getting this error and nothing else worked so I had to dissect my program. Turns out I referenced a StaticResource in my App.xaml that didn't exist.

Seems like a silly error but you'd also think Visual Studio would pick up on something like that and throw a different error so if nothing else works, double check your application resources.

Ericerica answered 28/8, 2021 at 23:23 Comment(0)
B
0

As suggested by @Iman in a comment, in the UWP project settings, enable "Compile with .NET Native tool chain".

(After trying just about every answer in this question)

Bria answered 11/11, 2022 at 9:5 Comment(0)
L
0

I changed configuration (in Build, Config Manager and UWP, Debug Pane) to Release, and also platform to x86. The exception was then resolved.

I then reverted back to Debug, not Release, and the exception is only resolved in x86 mode. I have no idea why..

Lynden answered 3/11, 2023 at 7:14 Comment(0)
C
0

I was getting the same error when remotely debugging on an XBox, but not when debugging locally. I tried deleting the bin folder, restarting the Xbox and PC, reinstalling VS2022, and deleting the local repo and cloning again. The only fix that worked for me was logging in to my account on the Xbox.

Coco answered 16/1 at 1:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.