Skip to content

Commit 474d8fb

Browse files
MS.VB.Forms.Tests is not testing design time scenarios, removing DT dependencies.
replaced BaseOutputPath with ArtifactsBinDir in projects restored workaround to reference the right instance of System.Drawing facade assembly from tests
1 parent 8158b01 commit 474d8fb

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

src/Microsoft.VisualBasic.Forms/tests/UnitTests/Microsoft.VisualBasic.Forms.Tests.vbproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,10 @@
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20-
<ProjectReference Include="..\..\..\System.Design\src\System.Design.Facade.csproj" />
2120
<ProjectReference Include="..\..\..\System.Drawing.Common\src\System.Drawing.Common.csproj" />
22-
<ProjectReference Include="..\..\..\System.Drawing.Design\src\System.Drawing.Design.Facade.csproj" />
2321
<ProjectReference Include="..\..\..\System.Windows.Forms.Primitives\tests\TestUtilities\System.Windows.Forms.Primitives.TestUtilities.csproj" />
2422
<ProjectReference Include="..\..\..\test\util\System.Windows.Forms\System.Windows.Forms.TestUtilities.csproj" />
2523
<ProjectReference Include="..\..\src\Microsoft.VisualBasic.Forms.vbproj" />
2624
</ItemGroup>
2725

28-
<ItemGroup>
29-
<!-- workaround for https://github.com/dotnet/sdk/issues/3254 -->
30-
<Reference Include="$(BaseOutputPath)..\System.Drawing.Facade\$(Configuration)\$(SourceTargetFramework)\System.Drawing.dll" />
31-
</ItemGroup>
32-
3326
</Project>

src/System.Windows.Forms.Design/tests/UnitTests/System.Windows.Forms.Design.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<ItemGroup>
3030
<!-- workaround for https://github.com/dotnet/sdk/issues/3254 -->
31-
<Reference Include="$(BaseOutputPath)..\System.Design.Facade\$(Configuration)\$(SourceTargetFramework)\System.Design.dll" />
31+
<Reference Include="$(ArtifactsBinDir)\System.Design.Facade\$(Configuration)\$(SourceTargetFramework)\System.Design.dll" />
3232
</ItemGroup>
3333

3434
<ItemGroup>

src/System.Windows.Forms/System/Windows/Forms/DataBinding/ControlBindingsCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace System.Windows.Forms;
1010
/// Represents the collection of data bindings for a control.
1111
/// </summary>
1212
[DefaultEvent(nameof(CollectionChanged))]
13-
[Editor($"System.Drawing.Design.UITypeEditor, {(Assemblies.SystemDrawing)}", typeof(UITypeEditor))]
13+
[Editor($"System.Drawing.Design.UITypeEditor, {Assemblies.SystemDrawing}", typeof(UITypeEditor))]
1414
[TypeConverter($"System.Windows.Forms.Design.ControlBindingsConverter, {Assemblies.SystemDesign}")]
1515
public class ControlBindingsCollection : BindingsCollection
1616
{

src/test/unit/System.Windows.Forms/System.Windows.Forms.Tests.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@
3131
<ProjectReference Include="..\..\..\System.Private.Windows.Core\tests\System.Private.Windows.Core.Tests\System.Private.Windows.Core.Tests.csproj" />
3232
<ProjectReference Include="..\..\..\System.Windows.Forms\System.Windows.Forms.csproj" />
3333
<ProjectReference Include="..\..\..\System.Design\src\System.Design.Facade.csproj" />
34+
<!-- This facade assembly is required to resolve UITypeEditor type from NETFX that is referenced in EditorAttributes -->
35+
<ProjectReference Include="..\..\..\System.Drawing\src\System.Drawing.Facade.csproj" />
3436
<ProjectReference Include="..\..\..\System.Drawing.Design\src\System.Drawing.Design.Facade.csproj" />
3537
<ProjectReference Include="..\..\integration\System.Windows.Forms.IntegrationTests.Common\System.Windows.Forms.IntegrationTests.Common.csproj" />
3638
<ProjectReference Include="..\..\util\System.Windows.Forms\System.Windows.Forms.TestUtilities.csproj" />
3739
</ItemGroup>
3840

3941
<ItemGroup>
4042
<!-- workaround for https://github.com/dotnet/sdk/issues/3254 -->
41-
<Reference Include="$(BaseOutputPath)..\System.Drawing.Facade\$(Configuration)\$(SourceTargetFramework)\System.Drawing.dll" />
43+
<Reference Include="$(ArtifactsBinDir)\System.Drawing.Facade\$(Configuration)\$(SourceTargetFramework)\System.Drawing.dll" />
4244
</ItemGroup>
4345

4446
<ItemGroup>

src/test/unit/System.Windows.Forms/System/Windows/Forms/Design/DesignerAttributeTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public void TypeConverterAttribute_TypeExists(string subject, TypeConverterAttri
171171
[MemberData(nameof(GetAttributeOfTypeAndProperty_TestData), Assemblies.SystemWindowsForms, typeof(EditorAttribute))]
172172
public void EditorAttribute_TypeExists(string subject, EditorAttribute attribute)
173173
{
174-
var type = Type.GetType(attribute.EditorTypeName, false);
174+
var type = Type.GetType(attribute.EditorTypeName, throwOnError: false);
175175
_output.WriteLine($"{subject}: {attribute.EditorTypeName} --> {type?.Name}");
176176

177177
if (SkipList.Contains(attribute.EditorTypeName))

0 commit comments

Comments
 (0)