1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
- <PropertyGroup >
2
+
3
+ <!-- Windows-specific configuration -->
4
+ <PropertyGroup Condition =" '$(OS)' == 'Windows_NT'" >
3
5
<TargetFramework >net8.0-windows</TargetFramework >
4
6
<OutputType >WinExe</OutputType >
5
7
<GenerateAssemblyInfo >false</GenerateAssemblyInfo >
8
10
<EnableWindowsTargeting >true</EnableWindowsTargeting >
9
11
<NoWarn >NU1903</NoWarn >
10
12
</PropertyGroup >
11
- <ItemGroup >
13
+
14
+ <!-- Non-Windows configuration - create an empty library -->
15
+ <PropertyGroup Condition =" '$(OS)' != 'Windows_NT'" >
16
+ <TargetFramework >net8.0</TargetFramework >
17
+ <OutputType >Library</OutputType >
18
+ <GenerateAssemblyInfo >false</GenerateAssemblyInfo >
19
+ <NoWarn >NU1903</NoWarn >
20
+ </PropertyGroup >
21
+
22
+ <!-- Windows-specific dependencies -->
23
+ <ItemGroup Condition =" '$(OS)' == 'Windows_NT'" >
12
24
<PackageReference Include =" Microsoft.VisualStudio.Threading.Analyzers" Version =" 17.14.15" >
13
25
<IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
14
26
<PrivateAssets >all</PrivateAssets >
15
27
</PackageReference >
16
28
<PackageReference Include =" Microsoft.Windows.Compatibility" Version =" 9.0.9" />
17
29
</ItemGroup >
18
- <ItemGroup >
30
+
31
+ <!-- Windows-specific resources -->
32
+ <ItemGroup Condition =" '$(OS)' == 'Windows_NT'" >
19
33
<Resource Include =" Themes\Metro\HowToApplyTheme.txt" />
20
34
</ItemGroup >
35
+
36
+ <!-- Project references (available on all platforms) -->
21
37
<ItemGroup >
22
38
<ProjectReference Include =" ..\Microsoft.OpenApi.YamlReader\Microsoft.OpenApi.YamlReader.csproj" />
23
39
<ProjectReference Include =" ..\Microsoft.OpenApi\Microsoft.OpenApi.csproj" />
24
40
</ItemGroup >
25
- <ItemGroup >
26
- <PackageReference Include =" Microsoft.CSharp" Version =" 4.7.0" />
27
- <PackageReference Include =" System.Data.DataSetExtensions" Version =" 4.5.0" />
41
+
42
+ <!-- Exclude WPF-specific files on non-Windows platforms -->
43
+ <ItemGroup Condition =" '$(OS)' != 'Windows_NT'" >
44
+ <Compile Remove =" **/*.xaml.cs" />
45
+ <Compile Remove =" App.xaml.cs" />
46
+ <Compile Remove =" MainWindow.xaml.cs" />
47
+ <Compile Remove =" EnumBindingSourceExtension.cs" />
48
+ <Compile Remove =" MainModel.cs" />
49
+ <Compile Remove =" StatsVisitor.cs" />
50
+ <Compile Remove =" Properties/**" />
51
+ <None Remove =" **/*.xaml" />
52
+ <Page Remove =" **/*.xaml" />
28
53
</ItemGroup >
29
- <ItemGroup >
54
+
55
+ <!-- Windows-specific XAML excludes -->
56
+ <ItemGroup Condition =" '$(OS)' == 'Windows_NT'" >
30
57
<Page Remove =" Themes\Metro\Metro.MSControls.Core.Implicit.xaml" />
31
58
<Page Remove =" Themes\Metro\Metro.MSControls.Toolkit.Implicit.xaml" />
32
59
<Page Remove =" Themes\Metro\Styles.Shared.xaml" />
33
60
<Page Remove =" Themes\Metro\Styles.WPF.xaml" />
34
61
<Page Remove =" Themes\Metro\Theme.Colors.xaml" />
62
+ <Compile Remove =" NonWindowsPlatformPlaceholder.cs" />
35
63
</ItemGroup >
36
64
</Project >
0 commit comments