Skip to content

Commit

Permalink
Simplified App.config for bootstrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Nov 17, 2024
1 parent 14d65f7 commit e6a055b
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/Alias.Cli/Alias.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<OutputType>Exe</OutputType>
<OutputPath>..\..\artifacts\$(Configuration)\</OutputPath>
</PropertyGroup>
<ItemGroup>
<None Include="..\App.config" />
</ItemGroup>

<!-- Dependencies -->
<ItemGroup>
Expand Down
20 changes: 20 additions & 0 deletions src/Bootstrap.WinForms/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<runtime>
<relativeBindForResources enabled="true" />
<enforceFIPSPolicy enabled="false" />
<generatePublisherEvidence enabled="false" />
<AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false;Switch.System.IO.BlockLongPaths=false" />
</runtime>
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings>
<system.net>
<defaultProxy useDefaultCredentials="true" />
</system.net>
</configuration>
3 changes: 1 addition & 2 deletions src/Bootstrap.WinForms/Bootstrap.WinForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<OutputType>WinExe</OutputType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<UseWindowsForms>True</UseWindowsForms>
<AutoGenerateBindingRedirects>False</AutoGenerateBindingRedirects><!-- Not needed due to ILRepack -->
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DefineConstants>ERROR_REPORT</DefineConstants>
Expand Down Expand Up @@ -44,7 +43,7 @@ mkdir "%ARTIFACT_DIR%"

pushd "$(OutDir)"
"$(ILRepack)" /targetplatform:v4 /ndebug /union /noRepackRes /wildcards /out:"%ARTIFACT_DIR%\$(TargetName).exe" "$(TargetPath)" 0install.exe ZeroInstall.*.dll Generator.Equals.Runtime.dll NanoByte.Common*.dll TaskDialog.dll System.Buffers.dll System.Memory.dll System.Runtime.*.dll System.Threading.*.dll Microsoft.Bcl.HashCode.dll Newtonsoft.Json.dll INIFileParser.dll BouncyCastle.OpenPgp.dll ICSharpCode.SharpZipLib.dll NDesk.Options.dll
copy /y $(TargetName).exe.config "%ARTIFACT_DIR%\$(TargetName).exe.config"
copy /y "$(ProjectDir)\App.config" "%ARTIFACT_DIR%\$(TargetName).exe.config"
copy /y BootstrapConfig.ini "%ARTIFACT_DIR%\$(TargetName).ini"
popd</PostBuildEvent>
</PropertyGroup>
Expand Down
17 changes: 17 additions & 0 deletions src/Bootstrap/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<runtime>
<relativeBindForResources enabled="true" />
<enforceFIPSPolicy enabled="false" />
<generatePublisherEvidence enabled="false" />
<AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false;Switch.System.IO.BlockLongPaths=false" />
</runtime>
<system.net>
<defaultProxy useDefaultCredentials="true" />
</system.net>
</configuration>
3 changes: 1 addition & 2 deletions src/Bootstrap/Bootstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<Copyright></Copyright>
<OutputType>Exe</OutputType>
<OutputPath>bin\$(Configuration)\</OutputPath>
<AutoGenerateBindingRedirects>False</AutoGenerateBindingRedirects><!-- Not needed due to ILRepack -->
</PropertyGroup>

<!-- Dependencies -->
Expand All @@ -32,7 +31,7 @@ mkdir "%ARTIFACT_DIR%"

pushd "$(OutDir)"
"$(ILRepack)" /targetplatform:v4 /ndebug /union /noRepackRes /wildcards /out:"%ARTIFACT_DIR%\$(TargetName).exe" "$(TargetPath)" ZeroInstall.*.dll Generator.Equals.Runtime.dll NanoByte.Common.dll System.Buffers.dll System.Memory.dll System.Runtime.*.dll System.Threading.*.dll Microsoft.Bcl.HashCode.dll Newtonsoft.Json.dll INIFileParser.dll BouncyCastle.OpenPgp.dll ICSharpCode.SharpZipLib.dll NDesk.Options.dll
copy /y $(TargetName).exe.config "%ARTIFACT_DIR%\$(TargetName).exe.config"
copy /y "$(ProjectDir)\App.config" "%ARTIFACT_DIR%\$(TargetName).exe.config"
copy /y BootstrapConfig.ini "%ARTIFACT_DIR%\$(TargetName).ini"
popd</PostBuildEvent>
</PropertyGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/Central.WinForms/Central.WinForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DefineConstants>ERROR_REPORT</DefineConstants>
</PropertyGroup>
<ItemGroup>
<None Include="..\App.config" />
</ItemGroup>

<!-- Global usings -->
<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/Commands.WinForms/Commands.WinForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DefineConstants>ERROR_REPORT</DefineConstants>
</PropertyGroup>
<ItemGroup>
<None Include="..\App.config" />
</ItemGroup>

<!-- Global usings -->
<ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
<NanoByteCommonVersion>2.18.8</NanoByteCommonVersion>
<ZeroInstallVersion>2.26.0</ZeroInstallVersion>
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)App.config" />
</ItemGroup>

<!-- Global usings -->
<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/Launcher.Cli/Launcher.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<OutputType>Exe</OutputType>
<OutputPath>..\..\artifacts\$(Configuration)\</OutputPath>
</PropertyGroup>
<ItemGroup>
<None Include="..\App.config" />
</ItemGroup>

<!-- Dependencies -->
<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/Store.Management.Cli/Store.Management.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<OutputType>Exe</OutputType>
<OutputPath>..\..\artifacts\$(Configuration)\</OutputPath>
</PropertyGroup>
<ItemGroup>
<None Include="..\App.config" />
</ItemGroup>

<!-- Dependencies -->
<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/Store.Service/Store.Service.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<OutputPath>..\..\artifacts\$(Configuration)\</OutputPath>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<None Include="..\App.config" />
</ItemGroup>

<!-- Dependencies -->
<ItemGroup>
Expand Down

0 comments on commit e6a055b

Please sign in to comment.