Archiving automatically says it is complete even though it did not create an archive (Maui in VS22) - xamarin

Trying to create an archive to make a release apk of my app, and whenever I click archive all, it instantly says the archive is completed, nothing shows in the archive manager, and there are no errors or absolutely anything for that matter shown for output.
I suspect it may have something to do with the versions as I was able to archive previously, but once I changed versions, I believe that is when the issue started. Also, the app builds and runs with no issue.

I think the tooling for publishing and archiving is still work in progress. I'm not 100% up to date with the status though. However, if you run into these things please report it through the Visual Studio Help menu and choose Provide Feedback > Report a Problem.
That will make sure it goes to the right team with all the right information attached.
As a solution for you right now, the command-line does work. Everything needed to create a version is described in the docs: https://learn.microsoft.com/dotnet/maui/android/deployment/overview

I have come across the same issue I think I may have identified the what may be causing the problem:
I did the following:
Created a new .NET MAUI App with .NET 7.0 (Standard Term Support). Without
changing anything - I selected Archive All - this worked fine.
Changed the following project property:
Changed from:

Related

Can't run a VS Universal Windows App project

I'm very new to Visual Studio and Universal Windows Apps Development. As a part of the course, I have this codeSHOW project provided.
I've cloned it successfully in VS 2015, but I can't run the project using the .sln file. Error:
Here's the error log: http://pastebin.com/c012Bba4
I have no clue how to fix it, and the issues on github go unanswered so I can't expect much from there.
This is an known issue in Visual Studio 2015.
The problem is with files with the exact same name under different folders in a Shared project, which in your case is "resources.resjson".
The only workarounds are either to make the file names unique and if that is not an option, to duplicate the files in the projects instead of sharing them out of the Shared project.
This is a VS2015 specific bug, the solution loads just fine on VS2013. You can get some insight into what is going wrong. First note that your got two message boxes that announced this error. Barely visible in your screenshot.
The failure.txt file gives more hints, you can see the stack traces of the two AggregateException that are raised when the solution is loaded. You'll see that two tasks are trying to load the same resources.resjon project item. Not correct of course, quacks like a standard concurrency bug.
Nothing actually goes wrong, Visual Studio can handle the exception and declares it "Recoverable", the projects are still loaded correctly. And compile just fine. Only other thing you need is the Bing Maps SDK, you can download the correct version here.
If you have VS2013 then prefer that version, it doesn't have this bug and loads the solution without any complaint. And minimizes the odds that you'll run into other quirky problems. Given the current stability of VS2015, not great, it is the best way to avoid losing time. Otherwise just ignore the mishap and close the message boxes, some future Update will no doubt fix the bug. You can report it at connect.microsoft.com if you wish. Not actually necessary I think, it looks like VS is phoning home.

Unable to Activate Windows Store App

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?
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.
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.
For me a RESTART of pc solved this error message.
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.
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.
This can be solved by Uninstalling the app from the start screen then again building the app from Visual Studio.
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.
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
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.
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
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.
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.
Increasing the revision number of the package worked for me
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.
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
For me, the fix was a combination of two of these answers -
Renew the developer license (How to get a developer license in Windows 8)
And deleting the build directories (though I deleted more then the screenshot depicted) Delete the Build directories
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
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.
Because of Two things i resolved this issue.
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.
Just Restart the Visual Studio. And Clean Build and Rebuild the solution and RUN it.
Hope this helps.,
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))
...and now I can sleep.
Hope it helps somebody.
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.
For me changing the Package Name in Package.appxmanifest fixed the problem
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.
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
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.
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.
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)

General failure building bootstrapper

