Skip to content

Commit

Permalink
net48
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsck committed Aug 29, 2020
1 parent d6c4be1 commit cda7c8c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion DnSpyCommon.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- .github/workflows/build.yml
- dnSpy/dnSpy/app.config (supportedRuntime, .NET Framework only)
NOTE: Update the ABOVE files when TargetFrameworks is updated -->
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net48;netcoreapp3.1</TargetFrameworks>
<IsDotNetFramework>false</IsDotNetFramework>
<IsDotNetCore>false</IsDotNetCore>
<IsSelfContainedDotNetCore>false</IsSelfContainedDotNetCore>
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
param([string]$buildtfm = 'all', [switch]$NoMsbuild)
$ErrorActionPreference = 'Stop'

$net_tfm = 'net472'
$net_tfm = 'net48'
$netcore_tfm = 'netcoreapp3.1'
$configuration = 'Release'
$net_baseoutput = "dnSpy\dnSpy\bin\$configuration"
Expand Down
14 changes: 0 additions & 14 deletions dnSpy/dnSpy/MainApp/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,6 @@ void AddAppContextFixes() {
// This prevents a thin line between the tab item and its content when dpi is eg. 144.
// It's hard to miss if you check the Options dialog box.
AppContext.SetSwitch("Switch.MS.Internal.DoNotApplyLayoutRoundingToMarginsAndBorderThickness", true);

#if NETFRAMEWORK
// Workaround for a bug
// Switch.System.Windows.Controls.Grid.StarDefinitionsCanExceedAvailableSpace=true
// https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/runtime/4.7-4.7.1#resizing-a-grid-can-hang
// Repro: DPI=120%, .NET Framework 4.7.1, open the File, View, or Window menus
// https://github.com/0xd4d/dnSpy/issues/734
// https://github.com/0xd4d/dnSpy/issues/735
// This has been fixed in .NET Core 3.0 and .NET Framework 4.8
#if NET48
#error Remove this now
#endif
AppContext.SetSwitch("Switch.System.Windows.Controls.Grid.StarDefinitionsCanExceedAvailableSpace", true);
#endif
}

ExportProvider InitializeMEF(bool readSettings, bool useCache) {
Expand Down
2 changes: 0 additions & 2 deletions dnSpy/dnSpy/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,5 @@
<legacyCorruptedStateExceptionsPolicy enabled="true"/>
<gcServer enabled="true"/>
<gcConcurrent enabled="true"/>
<!-- TODO: Switch.System.Windows.DoNotUsePresentationDpiCapabilityTier2OrGreater,Switch.System.Windows.DoNotScaleForDpiChanges can be removed when we target .NET Framework 4.8 or later -->
<AppContextSwitchOverrides value="Switch.System.Windows.DoNotUsePresentationDpiCapabilityTier2OrGreater=false;Switch.System.Windows.DoNotScaleForDpiChanges=false"/>
</runtime>
</configuration>

0 comments on commit cda7c8c

Please sign in to comment.