Skip to content

Instantly share code, notes, and snippets.

@valorad
valorad / Export-UntrustedGuardian.ps1
Last active January 18, 2025 08:07
Hyper-V TPM Migration (To solve error: "The key protector could not be unwrapped" that causes VM startup failure)
$GuardianName = 'UntrustedGuardian'
$CertificatePassword = Read-Host -Prompt 'Please enter a password to secure the certificate files' -AsSecureString
$guardian = Get-HgsGuardian -Name $GuardianName
if (-not $guardian)
{
throw "Guardian '$GuardianName' could not be found on the local system."
}

Here is an example that shows you how to create a wear tile use Xamarin.

Prepare the library

  • Create a Xamarin binding library AndroidX.Wear.Tiles.
  • Download the latest androidx.wear.tiles pre-release from maven (current is 1.0.0-alpha11).
    Place the aar file into Jar in your solution, set Build Action to LibraryProjectZip in the property.
  • Download the latest androidx.wear.tiles tiles-proto pre-release from maven (current is 1.0.0-alpha11).
    Place the jar file into Jar folder of your solution, set Build Action to EmbeddedReferenceJar in the property.
  • Add Xamarin.Google.Guava.ListenableFuture NuGet package to this binding solution.
  • Edit the Metadata.xml. (I have fixed some bindings)