diff --git a/Winforms.sln b/Winforms.sln index 8e684b908d2..54eeb04ddea 100644 --- a/Winforms.sln +++ b/Winforms.sln @@ -175,6 +175,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ScratchProjectWithInternals EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComDisabled.Tests", "src\System.Windows.Forms\tests\ComDisabledTests\ComDisabled.Tests.csproj", "{55F3174F-C1FE-4C8F-AF71-2512630088F8}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TrimTestBinaryDeserialization", "src\System.Windows.Forms\tests\IntegrationTests\TrimTestBinaryDeserialization\TrimTestBinaryDeserialization.csproj", "{CFBCC732-C988-4FE7-A21B-98A142365374}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -963,6 +965,22 @@ Global {55F3174F-C1FE-4C8F-AF71-2512630088F8}.Release|x64.Build.0 = Release|Any CPU {55F3174F-C1FE-4C8F-AF71-2512630088F8}.Release|x86.ActiveCfg = Release|Any CPU {55F3174F-C1FE-4C8F-AF71-2512630088F8}.Release|x86.Build.0 = Release|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Debug|arm64.ActiveCfg = Debug|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Debug|arm64.Build.0 = Debug|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Debug|x64.ActiveCfg = Debug|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Debug|x64.Build.0 = Debug|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Debug|x86.ActiveCfg = Debug|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Debug|x86.Build.0 = Debug|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Release|Any CPU.Build.0 = Release|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Release|arm64.ActiveCfg = Release|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Release|arm64.Build.0 = Release|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Release|x64.ActiveCfg = Release|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Release|x64.Build.0 = Release|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Release|x86.ActiveCfg = Release|Any CPU + {CFBCC732-C988-4FE7-A21B-98A142365374}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1025,6 +1043,7 @@ Global {BA61D5A8-29E9-41AA-A3FA-B7F0A7F9A191} = {680FB14C-7B0C-4D63-9F1A-18ACCDB0F52A} {61376D2A-4AD5-48F4-BF99-2BB630E21945} = {77FEDB47-F7F6-490D-AF7C-ABB4A9E0B9D7} {55F3174F-C1FE-4C8F-AF71-2512630088F8} = {583F1292-AE8D-4511-B8D8-A81FE4642DDC} + {CFBCC732-C988-4FE7-A21B-98A142365374} = {680FB14C-7B0C-4D63-9F1A-18ACCDB0F52A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7B1B0433-F612-4E5A-BE7E-FCF5B9F6E136} diff --git a/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/Form1.Designer.cs b/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/Form1.Designer.cs new file mode 100644 index 00000000000..6e9edb654b6 --- /dev/null +++ b/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/Form1.Designer.cs @@ -0,0 +1,72 @@ +namespace TrimTestBinaryDeserialization +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + ListViewItem listViewItem1 = new ListViewItem("This is a ListViewItem with an image", 0); + imageList1 = new ImageList(components); + listView1 = new ListView(); + SuspendLayout(); + // + // imageList1 + // + imageList1.ColorDepth = ColorDepth.Depth32Bit; + imageList1.ImageStream = (ImageListStreamer)resources.GetObject("imageList1.ImageStream"); + imageList1.TransparentColor = Color.Transparent; + imageList1.Images.SetKeyName(0, "dotnet.png"); + // + // listView1 + // + listView1.Items.AddRange(new ListViewItem[] { listViewItem1 }); + listView1.LargeImageList = imageList1; + listView1.Location = new Point(0, 0); + listView1.Name = "listView1"; + listView1.Size = new Size(269, 139); + listView1.TabIndex = 0; + listView1.UseCompatibleStateImageBehavior = false; + listView1.View = View.Tile; + // + // Form1 + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(listView1); + Name = "Form1"; + Text = "Form1"; + ResumeLayout(false); + } + + #endregion + + private ImageList imageList1; + private ListView listView1; + } +} diff --git a/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/Form1.cs b/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/Form1.cs new file mode 100644 index 00000000000..200073a0e3e --- /dev/null +++ b/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/Form1.cs @@ -0,0 +1,13 @@ +using System.ComponentModel; + +namespace TrimTestBinaryDeserialization +{ + [DesignerCategory("Default")] + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + } +} diff --git a/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/Form1.resx b/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/Form1.resx new file mode 100644 index 00000000000..b7df8937774 --- /dev/null +++ b/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/Form1.resx @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs + LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu + SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAeAgAAAJNU0Z0AUkBTAMBAQAB + CAEAAQgBAAEQAQABEAEABP8BIQEACP8BQgFNATYHAAE2AwABKAMAAUADAAEQAwABAQEAASAGAAEQEgAB + 0gEpAU8B/wHSASkBTwH/AdIBKQFPAf8B0gEpAU8B/wHSASkBTwH/AdMBKgFQAf8B0gEpAU8B/wHSASkB + TwH/AdIBKQFPAf8B0gEpAU8B/wHSASkBTwH/AdIBKQFPAf8B0gEpAU8B/wHTASoBUAH/AdIBKQFPAf8B + 0gEpAU8B/8AAAdIBKQFPAf8B0gEpAU8B/wHSASkBTwH/AdIBKQFPAf8B0gEpAU8B/wHTASoBUAH/AdIB + KQFPAf8B0gEpAU8B/wHSASkBTwH/AdIBKQFPAf8B0gEpAU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0wEqAVAB/wHSASkBTwH/AdIBKQFPAf/AAAHSASkB + TwH/AdIBKQFPAf8B0gEpAU8B/wHSASkBTwH/AdIBKQFPAf8B0wEqAVAB/wHSASkBTwH/AdIBKQFPAf8B + 0gEpAU8B/wHSASkBTwH/AdIBKQFPAf8B0gEpAU8B/wHSASkBTwH/AdMBKgFQAf8B0gEpAU8B/wHSASkB + TwH/wAAB0gEpAU8B/wHSASkBTwH/AdIBKQFPAf8B0gEpAU8B/wHSASkBTwH/AdMBKgFQAf8B0gEpAU8B + /wHSASkBTwH/AdIBKQFPAf8B0gEpAU8B/wHSASkBTwH/AdIBKQFPAf8B0gEpAU8B/wHTASoBUAH/AdIB + KQFPAf8B0gEpAU8B/8AAAUIBTQE+BwABPgMAASgDAAFAAwABEAMAAQEBAAEBBQABgBcAA/+BAAs= + + + \ No newline at end of file diff --git a/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/Program.cs b/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/Program.cs new file mode 100644 index 00000000000..fa98acd98d7 --- /dev/null +++ b/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/Program.cs @@ -0,0 +1,16 @@ +namespace TrimTestBinaryDeserialization +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + public static void Main() + { + Application.EnableVisualStyles(); + Application.SetHighDpiMode(HighDpiMode.PerMonitorV2); + Application.Run(new Form1()); + } + } +} diff --git a/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/TrimTestBinaryDeserialization.csproj b/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/TrimTestBinaryDeserialization.csproj new file mode 100644 index 00000000000..5047df86f5e --- /dev/null +++ b/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/TrimTestBinaryDeserialization.csproj @@ -0,0 +1,26 @@ + + + + WinExe + enable + WinExe + enable + true + + false + false + false + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/readme.txt b/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/readme.txt new file mode 100644 index 00000000000..219a491db5a --- /dev/null +++ b/src/System.Windows.Forms/tests/IntegrationTests/TrimTestBinaryDeserialization/readme.txt @@ -0,0 +1 @@ +This project is meant as a scenario for testing and adding trimming support. \ No newline at end of file