-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCUIckScan.csproj
More file actions
68 lines (61 loc) · 3.29 KB
/
CUIckScan.csproj
File metadata and controls
68 lines (61 loc) · 3.29 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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>Resources\app.ico</ApplicationIcon>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>CUIckScan</AssemblyName>
<Product>CUIck Scan</Product>
<RootNamespace>CUIckScan</RootNamespace>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<OutputPath>bin\x64\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
</PropertyGroup>
<ItemGroup>
<!-- Original dependencies (unchanged) -->
<PackageReference Include="DocumentFormat.OpenXml" Version="3.2.0" />
<PackageReference Include="NPOI" Version="2.7.2" />
<PackageReference Include="MimeKit" Version="4.12.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.8" />
<PackageReference Include="System.IO.Hashing" Version="8.0.0" />
<PackageReference Include="UglyToad.PdfPig" Version="1.7.0-custom-5" />
<PackageReference Include="QuestPDF" Version="2024.12.2" />
<!-- WebView2 for rendering React UI in a native window.
PrivateAssets="all" prevents the WPF assembly (and its WindowsBase v5.0 reference)
from flowing transitively to the test project, resolving MSB3277 warnings. -->
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2903.40" PrivateAssets="all" />
</ItemGroup>
<!-- Exclude the test project from main compilation -->
<ItemGroup>
<Compile Remove="CUIckScan.Tests\**" />
<Content Remove="CUIckScan.Tests\**" />
<None Remove="CUIckScan.Tests\**" />
</ItemGroup>
<!-- Bundle the built React SPA into wwwroot as embedded content -->
<ItemGroup>
<Content Include="wwwroot\**" CopyToOutputDirectory="PreserveNewest" />
<Content Include="release_version.txt" CopyToOutputDirectory="PreserveNewest" Condition="Exists('release_version.txt')" />
<Content Include="rules.json" CopyToOutputDirectory="PreserveNewest" Condition="Exists('rules.json')" />
<Content Include="Resources\app.ico" CopyToOutputDirectory="PreserveNewest" />
<EmbeddedResource Include="Resources\logo-light.png" LogicalName="CUIckScan.Resources.logo-light.png" />
</ItemGroup>
<!-- Required for embedding ASP.NET Core (Kestrel) in a WinForms host -->
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<!-- Remove the WPF assembly that WebView2 unconditionally bundles for .NET 5+ apps.
CUIckScan only uses the WinForms control, not WPF. Microsoft.Web.WebView2.Wpf.dll
references WindowsBase v5.0 which conflicts with .NET 8's v4.0, causing MSB3277.
We remove it before ResolveAssemblyReferences to prevent the version conflict. -->
<Target Name="RemoveWebView2Wpf" BeforeTargets="ResolveAssemblyReferences;FindReferenceAssembliesForReferences">
<ItemGroup>
<Reference Remove="@(Reference)" Condition="$([System.String]::new('%(Identity)').Contains('Microsoft.Web.WebView2.Wpf'))" />
</ItemGroup>
</Target>
</Project>