Visual Studio 2015 Update 2: Registration of the app failed. (0x80073cf6) - c#

I'm experiencing the Registration of the app failed. (0x80073cf6) error.
What I've tried so far:
Delete the package in AppData (I can't find it anymore there, the package family name has been changed to my associated store listing).
Repair Visual Studio
Acquire developer license
Make a new project (that works, for the 1st time, after that same error).
It happens on my phone (950XL, developer unlocked) and on my machine.
I can't debug my app in anyway now.
I'm on Update 2 of VS 2015

In the question, the project-type is not specified, but I think, it can be the same problem, I have...
I have installed VS2015 Update 3 RC and created a Xamarin.Forms shared project from template (without any changes in the project).
Same error for UWP- and Windows 8.1 projects, where Windows Phone 8.1 works in the emulator.
I store my project on a network-drive (what never was a problem with earlier .forms-projects, that have not included UWP- and Windows 8.1-projects).
I have changed the Output path from \bin\debug\ (=sub-directory of the project folder on the network drive) to C:\Temp\Debug and... the error has gone.
So.. it seems as (at least Xamarin-) UWP- and Windows8.1-projects have a problem, when the output-directory points to a network drive.
This is not a final solution for projects on a network-drive, but a workaround to be able to develop until the real problem can be solved (I hope for some changes in VS or a clear advice, what to change regarding the rights of the network drive to solve the problem from MS).

<Properties>
<DisplayName>Name</DisplayName>
<PublisherDisplayName>Other Name</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
In the app manifest file, change the "Name" to anything else. And it'll work.
That is it.

Related

UWP App Won't Start

I have a UWP app. I'm using Visual Studio 2017 15.4.1. The UWP app is a store app and has been deployed to the Microsoft Store. My app was working fine in the store, and it was also working fine when I hit play in Visual Studio. Then recently, an isolated storage issue started occurring so I went in to the app in "Apps & Features" and hit Advanced Options -> Reset. Somehow this has fried my app installation on my machine. Our app no longer shows up as an installed app, and when I try to install the app from the store, I get an error with a code of 0x80073CF9. So, I can't uninstall, or reinstall on my machine. I've tried running sfc /scannow etc. to find out what's wrong, but nothing seems to help.
This wouldn't even worry me too much, but I can't even develop right now because when I try to run the app from Visual Studio, I get this error:
In order to debug this project, you must consume it from a Windows
Store app project that creates a package and is marked as the Startup
Project
I'm getting this error in the output window from the build
4>DEP0700: Registration of the app failed. [0x80073CF9] Another user
has already installed an unpackaged version of this app. The current
user cannot replace this with a packaged version. The conflicting
package is [APP NAME] and it was published
by CN=[Publisher].
What did I do wrong?
You can use Get-appxpackage -allusers *<appname>* | Remove-AppxPackage
The allusers option is important here.
You can also try to manually remove the content of the application cache folder in C:\Users\\AppData\Local\Packages\. If you have one locked file here, the whole deployment will fail.

Xamarin - Android - Visual Studio - The application could not be started

I was working on an Android project using Xamarin in Visual Studio 2012. I recently upgraded from an HDD to a SSD so I reinstalled Windows and all of my programs.
After cloning my git repository and trying to run the application on my device, I have not been able to get it to run. I was able to start a new hello world project and I got that to run, but I can't get this project to run.
This is what the error says:
The application could not be started. Ensure that the application has been installed to the target device and has a launchable activity (MainLauncher = true).
Additionally, check Build->Configuration Manager to ensure this project is set to Deploy for this configuration.
I have searched for a solution to this issue but have been unable to find anything that worked.
I solved the issue. Somehow the application still existed on my device even though it did not show up in my applications and I needed to remove it.
The solution was to find an old APK that I had emailed and I installed that. Then I uninstalled the application and deployed it again from Visual Studio. This time it worked.
You can read more here: https://forums.xamarin.com/discussion/8501/install-failed-update-incompatible
EDIT (March 13th, 2017):
Seems a lot of people found this answer useful so I decided I should update it with an alternate method to uninstall the app if you don't have access to an old version.
As Atul Chaudhary and Nestel mentioned, you can open up your adb command prompt and run adb uninstall <com.your.application.package.name>. If there are any remnants of your application which remain this should get rid of them.
Renamed Application name.
Added Package name.
App. started working on Emulator, Renamed application again, app. continued to run.
Note: Resetting device, un-installing the app. and related runtime etc. from settings did not work for me.
Hope this helps someone.
Running this command from the adb shell solved it for me:
adb shell pm uninstall -k com.packagename
To access the adb shell from Visual Studio Tools -> Android -> Android Adb Command Prompt.
Very interesting error, seems like Visual Studio is unable to unistall the previous version completely.
Obviously the OP figured out the issue to their problem but I still wanted to post an answer relating to an issue I had with the same error message. I am using Visual Studio (within Parallels) and attempting to debug the app on a Xamarin Android Player instance (which is running on my Mac).
I kept getting this error and realized that a different, more helpful, error message was showing up in the Build Output saying that I was not supporting the correct architecture.
Heading into the Android Project Properties -> Android Options -> Advanced -> and checking x86 finally allowed my to successfully deploy to the Xamarin Android Player.
The ADB approach does not worked for me.
I did not want to factory reset my phone nor uninstall my apps so I have managed to deploy by changing the package.
Right click on your Droid project
Select Properties
Got to Application Manifest
Change the Package name
Re-deploy your project
Hope this helps
I had the same error today, trying to run Xamarin Android-app on Xamarin Android Player. To fix it I needed to check the "x86" box at the "Supported architectures" section. So you might want check this section.
I experienced this problem when there was not sufficient memory on device. After "successful" deployment the app was missing even from the app list in Settings. Deleting through adb gave me Failure which indicated it was not installed. In Output log in VS2015 I was having the same message as OP. Finally it worked after I cleaned up about 50-100 MB, even though in App Settings it showed me that there were 500 MB free. I tried different solutions (deleting through adb, cleaning, building then deploying) but only cleaning up worked.
adb uninstall did the trick. The strange thing is that even if you run the command to list all app that are installed it will not show up but if you run the uninstall command with ur package name which should be ur project name or name that you have assigned you will get the success result which means it got uninstalled and to check that if run the uninstall command again with same package name u will get failure command. Then deploying ur package again should work
In my case issue was two activities were Launcher activities,so I made one of them Launcher activity.
You can remove
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter> from AndroidManifest.xml file or
MainLauncher = true from .cs Activity file attribute
If you've reinstalled everything you may have to set the configuration manager back up in VS.
In Visual Studio: Build -> Configuration Manager -> Put a check in the "Deploy" box.
I've managed to solve it by wiping user data from emulator.
From AVD Manager, when you start the emulator, check "Wipe user data" and your emulated device will behave like new.
Problem itself appeared after updating to Android SDK Tools 25.1.3.
I could not get this working, initially. Tried removing everything (Mono runtime, app, etc.), but to no avail.
What did work was renaming my package, which was fine in my case since I haven't release my apk yet. Some ghost version is obviously still stored on my unit.
Renaming Application Name and Package Name (go to Manifest settings) where helped to resolve this issue
The only alternatives which help me solve this were the following:
From the Xamarin Android Studio home page (where all devices are displayed), click on the "three-dots" button and then Factory Reset.
OR
Install a new device and deploy your app there.
Whenever I encounter this problem, I publish the app and install in manually using
adb install "<path to apk file>"
in the Android Adb Command Prompt.
Hopefully, a fix is out soon, according to
https://github.com/xamarin/xamarin-android/issues/3727
Happened to me today, after updating a project from Git and running in Android Emulator. Uninstalling the app from emulator, performing Clean and Rebuild in VS and instaling the application again helped.

How to do a clean uninstall/install of Visual Studio 2015?

Operating System: Windows 10
Background of the issue: I was working on an C# web MVC type of project on VS2015, my computer suddenly crashed (due to memory issue.) Then, I restarted VS2015, and tried to load my project; however, the solution explorer would not show my files, so I decided to try different projects and the same issue happened. Therefore, I decided to create a new project, but the new project window would not display the templates at all (F#, C#, web MVC ...etc.)
So I figured some VS2015 files got corrupted, so I decided to do the following:
Ran repair through the installation
uninstalled, then installed VS2015 again.
I uninstalled through Revo Uninstaller, deleted all the registries, and folders. Then, I ran regedit and manually deleted all VS2015 registries (I was getting desperate)
None of the above worked...
P.S. I am using the Community edition.
Mount the iso, if it's drive letter is 'd', run the code below in command prompt. (replace 'd' with the drive letter)
D:\vs_community.exe /uninstall /force
Just as #TomBlodget answered, the issue was with the Windows user where the incident happened. When I launched VS on a new windows user, it worked fine. For now, I will keep using the new Windows user and once I figure out what happened with the original user, I will post it here for future reference.

Acess Denied to installed application on Windows 8

I've developed an application in Visual Studio 2010 but I used the VS 2012 to create the
Setup Installer. It's working perfect when running it on Visual Studio 2012, no errors at all.
Detail: I builded this when I used win7, now i'm using windows 8
But when I install the application and try to run it, when it tries to overwrite the app.config file it throws the exception. I already tried to give permission by RightClick - Security tab but didnt solve the problem. I found THIS thread that looks like my problem. But didnt worked... All I have on my app.config is the connections strings. What may it be?
UPDATE
I gave permissions to Users/PC1 in each file.cfg and to the whole folder that the files are in.
And now it seens that it worked, but what may I do to do not need do all of this to run the applpication ? I want to install without needing to give permission to the folders and files. (It's a win8 complications... -.- ).
It sounds like a permission issue, mostly with the project folder potentially.
You should try the following steps:
Run Visual Studio as an Administrator.
Verify that your User Account can Read / Write to your project folder.
Ensure that your Local Service, Network Service, or Local System
Off the top of my head those would be what I would try, more then likely Visual Studio isn't able to modify your app.config which would be tied to your Local Service account- The one that would be tied to your System.
Though the inner content isn't the problem, it is tied to your Directory Permissions which may be inherited to the sub-folders and sub-files.
Hopefully that helps.

Could not load Microsoft.Build.dll in Windows Phone 8 SDK and VS 2012

I have installed the Windows Phone SDK 8.0 and Visual Studio 2012 Premium with Update 1. When I create now a new phone project I get three errors:
Error 1 The "CompileXaml" task could not be instantiated from
"C:\Program Files
(x86)\MSBuild\Microsoft\WindowsPhone\v8.0\Microsoft.Silverlight.WindowsPhone.Build.Tasks.dll".
Could not load file or assembly 'Microsoft.Build.dll' or one of its
dependencies. An attempt was made to load a program with an incorrect
format.
Error 2 The "CompileXaml" task has been declared or used incorrectly,
or failed during construction. Check the spelling of the task name and
the assembly name.
Error 3 The name "LocalizedStrings" does not exist in the namespace
"clr-namespace:PhoneApp24". C:\PhoneDevelopment\PhoneApp24\PhoneApp24\App.xaml
While googling I found some guys out there who have similar errors while using Windows 8 in a virtual machine. But in my case I have installed everything on my laptop. I have also already uninstalled VS2012 and the SDK. But after the reinstallation I still get the same exceptions.
Can someone please give me some hints?
This happened to me as well after trying to create a project using a VMWare shared folder for the file. Try creating the project in a local directory if you are using a VM then the project will build fine. Apparently the assembly files are either not downloaded properly or do not have permission to be read. More than likely it's the namespace itself causing the issue.
Error 1 Could not load the assembly file://\vmware-host\shared folders\Documents\Visual Studio 2012\Projects\NewApp.dll. This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust. See http://go.microsoft.com/fwlink/?LinkId=179545 for more information.
Try running VS2012 as administrator.
After spending hours trying to get the sdk working I finally did a window recovery. Since windows 8 this is now a very quick process. Just insert the windows cd and run the setup again. If you choose the right option you can reinstall windows 8 without loosing your data. After 10 minutes your system reboots and you have to fill in again some data.
After that I installed the SDK. No error poped out and everything went very smoothly. Then I started VS express, created a project and built it successfully!
After the SDK installation I found two additional tiles on my desktop: "Hyper-V Manager" and "Hyper-V Virtual Machine...". I am pretty sure that those two tiles were not when I installed the SDK before. So I guess that I have had some problems with my virtual machine and that this was probably the source of the building exceptions.
I had this trying to run one of the Office 365 API samples and it turned out to be a missing file in the solution. Specifically, the solution was expecting a temp PFX certificate at the root of the project. I removed that and the build errors stopped.

Categories