BuildFailedException: Failed to export self-signing certificate for appx Package - unity3d

I am building a small app for Hololens 2. When I choose "Build And Run" in Unity, it makes it close to the end, but I get this error:
BuildFailedException: Failed to export self-signing certificate for appx Package.
Output:System.Security.Cryptography.CryptographicException: Input data cannot be coded as a valid certificate. ---> System.Security.Cryptography.CryptographicException: Input data cannot be coded as a valid certificate.
Here are my build settings:
Other settings:
Unity 2019.4.14f1
Visual Studio Community 2019 16.8.2
What I have tried:
generating a certificate with a password
generating a certificate without a password
executable only build type
D3D Project build type
restarting Unity
installing the certificate on my machine
restarting my computer
Using "Build" instead of "Build And Run". This results in "Build succeeded".
Switching to ARM architecture instead of ARM64
Following deployment instructions at https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/BuildAndDeploy.html
What do I need to change to get this to deploy successfully?

To fix:
Uninstall all Visual Studio stuff. Visual Studio, Build tools, everything.
Reinstall Visual studio following these instructions: https://learn.microsoft.com/en-us/windows/mixed-reality/develop/install-the-tools?tabs=unity
Install a few additional packages. Visual Studio Installer -> Modify -> Individual Components tab, find "C++ Universal Windows Platform support for v142 build tools (ARM 64)" and "C++ (v142) Universal Windows Platform tools", and select "Modify" in the bottom right.
After that I was able to deploy the package to the Hololens, using the D3D build type and a new build folder.

Related

How to fix a packaged WinUI3 app build, what makes trouble with ProcessorArchitecture?

Today i'm trying to build a .NET 6 WinUI3 App in AzureDevOps. My csproj contains:
<TargetFramework>net6.0-windows10.0.22000.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>MyApp</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<PublishProfile>Properties\PublishProfiles\win10-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
<ApplicationIcon>Assets\2764a994e49c43a2932b6d7f465e99eb.ico</ApplicationIcon>
<PlatformTarget>x64</PlatformTarget>
As "Build Platform" i have defined in Pipelines variable "x64". As error i become:
[error]C:\Users\VssAdministrator.nuget\packages\microsoft.windowsappsdk\1.1.2\buildTransitive\Microsoft.Build.Msix.Packaging.targets(1016,5): Error : Packaged .NET applications with an app host exe cannot be ProcessorArchitecture neutral. Please specify a RuntimeIdentifier or a Platform other than AnyCPU.
I'm wondering why this happens and how to fix it?
I figured this out! In Visual Studio, right click on your solution and click properties. For me, a few of the projects didn't have a Platform selected. I changed them all to x64 and the build succeeded. Hope this helps.

Visual Studio not installed and Install Desktop Development with C++ [duplicate]

