Skip to content

Commit d02e4b9

Browse files
committed
Local testing
1 parent 8ec21fd commit d02e4b9

File tree

3 files changed

+28
-15
lines changed

3 files changed

+28
-15
lines changed

Directory.Build.props

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
4-
<Import Project="$(RepositoryEngineeringDir)CodeStyle.props" />
4+
<Import Project="$(RepositoryEngineeringDir)CodeStyle.props" />
55
<Import Project="$(RepositoryEngineeringDir)FacadeAssemblies.props" />
66
<Import Project="$(RepositoryEngineeringDir)ApiCompatibility\PublicApiAnalyzer.props" />
77

@@ -16,6 +16,14 @@
1616
<LangVersion>preview</LangVersion>
1717
</PropertyGroup>
1818

19+
<!-- ApplicationConfiguration specific settings -->
20+
<PropertyGroup>
21+
<ApplicationVisualStyles>true</ApplicationVisualStyles>
22+
<ApplicationFontName>Calibri</ApplicationFontName>
23+
<ApplicationFontSize>11</ApplicationFontSize>
24+
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
25+
</PropertyGroup>
26+
1927
<!-- SDK flipped to 'true' by default https://github.com/dotnet/sdk/pull/12720 -->
2028
<PropertyGroup>
2129
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>

src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/Program.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System;
6-
using System.Drawing;
76
using System.Threading;
87
using System.Windows.Forms;
98

@@ -17,15 +16,9 @@ static class Program
1716
[STAThread]
1817
static void Main()
1918
{
20-
Application.EnableVisualStyles();
21-
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
19+
ApplicationConfiguration.Initialize();
2220

23-
//Application.SetDefaultFont(new Font(new FontFamily("Microsoft Sans Serif"), 8f));
24-
//Application.SetDefaultFont(new Font(new FontFamily("Chiller"), 12f));
25-
Application.SetDefaultFont(new Font(new FontFamily("Calibri"), 11f));
26-
27-
Application.SetCompatibleTextRenderingDefault(false);
28-
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException); //UnhandledExceptionMode.ThrowException
21+
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException);
2922
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
3023
try
3124
{

src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/WinformsControlsTest.csproj

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,13 @@
1212
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1313
</PropertyGroup>
1414

15-
<PropertyGroup Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(TargetFramework)', '^netcoreapp\d'))">
16-
<DefineConstants>NETCORE</DefineConstants>
17-
</PropertyGroup>
18-
1915
<ItemGroup>
2016
<ProjectReference Include="..\..\..\..\System.Design\src\System.Design.Facade.csproj" />
2117
<ProjectReference Include="..\..\..\..\System.Windows.Forms.Design\src\System.Windows.Forms.Design.csproj" />
2218
<ProjectReference Include="..\..\..\src\System.Windows.Forms.csproj" />
2319
<ProjectReference Include="..\System.Windows.Forms.IntegrationTests.Common\System.Windows.Forms.IntegrationTests.Common.csproj" />
2420
</ItemGroup>
2521

26-
2722
<ItemGroup>
2823
<EmbeddedResource Include="Images\SmallA.bmp">
2924
<LogicalName>WinformsControlsTest.SmallA.bmp</LogicalName>
@@ -53,4 +48,21 @@
5348
</None>
5449
</ItemGroup>
5550

51+
<!--
52+
53+
Reference local analyzers for test purposes
54+
55+
-->
56+
<PropertyGroup>
57+
<!-- Don't try to resolve analyzers from <repo root>\.dotnet\packs\Microsoft.WindowsDesktop.App.Ref\<version>\ref\net6.0 -->
58+
<ResolveWinFormsAnalyzersFromSdkRefPack>false</ResolveWinFormsAnalyzersFromSdkRefPack>
59+
</PropertyGroup>
60+
61+
<ItemGroup>
62+
<ProjectReference Include="..\..\..\..\System.Windows.Forms.Analyzers\src\System.Windows.Forms.Analyzers.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
63+
<ProjectReference Include="..\..\..\..\System.Windows.Forms.Analyzers.CSharp\src\System.Windows.Forms.Analyzers.CSharp.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
64+
</ItemGroup>
65+
66+
<Import Project="..\..\..\..\System.Windows.Forms.Analyzers\src\System.Windows.Forms.Analyzers.props" />
67+
5668
</Project>

0 commit comments

Comments
 (0)