Repository navigation
Expand file tree
/
Copy pathWinGetScout.csproj
More file actions
128 lines (121 loc) · 7.35 KB
/
Copy pathWinGetScout.csproj
File metadata and controls
128 lines (121 loc) · 7.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!--
Two TFMs:
net10.0 - cross-platform; mock/CLI backends. The dev-iteration
target on Linux/macOS where winget doesn't exist.
net10.0-windows10.0.26100.0 - the real Windows deploy target. Adds the COM backend,
which needs this TFM to reference the WinGet COM
projection (ships under lib/net8.0-windows10.0.26100.0/).
Build/run a specific TFM with the -f flag, e.g.:
dotnet run -f net10.0 (pass the mock flag after a double dash) [Linux dev]
dotnet publish -f net10.0-windows10.0.26100.0 -r win-x64 [Windows release]
-->
<TargetFrameworks>net10.0;net10.0-windows10.0.26100.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<RootNamespace>WinGetScout</RootNamespace>
<AssemblyName>wingetscout</AssemblyName>
<Product>Scout for WinGet</Product>
<Title>Scout for WinGet</Title>
<Version>1.0.2</Version>
<Description>Scout for WinGet is a terminal app for finding, installing, and updating Windows packages.</Description>
<PublishAot>true</PublishAot>
<InvariantGlobalization>true</InvariantGlobalization>
<StripSymbols>true</StripSymbols>
<!-- Lets the Windows TFM restore/build from a non-Windows host (no-op on Windows). -->
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<!--
Both Windows architectures are first-class deploy targets.
The non-Windows RIDs are only useful for dev iteration with the mock backend
since winget itself is Windows-only.
-->
<RuntimeIdentifiers>win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
<!--
COM activation strategy for the Windows build (see README.md):
InProc (default) - bundle the in-process WinGet engine + a reg-free WinRT manifest.
A portable exe (+ ~7 MB engine); no package identity needed.
This is what the portable ZIP ships; the standalone EXE uses CLI.
Identity - drop the in-process engine, ship only the ~61 KB projection winmd,
and rely on PACKAGE IDENTITY (an MSIX) to reach the in-box
out-of-process server. This is for the optional MSIX build.
-->
<WingetComMode Condition="'$(WingetComMode)' == ''">InProc</WingetComMode>
<!-- The MSIX Identity graph omits InProcCom and needs its own NuGet lock file. -->
<NuGetLockFilePath Condition="'$(WingetComMode)' == 'Identity'">$(MSBuildProjectDirectory)/packages.identity.lock.json</NuGetLockFilePath>
</PropertyGroup>
<!--
Windows-TFM-only configuration: the COM backend, its package, and the WINGET_COM
compile constant that gates ComBackend.cs and the COM-flag wiring in Program.cs.
-->
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0-windows10.0.26100.0'">
<DefineConstants>$(DefineConstants);WINGET_COM</DefineConstants>
<!--
The ComInterop targets reject AnyCPU and require an explicit arch when no RID is set
(e.g. a plain `dotnet build` of this TFM, or a design-time/IDE restore). Default to x64
for those RID-less builds; an actual `-r win-arm64` publish overrides this with its RID.
-->
<MicrosoftManagementDeployment-Platform Condition="'$(RuntimeIdentifier)' == ''">x64</MicrosoftManagementDeployment-Platform>
<!--
InProc: registration-free WinRT manifest routing the WinGet activatable classes to the
in-process server (InProcCom below), so `new PackageManager()` activates IN-PROC. The
out-of-process path can't be activated from a Native-AOT process (0x80073D54
APPMODEL_ERROR_NO_PACKAGE — the winrtact.dll manual-activation shim was dropped from
ComInterop >= 1.10.x). See app.manifest.
Identity: a bare manifest (no in-proc routing); the MSIX supplies package identity so the
out-of-process server is reachable. See app.identity.manifest and README.md.
-->
<ApplicationManifest Condition="'$(WingetComMode)' == 'InProc'">app.manifest</ApplicationManifest>
<ApplicationManifest Condition="'$(WingetComMode)' == 'Identity'">app.identity.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<!--
Tracks the Terminal.Gui v2 develop pre-release. Bump as upstream publishes new
prereleases; this is intentionally a moving target since the project's purpose is
to evaluate parity against current Terminal.Gui behavior.
-->
<PackageReference Include="Terminal.Gui" Version="2.5.1-develop.81" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0-windows10.0.26100.0'">
<!--
WinGet COM API projection. Consumed via indexed access only (never foreach over a
projected collection) — the AOT-published projection can't generate the IIterable<T>
RCW for foreach, so it throws InvalidCastException at runtime. No CsWinRT optimizer
package is needed for the indexing pattern.
GeneratePathProperty exposes $(PkgMicrosoft_WindowsPackageManager_ComInterop) so the Identity
build can copy the projection winmd out of the package.
-->
<PackageReference Include="Microsoft.WindowsPackageManager.ComInterop" Version="1.29.380" GeneratePathProperty="true" />
</ItemGroup>
<ItemGroup Condition="'$(WingetComMode)' == 'InProc' and '$(TargetFramework)' == 'net10.0-windows10.0.26100.0'">
<!--
In-process WinGet COM server (WindowsPackageManager.dll + Microsoft.Management.Deployment.InProc.dll).
ExcludeAssets=compile so its bundled .winmd doesn't collide with ComInterop's managed projection;
we only want its native runtime assets copied next to the exe. app.manifest routes activation here.
-->
<PackageReference Include="Microsoft.WindowsPackageManager.InProcCom" Version="1.29.380" ExcludeAssets="compile" NoWarn="NU1701" />
</ItemGroup>
<ItemGroup Condition="'$(WingetComMode)' == 'Identity' and '$(TargetFramework)' == 'net10.0-windows10.0.26100.0'">
<!--
Identity build ships the WinRT projection metadata next to the exe so the OS metadata resolver
(RoActivateInstance / RoResolveNamespace) can find the type under Native AOT — without it,
activation fails with 0x8000000F RO_E_METADATA_NAME_NOT_FOUND even when identity is present.
~61 KB, vs the ~7 MB in-process engine the InProc build ships.
-->
<None Include="$(PkgMicrosoft_WindowsPackageManager_ComInterop)\lib\uap10.0\Microsoft.Management.Deployment.winmd"
CopyToOutputDirectory="PreserveNewest" Link="Microsoft.Management.Deployment.winmd" Visible="false" />
</ItemGroup>
<ItemGroup>
<!-- Expose internal parser helpers (DedupePackages, ParsePinState, CompareVersionsLike) to the test project. -->
<InternalsVisibleTo Include="WinGetScout.Tests" />
<EmbeddedResource Include="src/notification.ps1" LogicalName="WinGetScout.notification.ps1" />
</ItemGroup>
<ItemGroup>
<!-- The main project's source globs from the repo root. Exclude the test project so its
files (and generated obj/ artifacts) don't get pulled into the main exe's compile set. -->
<Compile Remove="tests/**/*.cs" />
<None Remove="tests/**/*" />
</ItemGroup>
</Project>