Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Announcing to the WinRT package of AdvancedSharpAdbClient #63

Open
wherewhere opened this issue Jul 19, 2023 · 0 comments
Open

Announcing to the WinRT package of AdvancedSharpAdbClient #63

wherewhere opened this issue Jul 19, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@wherewhere
Copy link
Member

wherewhere commented Jul 19, 2023

Announcing

We have packaged this project into winrt. With the winrt version, we can use it in cpp/winrt and other projects. You can find the winrt version in winrt branch.

How to use it

There are two way to reference it.

  • Reference to the project directly

Fork this repository and change the branch to winrt.

If your project is face to uwp, add this to your .vcproj

<ProjectReference Include="\path\to\AdvancedSharpAdbClient.WinRT.csproj">
  <Project>{083cdc04-9cc2-46e4-84c2-55b645be9d50}</Project>
  <SetTargetFramework>TargetFramework=uap10.0</SetTargetFramework>
</ProjectReference>

If your project is face to desktop, add this to your .vcproj

<ProjectReference Include="\path\to\AdvancedSharpAdbClient.WinRT.csproj">
  <Project>{083cdc04-9cc2-46e4-84c2-55b645be9d50}</Project>
  <SetTargetFramework>TargetFramework=net6.0-windows10.0.17763.0</SetTargetFramework>
</ProjectReference>
  • Reference to the nuget package

Download AdvancedSharpAdbClient.WinRT.zip.

Unzip it into nupkgs folder of the root path of your project
image

Create nuget.config into the root path of your project and add

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="Offline Nugets" value="nupkgs" />
  </packageSources>
</configuration>

Open the manager of nuget and you will find it. Just install it like a normal nuget.
image

After that, if your project is not packaged into appx or misx, remember to create ProjectName.exe.manifest in the root of your project to register winrt class.

<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
  <assemblyIdentity version="1.0.0.0" name="ProjectName"/>
  <file name="WinRT.Host.dll">
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.AdbClient"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.AdbCommandLineClient"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.AdbServer"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.AdbServerFeatures"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.AdbSocket"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.CrossPlatformFunc"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.DateTimeHelper"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.DeviceMonitor"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.Factories"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.SyncCommandConverter"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.SyncService"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.TcpSocket"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.DeviceCommands.LinuxPath"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.DeviceCommands.PackageManager"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
    <activatableClass
      name="AdvancedSharpAdbClient.WinRT.Logs.LogReader"
      threadingModel="both"
      xmlns="urn:schemas-microsoft-com:winrt.v1" />
  </file>
</assembly>
@wherewhere wherewhere added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 19, 2023
@wherewhere wherewhere changed the title Announcing the WinRT package of AdvancedSharpAdbClient Announcing to the WinRT package of AdvancedSharpAdbClient Jul 19, 2023
@wherewhere wherewhere pinned this issue Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant