Can't debug Maui project with target project as Windows - maui

I've tested out my Maui project on Android and it works perfectly fine.
Now, I've been trying to test it out on Windows, but as soon as I start the application, the application closes. The output log also shows 2147942405 exit code. I've tried to run the application as admin and I've also opened up Visual Studio as admin but it's not been a help.
Is there something else I should do?

At first, did you try to create a new maui project and debug it on the windows? In addition, is your pc's system windows 10? If so, it seems an existed issue which is about MAUI apps crash on launch on Windows after Visual Studio update - code 2147942405 on the github.
And you can try the workaround in this issue which tried to download the Microsoft.WindowsAppRuntime.Redist.1.2.zip and run its WindowsAppRuntimeInstall.exe (as admin) .
Finally, you can follow up this issue on the github.

Related

How to publish a desktop application to another computer?

I wrote the first desktop application in Flutter, how can I get the things I need to run this application on another computer?
I found the Release folder (build\windows\runner\Release) with the following contents:
Content
But when I try to run the app, I only see a black screen.
Download Visual Studio 2019 or later it is required.
Download here
https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&channel=Release&source=VSLandingPage&cid=2110&workload=dotnet-cpluscplus
— If there are multiple build tool versions available, install the latest
Windows 10 SDK (10.0.17763.0)
then run one of following command in your project diroctory
flutter build windows
Then go to the release folder you should see the .exe file

MAUI MyApp.WinUI isn't running properly

I am using Visual Studio 2022 Preview where I created a plain MAUI .NET Project. The project runs on Android Emulator properly but the WinUI App doesn't run properly. It shows the message below. But I checked starting project and Debug Settings. Can anyone give me suggestions to run the MyApp.WinUI project on Visual Studio 2022 Preview?
This is a known limitation at this time. Have a look at David's blog post at the end
At the time of release, we are troubleshooting the latest Windows App SDK Single-project MSIX extension for Visual Studio 2022 and .NET MAUI to address a failure to debug. You can successfully deploy the Windows app directly and run it from the Start menu.
From Visual Studio, right-click on your WinUI project and click Deploy. That will make it show up in your Start Menu, you can start it from there. Once started, in Visual Studio you can go to the Debug menu and Attach to Process. Find the process of your app and attach the debugger.

visual studio for Mac unity execution failed

I am running the latest version of Visual Studio and the latest version of unity. When I open the project using Visual Studio for Mac, I am able to rebuild the app.
But, when I try to start debugging, I am getting Execution Failed without any explanation or build output.
I am able to run the app successfully on iOS through Xcode, although the iPad is refusing to start the app automatically and I have to open it manually.
The issue is that , I can't start the app on Visual Studio for Mac.
Apparently, If you open multiple instances of Unity, Visual Studio for Mac will get confused and will not know which project to attach to.
Having one instance solved the issue for me.

Windows Phone SDK 7.1 Emulator Complete Re-boot Error