while doing the build of my dontnet 4.0 project setup i'm getting following errors
An error occurred generating a bootstrapper: Unable to finish updating resource for E:\project\Setup\Debug\setup.exe with error 8007006E E:project\Setup\Setup.vdproj Setup
General failure building bootstrapper E:\project\Setup\Setup.vdproj Setup
Unrecoverable build error E:\project\\Setup\Setup.vdproj Setup
I am using dotnet framework 4 and MSVS 2010.
This happens because The .NET framework version required by the setup project is different than the .NET framework version targeted by the application.
To change verify this:
In Solution Explorer, click the Setup project.
On the View menu, point to Editor, and then click Launch Conditions.
Click .NET Framework.
In the Properties window, change the Version property to the version of the .NET Framework that you want the Setup project to check for and install.
And also you need to Make sure that the Setup.exe program also checks for and installs the correct version of the .NET Framework.
Right click on the setup project -> Properties -> Prerequisites -> Select the correct ones.
When I turn McAfee real-time scan off, it works. I spent 2 hours on figuring this out :(
I googled a lot on this issue after trying all i just disabled my antivirus(NPAV) and this issue was solved.
turning off mcafee real time scanning worked for me as well on Windows 8.1
Here is yet another solution, this one is unlike the rest...
We recently added NTFS replication to our build tree root to provide some additional data redundancy and to begin to sync our old build machine with the new server. The NTFS replication caused some projects to fail with the exact same three error reported, and yet other projects work just fine. Set the replication on only run at night and the problem stopped occurring...
K
I got the same error when I changed targeted framework to 4.0 but neglected to change prerequisits for click once from 3.5 to 4.0 as well.
Fixing prerequisits resolved the problem.
Instead of disabling the Anti-Virus, I would suggest to just create an exclusion for your Solution Folder. See documentation if you are using Windows Defender. Microsoft Support
I've just had this same error and then realised Dropbox was running. I closed Dropbox and then the build completed successfully.
Thank you qwerty13579! How stupid of me, the solution is obvious. I have tried all sorts of things suggested over the internet, and even with the most recent version of VS Community 2017 (15.9.9), the bootstrapper failure pops up erratically, but with increasing frequency, to the point of frustration this past week. The principle: It doesn't succeed reliably, so it also doesn't FAIL reliably. The solution: Click the Publish Now button and watch the output panel. When it's that clear that it's failing, click the Publish Now button again immediately. Keep at it until it succeeds! Each round only takes a couple of seconds, much less time that it takes to re-build, take down anti-virus, and all that fancy stuff.
In my case, I traced the problem to an incorrectly dated setup.exe file in the bin\Release\app.publish folder of my application. When it fails, Publish Now creates an setup.exe that's two years earlier than the current day. When it succeeds, the setup.exe file is correctly dated.
Got the same problem. I disabled Windows Defender real-time protection and it worked. I also added the folder where the solution is saved in exclusions for Defender, and that allowed me to publish as well.

Xcode error: failed to launch

I have a Mac app I have written to support iCloud. However, I get this when trying to run the app:
error: failed to launch /Users/padsoftware/Library/Developer/Xcode/DerivedData/Scrawl-heofvoywsunchdhjowxkvkoiqvan/Build/Products/Release/Scrawl.app/Contents/MacOS/Scrawl
The odd thing is that this appears for all of my Mac apps, with or without iCloud, with or without sandboxing, with or without entitlements, or ever with or without code signing. Any idea on how to fix this?
I had this problem too. For me, it was a code sign issue. Make sure you're signing with developer, not distribution.
I encounter this problem every once in a while. Like the others mentioned, these are the steps I take:
1. Clean (Shift+Cmd+K) ------
Removes all the product files, as well as any object files (.o files) or other intermediate files created during the build process (Apple Doc)
2. Navigate to "~/Library/Developer/Xcode/DerivedData", delete folder for app in question ------
Derived data consists of project indexes, logs, and build products including intermediate files (Apple Doc)
3. Restart Xcode
One or the other usually fixes it. I haven't had to change Code Signing settings, but that would be my next step. Wouldn't re-install Xcode unless absolutely necessary.
I had such problem also and restarting Xcode Fixed the issue .
even it happened after renaming the application ....
Under Build Settings make sure you are signing with a valid developer profile for debug and release.
Then Build for Testing
That fixed the problem.
"Product"->"Scheme"->"New Scheme" fixed my problem
Just in case it helps anyone else, my problem was fixed by rebooting my iPhone (4S). Then the app suddenly appeared on the Springboard (it was like it was already installed but somehow hidden).
...I did all the other steps (restart Xcode, clean project, delete derived data) but none of it worked this time.
What worked for me... I was already code signed as developer so I cleaned my code
menu bar -> Product -> Clean
That still didn't fix it but I noticed that I was getting handshake error, I had a large amount of apps already running on my phone (~15-20) so I exited out of all of them and retried. It worked after exiting out of all other apps.

Sharing an archived iOS build won't succeed on the clients side - no such file or directory

For one of my clients, I've developed a small iOS app. I'm a member of their dev team, so I've been using a development certificate to sign my local test builds.
Now the app is almost done and it should go into internal testing on the clients side. I created an archived build of the app which I then sent to my client. They imported it into the organizer and tried to "Share" it to be able to re-sign it using an ad hoc profile.
Creating the .ipa fails with an "no such file or directory" error though. The archive appears to be fine otherwise - the organizer shows all the usual information, the icon, and it will let them export it as another archive. Creating an .ipa without re-signing fails as well, which leads me to believe this is not an issue with ther certs and provisioning profile.
If I try the same thing on my side, writing an .ipa from the very same archive using my development cert, the operation succeeds.
It may be worth mentioning that the same procedure was working fine while we were still using XCode 3.x on earlier projects. This is the first time we've been trying this using XCode 4.
No additional (static) libraries have been used.
Any help greatly appreciated!!
Edit:
Someone at the apple dev forums suggested to me that I should check the system console for xcode error messages while attempting to export the .ipa - none were printed out. We discovered some other, older messages however, which read as follows:
18.04.11 13:54:35 /Developer/Applications/Xcode.app/Contents/MacOS/Xcode[123] /Users/User/Library/Developer/Xcode/Archives/2011-04-15/Foobar.xcarchive/dSYMs/Foobar.app.dSYM/Contents/Info.plist:
set flags (was: 00200000): Operation
not permitted
The timestamp is roughly at the time when my client first imported my archive, but we can't be sure since we didn't watch the console back then.
The message had been printed multiple time, once for every single ressource file contained in the bundle. Does this tell you guys something?
Problem solved.
Following another suggestion on the apple dev forum, we repaired permissions on both systems. Additionally, I built and archived the app again and used a different way to transmit the archive to my client. We did all of this in one try, so I can't quite tell which of these measures actually did the trick. If you stumble across this because you have the same problem, you might want to try all of this, too.
Thanks for listening!
Update:
It happened again - and this time, we tried to solve it step by step. Result: It's all about how the file is being transmitted. I just attached the archive package to a mail to my client, that's what broke it, although I don't know why. Zipping the archive before transmitting it solved the problem, however.
After downloading XCode 4.3 beta with the IOS 5 SDK, the Organizer function to share and archive stopped working with a cryptic error "No such file or directory found".
It turns out that this is related to having two different versions of codesign_allocate . To fix the problem, do the following in a terminal window.
sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin
Another hint - try the manual way to create a shared ipa - since it gives you a lot more detail of what went wrong. See http://blog.dmahajan.net
Can you see if this is also linked to your problem?
EasyCoder's answer fixed this issue for me - I have the 5.0 beta SDK and had the same problem.
I ran the following and it was fixed:
ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin/codesign_allocate

Resources