Skip to content

Commit

Permalink
添加文章 Announcing to the WinRT package of AdvancedSharpAdbClient
Browse files Browse the repository at this point in the history
  • Loading branch information
wherewhere committed May 5, 2024
1 parent 79d8125 commit a589146
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
title: Announcing to the WinRT package of AdvancedSharpAdbClient
date: 2023-07-19 15:37:25
updated: 2023-07-24 05:16:44
tags: [.NET, WinRT, ADB, 公告, 资源, 教程]
categories: 公告
---
## 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`](https://github.com/yungd1plomat/AdvancedSharpAdbClient/tree/winrt).

## 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`
```xml
<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`
```xml
<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](https://github.com/yungd1plomat/AdvancedSharpAdbClient/files/12092217/AdvancedSharpAdbClient.WinRT.0.0.1.zip).

Unzip it into `nupkgs` folder of the root path of your project
![image](https://github.com/yungd1plomat/AdvancedSharpAdbClient/assets/27689196/da648eb2-d505-4fd2-ac78-f534f1ad018b)

Create `nuget.config` into the root path of your project and add
```xml
<?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](https://github.com/yungd1plomat/AdvancedSharpAdbClient/assets/27689196/7d2ce405-5879-42e1-a27d-191a37ebb8f4)

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
<?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>
```

> [Announcing to the WinRT package of AdvancedSharpAdbClient](https://github.com/SharpAdb/AdvancedSharpAdbClient/issues/63) 作者 [@wherewhere](https://github.com/wherewhere "where where") 2023年7月19日 发表于 [GitHub](https://github.com),转载请注明出处
2 changes: 1 addition & 1 deletion source/_posts/Fusion-App-工程提取教程.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ Fusion App发布已经有很长时间了,这期间也出现了很多优秀的

最后感谢[@寒歌](https://www.coolapk.com/u/寒歌)为我们带来了Fusion App,[@pandecheng](https://www.coolapk.com/u/pandecheng)顺道感谢一下吧/滑稽

> [Fusion App 工程提取教程](https://www.coolapk.com/feed/6170506?shareKey=MzQzMzNiNDgxOWRkNjYzMTI0MWU) 作者 [@wherewhere](https://www.coolapk.com/u/wherewhere) 2018年4月15日 发表于 [酷安](https://www.coolapk.com),转载请注明出处
> [Fusion App 工程提取教程](https://www.coolapk.com/feed/6170506?shareKey=MzQzMzNiNDgxOWRkNjYzMTI0MWU) 作者 [@wherewhere](https://www.coolapk.com/u/wherewhere) 2018年4月15日 发表于 [酷安](https://www.coolapk.com "Coolapk"),转载请注明出处
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ banner: https://github.com/wherewhere/wherewhere.github.io/assets/27689196/59730
<img src="https://github.com/wherewhere/wherewhere.github.io/assets/27689196/837fc8c4-abfe-452d-a5fc-4a7ffcb901d0" alt="推文"/>
<figcaption>推文</figcaption>

> [Surface RT运行Win10图片泄露,Win10RT或存在过](https://www.coolapk.com/feed/12814291?shareKey=OTlkM2YxYzEwMjcxNjYzNWQ4MGM) 作者 [@wherewhere](https://www.coolapk.com/u/wherewhere) 2019年7月19日 发表于 [酷安](https://www.coolapk.com),转载请注明出处
> [Surface RT运行Win10图片泄露,Win10RT或存在过](https://www.coolapk.com/feed/12814291?shareKey=OTlkM2YxYzEwMjcxNjYzNWQ4MGM) 作者 [@wherewhere](https://www.coolapk.com/u/wherewhere) 2019年7月19日 发表于 [酷安](https://www.coolapk.com "Coolapk"),转载请注明出处
Original file line number Diff line number Diff line change
Expand Up @@ -288,4 +288,4 @@ public abstract class WithTest

当然,这种操作仅限娱乐,经测试 .NET Framework 和 .NET Core App 都会卡在约束,所以 .NET 是别想有随意的约束了,不过 C# 题案 ["Roles and extensions"](https://github.com/dotnet/csharplang/discussions/5496 "[Proposal]: Roles and extensions") 倒是给出了曲线实现方案

> [【.NET】利用 IL 魔法实现随心随意的泛型约束](https://www.cnblogs.com/wherewhere/p/18140783) 作者 [@where-where](https://home.cnblogs.com/u/wherewhere) 2024年4月17日 发表于 [CNBlogs](https://home.cnblogs.com),转载请注明出处
> [【.NET】利用 IL 魔法实现随心随意的泛型约束](https://www.cnblogs.com/wherewhere/p/18140783) 作者 [@where-where](https://home.cnblogs.com/u/wherewhere) 2024年4月17日 发表于 [博客园](https://home.cnblogs.com "CNBlogs"),转载请注明出处
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ public static bool IsTypePresent(string AssemblyName, string TypeName)

哦对了,记得把函数放在要用的项目里,不要问我怎么知道的。。。

> [【UWP】开发小技巧――判断类是否存在](https://www.coolapk.com/feed/32229068?shareKey=ZTc3NmI0NTc1OGI4NjYzM2UxMTI) 作者 [@wherewhere](https://www.coolapk.com/u/wherewhere) 2021年12月19日 发表于 [酷安](https://www.coolapk.com),转载请注明出处
> [【UWP】开发小技巧――判断类是否存在](https://www.coolapk.com/feed/32229068?shareKey=ZTc3NmI0NTc1OGI4NjYzM2UxMTI) 作者 [@wherewhere](https://www.coolapk.com/u/wherewhere) 2021年12月19日 发表于 [酷安](https://www.coolapk.com "Coolapk"),转载请注明出处
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ categories: 资源
欢迎加群讨论
![wp_ss_20181205_0001](https://github.com/wherewhere/wherewhere.github.io/assets/27689196/dceebe8f-b39f-4891-8f8e-4c100469d02c)

> [【已停更】适用于Windows全平台的非官方微信UWP版安装包](http://bbs.wfun.com/thread-1019515-1-1.html) 作者 [@wherewhere](https://bbs.wfun.com/u/2850357) 2018年12月2日 发表于 [智机社区](https://bbs.wfun.com)
> [【已停更】适用于Windows全平台的非官方微信UWP版安装包](https://bbs.wfun.com/thread-1019515-1-1.html) 作者 [@wherewhere](https://bbs.wfun.com/u/2850357) 2018年12月2日 发表于 [智机社区](https://bbs.wfun.com "WFun")
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ banner: https://wp-seven.ru/wp-content/uploads/2017/02/Lumia-650.jpg
> 最新人脉,相机应用,PC功能的照片应用(感谢[@软粉175](https://web.archive.org/web/20180721022523/http://bbs.wfun.com/home.php?mod=space&uid=2874994)转存)
> [百度网盘](https://web.archive.org/web/20180721022523/https://pan.baidu.com/s/1pM0MGC7)
> [【搬运】适用于 Windows 10 Mobile 的修改版 Microsoft 应用程序](https://bbs.wfun.com/thread-1013847-1-1.html) 转载者 [@wherewhere](https://bbs.wfun.com/u/2850357) 2018年7月19日 转载于 [智机社区](https://bbs.wfun.com)
> [【搬运】适用于 Windows 10 Mobile 的修改版 Microsoft 应用程序](https://bbs.wfun.com/thread-1013847-1-1.html) 转载者 [@wherewhere](https://bbs.wfun.com/u/2850357) 2018年7月19日 转载于 [智机社区](https://bbs.wfun.com "WFun")
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ banner: https://github.com/wherewhere/wherewhere.github.io/assets/27689196/8b116

教程完毕,不喜勿喷。。。

> [【教程】利用设备门户安装/打开应用](http://bbs.wfun.com/thread-1019162-1-1.html) 作者 [@wherewhere](https://bbs.wfun.com/u/2850357) 2018年11月14日 发表于 [智机社区](https://bbs.wfun.com),转载请注明出处
> [【教程】利用设备门户安装/打开应用](https://bbs.wfun.com/thread-1019162-1-1.html) 作者 [@wherewhere](https://bbs.wfun.com/u/2850357) 2018年11月14日 发表于 [智机社区](https://bbs.wfun.com "WFun"),转载请注明出处
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ categories: 玩机

[百度网盘](https://web.archive.org/web/20201001144212/https://pan.baidu.com/s/1hydYf9iiLUBzMXqPaoD7fg) 提取码: gb4j

> [【教程】启用刷了Windows 10 ARM64的Lumia 950 XL的WIFI和GPU](http://bbs.wfun.com/thread-1020694-1-1.html) 作者 [@wherewhere](https://bbs.wfun.com/u/2850357) 2019年1月19日 发表于 [智机社区](https://bbs.wfun.com),转载请注明出处
> [【教程】启用刷了Windows 10 ARM64的Lumia 950 XL的WIFI和GPU](https://bbs.wfun.com/thread-1020694-1-1.html) 作者 [@wherewhere](https://bbs.wfun.com/u/2850357) 2019年1月19日 发表于 [智机社区](https://bbs.wfun.com "WFun"),转载请注明出处

0 comments on commit a589146

Please sign in to comment.