I thank you all for reading this lengthy question. It's really important and I will appreciate it if you can assist me :)
The problem -------
I am have been using the Windows 7.1 SDK for about two months now. The emulator has worked without any problem so far. However, today, it began displaying this error (The saved state (Name of File).dess is corrupt. Please delete the corrupted saved state file and then retry). I had not made any significant changes to my project code, or moved any files. I had just added some Visual State animations for a button.
As it suggested, I went ahead to delete the file. I then started debugging again. However, the emulator now opened and displayed the message (Windows Phone Emulator is doing a complete OS reboot). This message was displayed for a very long time. I closed the emulator and project. Since then, I have been unable to use the emulator. I am able to code normally in Visual Studio, but I cannot test my application.
What I have tried ------
I read up on this issue and found many others who faced the same emulator issue. Following their suggestions, I have run one repair of the Windows Phone SDK 7.1. I have also tried uninstalling and then re-installing the SDK 7.1 once.
System Specifications -----
I am using Visual Studio Express 2010 for Windows Phone (Windows 7 64 bit)
I have downloaded the Windows Phone SDK 7.1 from this link: http://go.microsoft.com/fwlink/?LinkId=258412
I have read that this issue might be because of some hardware incompatibility. However, I think my machine is compatible with the emulator. Here is some information.
DirectX Version: DirectX 11
8GB RAM
Driver Model: WDM 1.1
Additional Information:
I have read that installing the 'January Update' might fix this issue. I tried downloading the update from this link: http://www.microsoft.com/enus/download/details.aspx?id=23854
However, the installer said that the update is not compatible with the product/version of the product I am using.
Usually the Repair function of the WP7.1 SDK is enough to fix all the issues. It runs the generation of the saved state of the emulator again.
Please try to delete files in %ProgramData%\Microsoft\XDE folder first (make sure you backup them somewhere else.), then run the emulator. If the emulator runs with a message "Windows Phone Emulator is doing a complete OS boot," let it boot. It takes some time though. This way you will know that the emulator actually can run on your computer. This won't generate a new saved state image, but the emulator should at least load.
Next, try installing WP7.1.1 SDK update from http://www.microsoft.com/en-us/download/details.aspx?id=29233. This update also installs additional 256MB emulator image besides the original 512MB image. It also generates emulator's saved states in the process, potentially fixing the issue.
If everything fails, then try these instructions to fix the saved state of the emulator:
Uninstall WP7.1 SDK
Manually delete these folders:
%ProgramData%\Microsoft\XDE
%LocalAppData%\Microsoft\XDE
Install WP7.1 SDK again.
Install WP7.1.1 SDK update: http://www.microsoft.com/en-us/download/details.aspx?id=29233.
Edit:
Btw, have you tried to reboot your computer? Once this fixed the issue for me.
Alright, I managed to solve this problem.
I reinstalled Windows and downloaded the SDK 7.1 again. The emulator works fine now!
#Paulos, thanks for helping!
I had the same problem for a long time. Try this:
Start up Visual Studio 2010, but before you start debugging, click on the tabs of all the open pages so that all the xaml pages and code behind pages can load.
I noticed it when I opened Visual Studio, but the first open page was a code behind page and not an xaml page, so when I first clicked on the tab of a xaml page, of course, it took some time to load the xaml page into the editor. However, when that and one or more open xaml pages were also loaded, the emulator started without the error message.

Running directx SDK samples on a Windows Mobile 6.1 device

I tried to run the directx samples from ..\Windows Mobile 6 SDK\Samples\PocketPC\CPP\win32\directx\d3dm\tutorials on a Samsung Omnia and on the emulator and it doesn't work because of a deployment error.
I am using Microsoft Visual Studio 2008 and have installed Windows Mobile SDK Standard and Professional refresh.
The device is correctly plugged in and set up for active sync (I know this because other samples work, also a creating Win32 smart device application and running it works).
When I try to run a directx sample application it compiles without errors but the message:
" There were deployment errors, Continue? Yes/No" appears
If I manually copy the application from the debug folder to the device and run it from there, it works.
The same deployment error message appears if I try it on an emulator. Other applications are deploying successfully.
Is there any way to make the deployment work? Maybe there is an obscure option I need to set...
What I do is:
Connect the Mobile device to the PC,
Open Visual Studio 2008,
Open a directx sample project,
Click Run (in Debug or Release mode).
The problem with the deployment is that the file msvcr80.dll could not be found.
It was specified at the deployment options as an additional file "Project->Properties->Configuration Properties->Deployment" then "General->Additional files"
with the paths msvcr80.dll|$(BINDIR)\$(INSTRUCTIONSET)\|%CSIDL_WINDOWS%|0;
Removing it makes the deployment successful. I have only tested this on a Windows Mobile 6.1 device and with the D3DM reference driver on an WM6.1/WM6 emulator.
What I haven't figured out is where does $(BINDIR)\$(INSTRUCTIONSET) point to.
Also I don't know why msvcr80.dll is in the addition files if it is not actually needed.
Is there actually a msvcr80.dll compiled for Windows Mobile platform on an ARM cpu?
I was able to resolve this issue after doing some low-level Sysinternals Debugging. It was trying to deploy NETCFv35.Messages.EN.cab to the device and in my case it was deleted for some reason. Re-installing .NET CF fixed the issue for me. Wish VS 2008 said what file was missing instead of a generic message. Hope this helps you too.