Skip to content

Commit 511844d

Browse files
committed
Improving build
1 parent d6f8941 commit 511844d

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

Directory.build.props

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
44
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
55
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
6-
<!-- <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> -->
7-
<!-- <RestoreLockedMode>true</RestoreLockedMode> -->
86
<IsBuildingWpfTempProj Condition="$(MSBuildProjectName.Contains('_wpftmp')) != 'true'">false</IsBuildingWpfTempProj>
97
<IsBuildingWpfTempProj Condition="$(MSBuildProjectName.Contains('_wpftmp')) == 'true'">true</IsBuildingWpfTempProj>
108
<DisableWinExeOutputInference>true</DisableWinExeOutputInference>
@@ -17,13 +15,16 @@
1715
<TargetFrameworks>net8.0-windows;net6.0-windows;net462</TargetFrameworks>
1816
<LangVersion>latestmajor</LangVersion>
1917

18+
<IsBuildingForLegacyFramework>false</IsBuildingForLegacyFramework>
19+
<IsBuildingForLegacyFramework Condition="'$(TargetFramework)' == 'net462'">true</IsBuildingForLegacyFramework>
20+
2021
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
2122
<GenerateDocumentationFile>false</GenerateDocumentationFile>
2223
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
2324
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)/Fluent.Ribbon.ruleset</CodeAnalysisRuleSet>
2425
<OutputPath Condition="$(IsBuildingWpfTempProj) != 'true'">$(MSBuildThisFileDirectory)/bin/$(MSBuildProjectName)/$(Configuration)/</OutputPath>
2526

26-
<AutoGenerateBindingRedirects Condition="$(DefineConstants.Contains(NETCOREAPP)) == false">true</AutoGenerateBindingRedirects>
27+
<AutoGenerateBindingRedirects Condition="'$(IsBuildingForLegacyFramework)' == 'true'">true</AutoGenerateBindingRedirects>
2728

2829
<UseWpf>true</UseWpf>
2930
<UseWindowsForms>true</UseWindowsForms>
@@ -45,11 +46,6 @@
4546
<InformationalVersion Condition="'$(InformationalVersion)' == ''">SRC</InformationalVersion>
4647
</PropertyGroup>
4748

48-
<PropertyGroup>
49-
<!-- <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
50-
<RestoreLockedMode Condition="'$(RestoreLockedMode)' == ''">true</RestoreLockedMode> -->
51-
</PropertyGroup>
52-
5349
<!-- Sign assembly -->
5450
<PropertyGroup>
5551
<SignAssembly>True</SignAssembly>
@@ -71,6 +67,7 @@
7167

7268
<!-- PDB-Options -->
7369
<PropertyGroup>
70+
<DebugSymbols>true</DebugSymbols>
7471
<DebugType>Embedded</DebugType>
7572
</PropertyGroup>
7673

@@ -85,7 +82,7 @@
8582
<ItemGroup>
8683
<PackageReference Include="JetBrains.Annotations" PrivateAssets="all" IncludeAssets="build;compile" />
8784

88-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" IncludeAssets="build;analyzers" Condition="$(DefineConstants.Contains(NETCOREAPP))" />
85+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" IncludeAssets="build;analyzers" />
8986
<!-- <PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" version="*" privateAssets="all" includeAssets="build;analyzers" /> -->
9087
<!-- <PackageReference Include="PropertyChangedAnalyzers" version="2.7.0" privateAssets="all" includeAssets="build;analyzers" />
9188
<PackageReference Include="ReflectionAnalyzers" version="0.1.19-dev" privateAssets="all" includeAssets="build;analyzers" /> -->

Fluent.Ribbon.Showcase/Fluent.Ribbon.Showcase.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<PackageReference Include="MahApps.Metro" Condition="$(InlcudeMahAppsMetro)" />
3636
</ItemGroup>
3737

38-
<ItemGroup Condition="$(DefineConstants.Contains(NETCOREAPP)) == false">
38+
<ItemGroup Condition="'$(IsBuildingForLegacyFramework)' == 'true'">
3939
<Reference Include="System.Web" />
4040
<Reference Include="System.Windows.Forms" />
4141
<Reference Include="System.Data" />

Fluent.Ribbon/Fluent.Ribbon.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
<None Include="../License.txt" Pack="true" PackagePath="license/License.txt" />
1818
<None Include="../Images/Logo/Logo_128x128.png" Pack="true" PackagePath="Logo.png" />
1919
</ItemGroup>
20-
<ItemGroup Condition="$(DefineConstants.Contains(NETCOREAPP)) == false">
20+
<ItemGroup Condition="'$(IsBuildingForLegacyFramework)' == 'true'">
2121
<Reference Include="UIAutomationProvider" />
2222
<Reference Include="UIAutomationTypes" />
2323
<Reference Include="WindowsFormsIntegration" />
2424
</ItemGroup>
2525

2626
<ItemGroup>
2727
<PackageReference Include="ControlzEx" />
28-
<PackageReference Include="System.Memory" />
28+
<PackageReference Include="System.Memory" Condition="'$(IsBuildingForLegacyFramework)' == 'true'" />
2929

3030
<PackageReference Include="XAMLTools.MSBuild" PrivateAssets="all" IncludeAssets="build" />
3131

0 commit comments

Comments
 (0)