|
2 | 2 |
|
3 | 3 | <PropertyGroup> |
4 | 4 | <FullTargets>True</FullTargets> |
| 5 | + <IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">True</IsAotCompatible> |
| 6 | + <IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">True</IsTrimmable> |
| 7 | + <TargetFrameworks>uap10.0;uap10.0.15138.0</TargetFrameworks> |
| 8 | + <TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);AddWinMDToPackage</TargetsForTfmSpecificContentInPackage> |
5 | 9 | </PropertyGroup> |
6 | 10 |
|
7 | 11 | <PropertyGroup Condition="'$(FullTargets)' == 'true'"> |
8 | | - <NoWarn>NU1603;NU5100</NoWarn> |
9 | | - <OutputPathRoot Condition="'$(Platform)' == 'AnyCPU'">bin\$(Configuration)\</OutputPathRoot> |
10 | | - <OutputPathRoot Condition="'$(Platform)' != 'AnyCPU'">bin\$(Platform)\$(Configuration)\</OutputPathRoot> |
11 | | - <TargetFrameworks>uap10.0;uap10.0.15138.0;net6.0-windows10.0.17763.0</TargetFrameworks> |
| 12 | + <NoWarn>$(NoWarn);NU5100</NoWarn> |
| 13 | + <TargetFrameworks>$(TargetFrameworks);net8.0-windows10.0.17763.0</TargetFrameworks> |
12 | 14 | </PropertyGroup> |
13 | 15 |
|
14 | | - <PropertyGroup Condition="'$(FullTargets)' != 'true'"> |
15 | | - <TargetFramework>net6.0-windows10.0.17763.0</TargetFramework> |
16 | | - </PropertyGroup> |
17 | | - |
18 | | - <PropertyGroup Condition="'$(TargetFramework)' != 'net6.0-windows10.0.17763.0'"> |
| 16 | + <PropertyGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net5.0-windows10.0.17763.0'))"> |
19 | 17 | <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> |
20 | 18 | <DebugType>Full</DebugType> |
21 | | - <NoWarn>CS0419</NoWarn> |
22 | 19 | <OutputType>winmdobj</OutputType> |
23 | | - <Platforms>AnyCPU;x64;x86;ARM64;ARM</Platforms> |
24 | 20 | </PropertyGroup> |
25 | 21 |
|
26 | | - <PropertyGroup Condition="'$(TargetFramework)' == 'net6.0-windows10.0.17763.0'"> |
| 22 | + <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net5.0-windows10.0.17763.0'))"> |
27 | 23 | <CsWinRTComponent>true</CsWinRTComponent> |
28 | 24 | <CsWinRTWindowsMetadata>10.0.22621.0</CsWinRTWindowsMetadata> |
29 | | - <NoWarn>CS0618;CS1591</NoWarn> |
30 | | - <Platforms>x64;x86;ARM64;ARM</Platforms> |
| 25 | + <NoWarn>$(NoWarn);CS1591</NoWarn> |
31 | 26 | </PropertyGroup> |
32 | 27 |
|
33 | 28 | <ItemGroup> |
34 | | - <PackageReference Include="AdvancedSharpAdbClient" Version="2.5.7" /> |
| 29 | + <PackageReference Include="AdvancedSharpAdbClient" Version="2.5.7" /> |
35 | 30 | </ItemGroup> |
36 | 31 |
|
37 | | - <ItemGroup> |
38 | | - <None Include="..\logo.png" Pack="true" PackagePath="\Icon.png"> |
39 | | - <Link>Assets\Icon.png</Link> |
40 | | - </None> |
| 32 | + <ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))"> |
| 33 | + <PackageReference Include="Microsoft.Windows.CsWinRT" Version="$(CsWinRTVersion)" GeneratePathProperty="true" /> |
41 | 34 | </ItemGroup> |
42 | 35 |
|
43 | | - <ItemGroup Condition="'$(FullTargets)' == 'true'"> |
44 | | - <None Include="..\build\*" Pack="true" PackagePath="build\"> |
45 | | - <Link>Assets\build\%(FileName)%(Extension)</Link> |
46 | | - </None> |
47 | | - <None Include="$(OutputPathRoot)net6.0-windows10.0.17763.0\*.dll" Pack="true" PackagePath="build\native\"> |
48 | | - <Link>Assets\build\native\%(FileName)%(Extension)</Link> |
49 | | - </None> |
50 | | - <None Remove="$(OutputPathRoot)net6.0-windows10.0.17763.0\AdvancedSharpAdbClient.WinRT.dll" /> |
51 | | - <None Remove="$(OutputPathRoot)net6.0-windows10.0.17763.0\WinRT.Host.dll" /> |
52 | | - <None Remove="$(OutputPathRoot)net6.0-windows10.0.17763.0\WinRT.Host.Shim.dll" /> |
53 | | - <None Include="$(OutputPathRoot)net6.0-windows10.0.17763.0\WinRT.Host.runtimeconfig.json" Condition="Exists('$(OutputPathRoot)net6.0-windows10.0.17763.0\WinRT.Host.runtimeconfig.json')" Pack="true" PackagePath="build\native\"> |
54 | | - <Link>Assets\build\native\%(FileName)%(Extension)</Link> |
55 | | - </None> |
56 | | - <None Include="$(OutputPathRoot)uap10.0.15138.0\*.dll" Pack="true" PackagePath="build\uap10.0.15138\"> |
57 | | - <Link>Assets\build\uap10.0.15138\%(FileName)%(Extension)</Link> |
58 | | - </None> |
59 | | - <None Remove="$(OutputPathRoot)uap10.0.15138.0\System.Memory.dll" /> |
60 | | - <None Remove="$(OutputPathRoot)uap10.0.15138.0\System.Buffers.dll" /> |
61 | | - <None Remove="$(OutputPathRoot)uap10.0.15138.0\System.Runtime.CompilerServices.Unsafe.dll" /> |
62 | | - <None Include="$(OutputPathRoot)uap10.0\AdvancedSharpAdbClient.dll" Condition="Exists('$(OutputPathRoot)uap10.0\AdvancedSharpAdbClient.dll')" Pack="true" PackagePath="build\uap10.0\"> |
63 | | - <Link>Assets\build\uap10.0\%(FileName)%(Extension)</Link> |
64 | | - </None> |
65 | | - <None Include="$(OutputPathRoot)uap10.0\Microsoft.Extensions.Logging.Abstractions.dll" Condition="Exists('$(OutputPathRoot)uap10.0\Microsoft.Extensions.Logging.Abstractions.dll')" Pack="true" PackagePath="build\uap10.0\"> |
66 | | - <Link>Assets\build\uap10.0\%(FileName)%(Extension)</Link> |
67 | | - </None> |
68 | | - <None Include="$(OutputPathRoot)uap10.0\System.Runtime.InteropServices.RuntimeInformation.dll" Condition="Exists('$(OutputPathRoot)uap10.0\System.Runtime.InteropServices.RuntimeInformation.dll')" Pack="true" PackagePath="build\uap10.0\"> |
69 | | - <Link>Assets\build\uap10.0\%(FileName)%(Extension)</Link> |
70 | | - </None> |
71 | | - <None Include="$(OutputPathRoot)uap10.0\System.Xml.XPath.dll" Condition="Exists('$(OutputPathRoot)uap10.0\System.Xml.XPath.dll')" Pack="true" PackagePath="build\uap10.0\"> |
72 | | - <Link>Assets\build\uap10.0\%(FileName)%(Extension)</Link> |
73 | | - </None> |
74 | | - <None Include="$(OutputPathRoot)uap10.0\System.Xml.XPath.XmlDocument.dll" Condition="Exists('$(OutputPathRoot)uap10.0\System.Xml.XPath.XmlDocument.dll')" Pack="true" PackagePath="build\uap10.0\"> |
75 | | - <Link>Assets\build\uap10.0\%(FileName)%(Extension)</Link> |
76 | | - </None> |
77 | | - <None Include="..\build\*" Pack="true" PackagePath="buildTransitive\"> |
78 | | - <Link>Assets\buildTransitive\%(FileName)%(Extension)</Link> |
79 | | - </None> |
80 | | - <None Include="$(NuGetPackageRoot)microsoft.windows.cswinrt\$(CsWinRTVersion)\hosting\**\native\*" Pack="true" PackagePath="hosting\"> |
81 | | - <Link>Assets\hosting\%(RecursiveDir)\%(FileName)%(Extension)</Link> |
82 | | - </None> |
83 | | - <None Include="$(NuGetPackageRoot)microsoft.windows.cswinrt\$(CsWinRTVersion)\hosting\**\native\en-US\*" Pack="true" PackagePath="hosting\"> |
84 | | - <Link>Assets\hosting\%(RecursiveDir)\%(FileName)%(Extension)</Link> |
85 | | - </None> |
86 | | - <None Include="$(OutputPathRoot)net6.0-windows10.0.17763.0\AdvancedSharpAdbClient.WinRT.winmd" Condition="Exists('$(OutputPathRoot)net6.0-windows10.0.17763.0\AdvancedSharpAdbClient.WinRT.winmd')" Pack="true" PackagePath="lib\net6.0-windows10.0.17763.0\winmd\"> |
87 | | - <Link>Assets\lib\net6.0-windows10.0.17763.0\winmd\%(FileName)%(Extension)</Link> |
| 36 | + <Target Name="AddWinMDToPackage"> |
| 37 | + <ItemGroup Condition="'$(TargetFramework)' == 'uap10.0'"> |
| 38 | + <TfmSpecificPackageFile Include="$(OutputPath)\AdvancedSharpAdbClient.dll" Condition="Exists('$(OutputPath)\AdvancedSharpAdbClient.dll')"> |
| 39 | + <PackagePath>build\$(TargetFramework)</PackagePath> |
| 40 | + </TfmSpecificPackageFile> |
| 41 | + <TfmSpecificPackageFile Include="$(OutputPath)\Microsoft.Extensions.Logging.Abstractions.dll" Condition="Exists('$(OutputPath)\Microsoft.Extensions.Logging.Abstractions.dll')"> |
| 42 | + <PackagePath>build\$(TargetFramework)</PackagePath> |
| 43 | + </TfmSpecificPackageFile> |
| 44 | + <TfmSpecificPackageFile Include="$(OutputPath)\System.Runtime.InteropServices.RuntimeInformation.dll" Condition="Exists('$(OutputPath)\System.Runtime.InteropServices.RuntimeInformation.dll')"> |
| 45 | + <PackagePath>build\$(TargetFramework)</PackagePath> |
| 46 | + </TfmSpecificPackageFile> |
| 47 | + <TfmSpecificPackageFile Include="$(OutputPath)\System.Xml.XPath.dll" Condition="Exists('$(OutputPath)\System.Xml.XPath.dll')"> |
| 48 | + <PackagePath>build\$(TargetFramework)</PackagePath> |
| 49 | + </TfmSpecificPackageFile> |
| 50 | + <TfmSpecificPackageFile Include="$(OutputPath)\System.Xml.XPath.XmlDocument.dll" Condition="Exists('$(OutputPath)\System.Xml.XPath.XmlDocument.dll')"> |
| 51 | + <PackagePath>build\$(TargetFramework)</PackagePath> |
| 52 | + </TfmSpecificPackageFile> |
| 53 | + </ItemGroup> |
| 54 | + <ItemGroup Condition="'$(TargetFramework)' == 'uap10.0.15138.0'"> |
| 55 | + <TfmSpecificPackageFile Include="$(OutputPath)\*.dll"> |
| 56 | + <PackagePath>build\uap10.0.15138</PackagePath> |
| 57 | + </TfmSpecificPackageFile> |
| 58 | + <TfmSpecificPackageFile Remove="$(OutputPath)\System.Memory.dll" /> |
| 59 | + <TfmSpecificPackageFile Remove="$(OutputPath)\System.Buffers.dll" /> |
| 60 | + <TfmSpecificPackageFile Remove="$(OutputPath)\System.Runtime.CompilerServices.Unsafe.dll" /> |
| 61 | + </ItemGroup> |
| 62 | + <ItemGroup Condition="'$(TargetFramework)' == 'net8.0-windows10.0.17763.0'"> |
| 63 | + <TfmSpecificPackageFile Include="$(OutputPath)\*.dll"> |
| 64 | + <PackagePath>build\native</PackagePath> |
| 65 | + </TfmSpecificPackageFile> |
| 66 | + <TfmSpecificPackageFile Remove="$(OutputPath)\AdvancedSharpAdbClient.WinRT.dll" /> |
| 67 | + <TfmSpecificPackageFile Remove="$(OutputPath)\WinRT.Host.dll" /> |
| 68 | + <TfmSpecificPackageFile Remove="$(OutputPath)\WinRT.Host.Shim.dll" /> |
| 69 | + <TfmSpecificPackageFile Include="$(OutputPath)\WinRT.Host.runtimeconfig.json" Condition="Exists('$(OutputPath)\WinRT.Host.runtimeconfig.json')"> |
| 70 | + <PackagePath>build\native</PackagePath> |
| 71 | + </TfmSpecificPackageFile> |
| 72 | + <TfmSpecificPackageFile Include="$(PkgMicrosoft_Windows_CsWinRT)\hosting\**\native\*"> |
| 73 | + <PackagePath>hosting</PackagePath> |
| 74 | + </TfmSpecificPackageFile> |
| 75 | + <TfmSpecificPackageFile Include="$(PkgMicrosoft_Windows_CsWinRT)\hosting\**\native\en-US\*"> |
| 76 | + <PackagePath>hosting</PackagePath> |
| 77 | + </TfmSpecificPackageFile> |
| 78 | + <TfmSpecificPackageFile Include="$(OutputPath)\AdvancedSharpAdbClient.WinRT.winmd" Condition="Exists('$(OutputPath)\AdvancedSharpAdbClient.WinRT.winmd')"> |
| 79 | + <PackagePath>lib\$(TargetFramework)\winmd</PackagePath> |
| 80 | + </TfmSpecificPackageFile> |
| 81 | + <TfmSpecificPackageFile Include="$(OutputPath)\WinRT.Host.Shim.dll" Condition="Exists('$(OutputPath)\WinRT.Host.Shim.dll')"> |
| 82 | + <PackagePath>lib\$(TargetFramework)</PackagePath> |
| 83 | + </TfmSpecificPackageFile> |
| 84 | + <TfmSpecificPackageFile Include="$(OutputPath)\WinRT.Runtime.dll" Condition="Exists('$(OutputPath)\WinRT.Runtime.dll')"> |
| 85 | + <PackagePath>lib\$(TargetFramework)</PackagePath> |
| 86 | + </TfmSpecificPackageFile> |
| 87 | + </ItemGroup> |
| 88 | + </Target> |
| 89 | + |
| 90 | + <ItemGroup> |
| 91 | + <None Include="..\logo.png" PackagePath="\Icon.png" Pack="true"> |
| 92 | + <Link>Assets\Icon.png</Link> |
88 | 93 | </None> |
89 | | - <None Include="$(OutputPathRoot)net6.0-windows10.0.17763.0\WinRT.Host.Shim.dll" Condition="Exists('$(OutputPathRoot)net6.0-windows10.0.17763.0\WinRT.Host.Shim.dll')" Pack="true" PackagePath="lib\net6.0-windows10.0.17763.0\"> |
90 | | - <Link>Assets\lib\net6.0-windows10.0.17763.0\winmd\%(FileName)%(Extension)</Link> |
| 94 | + <None Include="..\README.md" PackagePath="\README.md" Pack="true"> |
| 95 | + <Link>Assets\README.md</Link> |
91 | 96 | </None> |
92 | | - <None Include="$(OutputPathRoot)net6.0-windows10.0.17763.0\WinRT.Runtime.dll" Condition="Exists('$(OutputPathRoot)net6.0-windows10.0.17763.0\WinRT.Runtime.dll')" Pack="true" PackagePath="lib\net6.0-windows10.0.17763.0\"> |
93 | | - <Link>Assets\lib\net6.0-windows10.0.17763.0\winmd\%(FileName)%(Extension)</Link> |
| 97 | + <None Include="..\build\*" PackagePath="buildTransitive\" Pack="true" /> |
| 98 | + <None Include="..\build\*" PackagePath="build\" Pack="true"> |
| 99 | + <Link>Assets\build\%(FileName)%(Extension)</Link> |
94 | 100 | </None> |
95 | 101 | </ItemGroup> |
96 | 102 |
|
97 | | - <ItemGroup Condition="'$(TargetFramework)' == 'net6.0-windows10.0.17763.0'"> |
98 | | - <PackageReference Include="Microsoft.Windows.CsWinRT" Version="$(CsWinRTVersion)" /> |
99 | | - </ItemGroup> |
100 | | - |
101 | 103 | </Project> |
0 commit comments