Search code examples
windows-store-appscontractevent-viewer

What contract am I not specifying?


When I try to run my Windows Store app, it won't, and shows me this:

enter image description here

..."does not support the contract specified"? What contract? I'm not implementing any contract; I assume it means the Settings contract or some such, but I'm not doing any of those yet.

I went to the Help page suggested, and it says, in part, "To diagnose these errors There are no sure ways to fix these errors. Use these techniques to diagnose the problem."

The first suggestion is:

Open Event Viewer (on the Windows Start menu, search for Event Viewer.) In Event Viewer, navigate in the tree to the Application and Services Log\Microsoft\Windows\Apps folder. Filter the view to event Ids: 5900-6000 Examine the log and see what occurred.

Windows 8.1 only brings up web pages when I search for "Event Viewer"

Actually, I did write a utility to catch event logs, and I ran that. I found these:

***Type: Error Source: Microsoft-Windows-Immersive-Shell Time Generated: 11/27/2014 15:10:39 Message: Activation of app App.adaf78a74.a8c80.a4ff5.a99ca.a97636d548196_8wekyb3d8bbwe!Designer.App failed with error: -2144927148 See the Microsoft-Windows-TWinUI/Operational log for additional information.

Type: Error Source: Microsoft-Windows-Immersive-Shell Time Generated: 11/27/2014 15:20:08 Message: Activation of app axXAndSpace.Visits_qtyjefqf75sa6!App failed with error: -2144927148 See the Microsoft-Windows-TWinUI/Operational log for additional information.***

But where is "Microsoft-Windows-TWinUI/Operational log"?

The second suggestion on the Help page was:

Use the native debugger Configure the project to run under a native debugger. In Visual Studio, set the Debugger Type to Native Only on the Debug (Debugging in C++ and JavaScript) page of the property pages of the start-up project. Look at the exceptions being thrown by looking at the output window. You might want to configure the debugger to stop when these exceptions are thrown.

I did that, but it gave me no more information than previously - nothing at all displays in the Output pane.

What could be the cause of this?

UPDATE

Just to update the progress:

Based on Iris Classon's suggestions, I went to Control Panel to see if my app was installed so that I could uninstall it, but it's not in that list.

If I search for the app by typing its name, it tries to start up - its splash screen displays, but goes no further than that.

I went to Program Files\WindowsApps, and when selecting it got, "You don't currently have persimmons to access this folder, click continue to continually get access"

That leads me to "You have been denied permission to access this folder; to gain access to this folder, you will need to use the security tab"

Click the "security tab" link takes me to that tab, and a "For special permissions or advanced settings, click Advanced"

I do so.

That takes me to a Permissions tab, which says, "You must have Read permissions to view the properties of this object; Click continue to attempt the operation with administrative permissions"

I then selected (one at a time, as that is all it allows):

Trusted Installer : Full control
System: Read, Write, and Execute
System: Full Control
Administrators: Read & Execute

But so far, none of that seems to do anything good.

UPDATE 2

This problem has just "gone away" today; I don't think it was anything I did. I added a UserControl, tried running the app again, and now it runs - I don't see that error message. However, I do see a seemingly unrelated one. (at least I got further).


Solution

  • I just had this problem on a fresh install of Windows 8.1 on my laptop. I'm not sure which one of these steps solved it, but until somebody can give you a more exact answer here is something to try as I am sure you are keen on coding.

    Only Store Apps run from VS gives that error, other Store apps work fine.

    I first of all changed permissions on my WindowsApps folder under Program Files and made sure that I had full access to the folder and sub folders. Restarted the laptop, still no luck.

    Then I set up an admin guest account (just something I tend to do for when I need to record tutorials- so not related to trying to solve the error). Out of curiosity I tried to create and run the same Windows Store App and got an error that another user had installed the app. Strange, how was it installed if it gave me the error that it couldn't activate the app on the main account?

    I logged back in as the main user and uninstalled the application (which was showing up as installed), and I can now run any Store App from VS without problems.

    Not sure this is an answer since I'm not sure what made it work, but give it a try and hopefully somebody else can clear this us up. I'll investigate further, but I'm on a train right now with poor WiFi connection :)

    Best of luck!