My MAUI App Cannot Be Deployed When Running Debugger?
My .net8 maui blazor app was running perfectly fine and was freshly pushed and merged while functional, but when I attempted to change the maui icon and splash screen properties of the svg's, in an attempt to use png's the app stopped working and I decided to undo everything. The problem is that now the project won't work anymore even though everything has been completely reverted and I don't know how to run it.
I did the first 5 minutes of this video which doesn't really do anything weird when it broke, just a few svg properties and changing icon stuff only.
https://www.youtube.com/watch?v=5cgrKARU3Bw
What I've Tried So Far:
- Clean/Rebuild/Build
- Restart PC
- Confirm Config Manager, Deploy was checked, even tried a newly made config.
- Deleted the project from my computer and made a new clone (from when it was working, i never pushed the changes that broke it btw)
- Repaired and Updated Visual Studio, with a restart.
Nothing is working and I don't know what to do, any help would be greatly appreciated.
128 Replies
fixed it?
nope 😦
try going to build then config Manager
right click on the Sln then you should see it
oh deploy is checked, mb try cleaning Sln?
then rebuild?
The project TellarknightApp is missing Android SDKs required for building. Double-click on this message and follow the prompts to install them.
after clean and rebuild
didnt have this the first time i did clean and rebuild
oh i see
just give me a sec
clicked the stuff and then back to original errors
do you have the checked in Visual Studio installer?
you might have mistakenly skipped that
oh wait i think ik
this is an android app right?
you might have to right click on sln->prop->Target framework and pick the newest version
trying to debug in windows, but i also test on android
k
so did you fix it>
?
cannot find any target framework
when i go to sln properties
Alt+Enter
Target Android Framework
messed around with checking/unchecking targeted frameworks, now im trying to do some updates for the sdk's and everything
oh k
wasnt having any changes which is why im making srue sdk's are updated
btw did you download any android devices?
in VS
yes been using it for a month
oh i see
ill see if it runs on the android emulator, only been trying windows
takes a few mins
alr
when trying to run it on android emulator, clicking yes gets the same error as before
did you try repairing the android device
the android emulator runs fine if i start it up beforehand, and running the app opens it up in the emualtor if its already running
do you mind scroll up here?
ill run it again to get that
k
sorry for the constant 5+ minute pauses, multitasking atm lol
take your time
k?
just cancelling build, gonna restart emulator to see if i can get the deploy error again
Build started at 10:47 PM...
1>------ Build started: Project: TellarknightApp, Configuration: Debug Any CPU ------
Build has been canceled.
========== Elapsed 03.222 seconds ==========
k
I'm trying rider for the first time (free version) and it seems to run on rider but not visual studio, at least the android version. Currently trying to figure out how to run a windows app in debug on rider for more testing purposes.
The problem is 99% likely to be visual studio related
was also never able to recreate that earlier to scroll up and check
gonna uninstall visual studio completey, and reinstall
what im looking at, after reinstalling visual studio and whatever rider automatically did to the libraries and stuff
and came back to this followed by original error screenshot, with a separate clone than the one i opened with rider
You have to pick net8.0-macaralyst as the target framework based on the error
Something about rider messed things up to get those messages when opening in visual studio, imo best to start fresh with a new clone.
After I opened up a fresh clone after reinstalling visual studio I got the error again, but now I get this extra popup beforehand. I did some tests it's working on android emulator but not windows.
And deploy is already checked?
Might have to restart pc ig
tested publishing it, this is what i got when i tried to use the msix installer file, tellarknightapp seems to be in the windows apps start menu folder but it's a blank file that cannot be run or uninstalled.
oh so the thing is because the application dont have a valid certificate yet ,it's getting blocked expect if you create and set the certificate locally
do you want to do that?
i know practically nothing about certificates, as far as i know my app doesnt have one unless it did it automatically.
give me a sec
so
Powershell ;ref:https://learn.microsoft.com/en-us/powershell/module/pki/new-selfsignedcertificate?view=windowsserver2022-ps
New-SelfSignedCertificate (pki)
Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
the "already installed" part is weird
since i never published this project before, only debugger
open Certificate Manager by clicking Win+R then type certmgr.msc
it is probably blocked to stop fake or unwanted app or non verified application from be ruined
Personal > Certificates >All Tasks>Export and then ...selete the Certificate you created
then in VS in Package.appxmanifest set the Publisher to CN=<YourAppName>
does that work?
Ive got these now, but idk what to do with them, and in that package.appxmanifest file doesnt have anything about a publisher.
Do I need to do this certification stuff to be able to uninstall the app so it will allow me to use debugger mode again?
it will allow you to be able to run it but if you are planning to uninstall
already checked before and it's not there.
I'm currently under the impression that something got corrupted while I was using the debugger while making some changes and I cannot uninstall this app, and it won't let me use debugger because of that somehow.
That's my guess
ref:https://learn.microsoft.com/en-us/powershell/module/appx/get-appxpackage?view=windowsserver2022-ps
Get-AppxPackage (Appx)
Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
look for the application name like TellarknightApp
in the output
the copy the full name which will look something like <AppName>_x64__8wsd....
then do
com.companyname.tellarknightapp com.companyname.tellarknightapp_1.0.0.0_x649zz4h110yvjzm
---
```PS C:\Windows\System32\WindowsPowerShell\v1.0> Remove-AppxPackage -Package com.companyname.tellarknightapp_1.0.0.0_x649zz4h110yvjzm
Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CFA, Removal failed. Please contact your software vendor.
(Exception from HRESULT: 0x80073CFA)
NOTE: For additional information, look for [ActivityId] af86df2e-3654-0001-fd36-8aaf5436db01 in the Event Log or use
the command line Get-AppPackageLog -ActivityID af86df2e-3654-0001-fd36-8aaf5436db01
At line:1 char:1
+ Remove-AppxPackage -Package com.companyname.tellarknightapp_1.0.0.0_x ...
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (com.companyname...__9zz4h110yvjzm:String) [Remove-AppxPackage], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand
PS C:\Windows\System32\WindowsPowerShell\v1.0>```
first time to using powershell lol
open powershell as admin
and try that
or
same result
try
cmd as admin
this is the full name right?"com.companyname.tellarknightapp_1.0.0.0_x64__9zz4h110yvjzm"
thats what i got here and it matches the error in visual studio, changing the appid in my project file doesn't change anything either
can you run
and send a Screenshot of what it shows
try doing that then run the Remove-.... again
is powershell opened as admin?
yes
takeown
Reference article for the takeown command, which enables an administrator to recover access to a file that was previously denied.
cmd as admin
why is it SO difficultttttttttt
then try running the remove thing again
want me to stream things in vc? 😄
can you try
if still not working
try
try that
do you think you can bootup in safe mode?
then try the cmds again?
I could prolly try in a bit
k
basically either same error or "cannot do this in safe mode"
oh i see
can you do Win+R services.msc then see if Remote Procedure Call,DCOM Server Process Launcher and RPC Endpoint Mapper is set to Automatic
and also AppXSvc is also set to Manual or Automatic
then click start
for each of them
and try the cmd again
in normal mode btw
cannot find an appxsvc
it should be in the 'A" category
all the a's
right there
AppX Deployment
and start it
ahh sorry, spent an all nighter so didnt notice it at the end of the name lol
no worries
refreshed it to make it run (was grayed out)
can you send a screenshot?
can you try
cmd-admin
and can you also send ScrrenShot of the output where the package is at?
i think thats it
oops
blue ss is wrong
can you try deleting it from the folder?
can you delete it from ?
deleted and no change, even restarted laptop
try again
try starting the RRC locator
can you go to Registry Editor and go to
and delete any keys or entries for tellarknightapp
last hope...
and also
in
TellarknightApp
try deleting that
everything
in the Tellar...
a few things that it wont let me delete, but been deleting everything with "com.companyname.tellarknightapp_1.0.0.0_x64__9zz4h110yvjzm"
try the ps cmd again ig
restarting laptop
AAAAAAAAAAA
is it possible to change the id of the project so it doesn't conflict?
(gonna need to have some rest soon for a few hours lol)
yea
though will say that simply renaming this does nothing
you can just open the VS then project prop and change the identity section
talking about applicationid?
(one of the first things i tried was changing that a day or two ago)
Alt + Enter