My Flutter Doctor is saying:
Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all
of its default components.
How can I fix this problem?
It's basically saying that if you want to develop your Flutter application for Windows you will need to install Visual Studio 2022 and while installing Visual Studio 2022 you will need to download this: Desktop development with C++
Also, you have to install the third link in this: Visual-studio
You could also get desktop development with the C++ tool after installing Visual Studio and then navigating to tool → Get tools and features → Desktop development with C++.
The error means install Visual Studio, and this is different from Visual Studio Code. It's an IDE from Microsoft.
For those who may be using a weak computer and can't afford to install the full Visual Studio, you only need to install a few components from Visual Studio to get Flutter to run on your computer without errors. These components are:
MSVC v142 - Visual Studio 2022 C++ x64/86 build tools.
Windows 10 SDK (for Windows 10 users)
C++ CMake tools for Windows.
In total, they should occupy around 8 GB or so.
As it states, you need to download Visual Studio (which is different from Visual Studio Code).
When installing it, remember to select the required package Desktop development with C++:
This will not prevent you from developing Mobile apps, but it's a requirement only for Windows Development.
Is unnecessary to install the "Desktop development with C++" if you don't want to develop desktop applications for Windows using Flutter.
If you only want to develop mobile apps using Flutter, you can run
flutter config --no-enable-windows-desktop
to disable the desktop support for your Flutter projects. After that, when you run the flutter doctor command again, you will no longer see the warning.
Read more at: https://fig.io/manual/flutter/config
Only two steps are required.
Install Visual Studio 2022 (Link: https://visualstudio.microsoft.com/downloads/)
Install Visual Studio Code (Link: https://code.visualstudio.com/)
Your code will run smoothly.
My solution was a bit simpler. Uninstall everything all build system's from VS. Then reinstall Visual Studio Community 2022, restart then try again. Might get a warning about nuget but it should fix the issue.
With the newest android installer "android-studio-2022.1.1.19-windows" there would be a jbr and jre folder existing, hence creating a link from jre to jbr would not work.
What you can do is copy the contents of the items in jbr into the jre folder and this would resolve the error.
Make sure to install Visual Studio Code.
Open the Visual Studio download page:

Visual Studio not installed; this is necessary for Windows development

My Flutter Doctor is saying:
Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all
of its default components.
How can I fix this problem?
It's basically saying that if you want to develop your Flutter application for Windows you will need to install Visual Studio 2022 and while installing Visual Studio 2022 you will need to download this: Desktop development with C++
Also, you have to install the third link in this: Visual-studio
You could also get desktop development with the C++ tool after installing Visual Studio and then navigating to tool → Get tools and features → Desktop development with C++.
The error means install Visual Studio, and this is different from Visual Studio Code. It's an IDE from Microsoft.
For those who may be using a weak computer and can't afford to install the full Visual Studio, you only need to install a few components from Visual Studio to get Flutter to run on your computer without errors. These components are:
MSVC v142 - Visual Studio 2022 C++ x64/86 build tools.
Windows 10 SDK (for Windows 10 users)
C++ CMake tools for Windows.
In total, they should occupy around 8 GB or so.
As it states, you need to download Visual Studio (which is different from Visual Studio Code).
When installing it, remember to select the required package Desktop development with C++:
This will not prevent you from developing Mobile apps, but it's a requirement only for Windows Development.
Is unnecessary to install the "Desktop development with C++" if you don't want to develop desktop applications for Windows using Flutter.
If you only want to develop mobile apps using Flutter, you can run
flutter config --no-enable-windows-desktop
to disable the desktop support for your Flutter projects. After that, when you run the flutter doctor command again, you will no longer see the warning.
Read more at: https://fig.io/manual/flutter/config
Only two steps are required.
Install Visual Studio 2022 (Link: https://visualstudio.microsoft.com/downloads/)
Install Visual Studio Code (Link: https://code.visualstudio.com/)
Your code will run smoothly.
My solution was a bit simpler. Uninstall everything all build system's from VS. Then reinstall Visual Studio Community 2022, restart then try again. Might get a warning about nuget but it should fix the issue.
With the newest android installer "android-studio-2022.1.1.19-windows" there would be a jbr and jre folder existing, hence creating a link from jre to jbr would not work.
What you can do is copy the contents of the items in jbr into the jre folder and this would resolve the error.
Make sure to install Visual Studio Code.
Open the Visual Studio download page:

Invalid password when signing Tizen package

I'm having trouble signing a basic Tizen package, here are the steps I've followed:
Installation:
Execute the Tizen studio 3.0 web-ide installer
Accept the license agreement
Use the default SDK and Data location (click install)
Launch the package manager
Install the 4.0 wearable package
Exit the package manager and launch Tizen studio
Create the Project:
Launch with the default workspace
File->new->Tizen project
Select template
Select wearable 4.0
Select native application
Select basicUI
Finish
Create the Certificate:
Tools->certificate manager
Click the "+" button to create a new certificate profile
Name the certificate "TestCert"
Select "Create a new author certificate" and click next
Filename:author
Author Name:Sam
Password:password
Select "use the default Tizen distributor certificate" and click Finish
Exit out of the certificate manager
Try to Build the Package:
Select the project you created earlier
Project->build signed package
I get this console output:
Initialize... OK
Copying files... OK
Signing... java.io.IOException: Invaild password
I am aware of these other stack overflow questions but they do not help me:
tizen studio (x64) - Build Signed Package - Creating package failed - java.io.IOexception: Invalid password
Sign application package with cerificate profile in tizen studio
Can anyone spot what I'm doing wrong?
This was all done on Debian 9.
I am not 100% sure of what I am saying here. It appears that Tizen Studio on Linux uses secret-tool (https://manpages.ubuntu.com/manpages/xenial/man1/secret-tool.1.html) to store certificate passwords. If the Platform Keyring (Gnome Keyring) is not configured properly, secret-tool fails and Tizen Studio does not appear to propagate this failure properly to the user. There are too many variables here, but one should first try running the secret-tool that gets shipped with the Tizen Studio IDE (tizen-studio/tools/certificate-encryptor/secret-tool) and see if it throws any errors when trying to save a password.

Visual Studio doesn't generate the iOS "ipa" executable with Xamarin

I am trying to generate the ipa file in order to publish it to the Apple Store but Visual Studio (2015 Community Edition) doesn't create it.
I followed the steps from the official Xamarin docs but it doesn't work, I tried selecting "AdHoc", "Release" and "AppStore" (with iPhone platform selected), I have the last Xamarin updates in my Windows and Mac build hosts, the build process ends succesfully but the ipa file doesn't appear in the **Bin > iPhone > Ad Hoc (or Release) folder.
I am using the distribution profile.
I would really appreciate any help.
A combination of clearing the bin/iPhone/Ad-Hoc folder, changing the build number, restarting Visual Studio, and re-connecting to the Mac resolved this for me.