diff --git a/windowsforms/README.md b/windowsforms/README.md index 7bfc409e792..d2366bfd96d 100644 --- a/windowsforms/README.md +++ b/windowsforms/README.md @@ -1,115 +1,40 @@ -# .NET Core 3.1 Windows Forms Samples - -With [.NET Core 3.1](https://github.com/dotnet/core-sdk#installers-and-binaries), you can build Windows Forms applications. - -## Why build Windows Forms applications on top of .NET Core - -If you're new to .NET Core, here are a few resources to help you understand the advantages of .NET Core for building Windows applications: - -* [Blog: .NET Core 3 and Support for Windows Desktop Applications](https://devblogs.microsoft.com/dotnet/net-core-3-and-support-for-windows-desktop-applications/) -* [Video: Modernizing Desktop Apps on Windows 10 with .NET Core 3.0 and much more](https://channel9.msdn.com/events/Build/2018/BRK3501?term=scott%20hunter&pubDate=year&lang-en=true) - -## Quality disclaimer - -.NET Core 3 support for desktop development is in preview. There are early daily builds available supporting Windows Forms and WPF. You will likely encounter missing tools, bugs, and unexpected behavior. We do not recommend using this SDK and tools for building applications for production scenarios. We do recommend using this SDK and tools to evaluate your how easy it will be to migrate your existing applications, or if you're just interested in trying out the latest upcoming Windows development technology. - -## Samples in this repo +# Windows Forms for .NET Samples | Sample Name | Description | | ----------- | ----------- | | [Hello World - shared source](helloworld-sharedsource) | This sample shows you how to share source between a .NET Framework Windows Forms application and a .NET Core Windows Forms application. Use this to get the full .NET Framework tooling experience while still building for .NET Core. | -| [Matching Game](matching-game) | This sample demonstrates simple event handling and timers in a .NET Core 3 Windows Forms application | -| [DataGridView Sample](datagridview) | This sample demonstrates DataGridView usage in .NET Core 3 | -| [Graphics Sample](graphics) | This sample demonstrates using GDI+ APIs via the Graphics type in .NET Core 3 | -| [Sudoku Sample](Sudoku) | This sample demonstrates creating a game using event handling and the Graphics type in .NET Core 3 | -| [Conway's Game of Life Sample](Conway's-Game-of-Life) | This sample demonstrates creating a DataGridView extension to handle OnRowPrePaint and trapping Windows Messages to prevent a left mouse click in .NET Core 3 | - -## Getting Started - -### Prerequisites and getting the tools +| [Matching Game](matching-game) | This sample demonstrates simple event handling and timers in a .NET Windows Forms application | +| [DataGridView Sample](datagridview) | This sample demonstrates DataGridView usage in .NET | +| [Graphics Sample](graphics) | This sample demonstrates using GDI+ APIs via the Graphics type in .NET | +| [Sudoku Sample](Sudoku) | This sample demonstrates creating a game using event handling and the Graphics type in .NET | +| [Conway's Game of Life Sample](Conway's-Game-of-Life) | This sample demonstrates creating a DataGridView extension to handle OnRowPrePaint and trapping Windows Messages to prevent a left mouse click in .NET | -Visual Studio 2019 Version 16.5.0 Preview 2.0 or later from , selecting the **.NET desktop development** workload with the options: **.NET Framework 4.7.2 development tools** and **.NET Core 3.1 development tools**. +## Prerequisites -Install the latest [.NET Core 3.1 SDK released or daily build](https://aka.ms/netcore3sdk) available in the [dotnet/code-sdk repo](https://github.com/dotnet/core-sdk). +- Windows Operating System. +- [Visual Studio 2022 version 17.12 or later to target .NET 9.](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2022+desktopguide+winforms+migration) +- [Visual Studio 2022 version 17.8 or later to target .NET 8.](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2022+desktopguide+winforms+migration) -### Analyzing your application's for .NET Core 3.1 readiness +## Porting apps from .NET Framework -If you want to first understand your existing applications readiness for targeting .NET Core 3.1 or later, you can run the .NET Portability Analyzer using the download link and instructions [here](https://devblogs.microsoft.com/dotnet/are-your-windows-forms-and-wpf-applications-ready-for-net-core-3-0/). This will produce a report that shows you API compatibility for each assembly that your application depends on. +If you want to first understand your existing application's readiness for migrating from .NET Framework to .NET, use the [.NET Upgrade Assistant](https://learn.microsoft.com/dotnet/core/porting/upgrade-assistant-how-to-analyze). This tool analyzes projects and generates a report that you can browse to get more information about the upgrade. -### Creating new .NET Core 3.1 or later Windows Forms applications +To learn how to migrate a Windows Forms app, see [Upgrade a .NET Framework Windows Forms desktop app to .NET](https://learn.microsoft.com/dotnet/desktop/winforms/migration/). -To create a new application you can use the `dotnet new` command, using the new templates for Windows Forms. +## Create Windows Forms app in the command line -In your favorite console run: +To create a new application you can use the `dotnet new` command, using the new templates for Windows Forms. Open a terminal use use the following commands: ```cmd dotnet new winforms -o MyWinFormsApp cd MyWinFormsApp -dotnet build dotnet run ``` -### Enable Windows Forms designers - -The Windows Forms designer for .NET Core 3 in Visual Studio is in preview and must be enabled. To enable the designergo to **Tools** > **Options** > **Environment** > **Preview Features** and select the **Use the preview Windows Forms designer for .NET Core apps** option. - -## Porting existing applications - ->We recommend running the [APIPort tool](https://github.com/Microsoft/dotnet-apiport-ui/releases) first to determine if there are any APIs your application depends on that are missing with .NET Core. - -There is no tooling available to help with project migration. In order to migrate your Windows Forms application, you will create a new project and manually port all of the elements defined in your original project. You will notice the new project is based on the simplified project format, and not everything is migrated. - -### Migrate the head project - -Ideally you should migrate all projects in your solution to target .NET Core 3.1 and/or .NET Standard 2.0. The first step to migrate will be to retarget the application's entry point (i.e., 'head' project) and maintain your existing references. - -1. Start from a working Solution. You must be able to open the solution in Visual Studio and double check that you can build and run without any issues. -2. If your solution also has server-side projects, such as ASP.NET, we recommend splitting your solution into different server and client solutions. For this effort, work with the client solution only. -3. Add a new .NET Core 3.1 Windows Forms project to the solution. Adding this project to a sibling folder to your existing 'head' project will make it easier to port references later (using relative paths to other projects or assemblies in the solution) -4. If your 'head' project uses NuGet packages, you must add the same NuGet packages to the new project. The new SDK-Style projects only support the PackageReference format for adding NuGet package references. If your existing project uses `packages.config`, you must migrate to the new format. You can use the Migrator Tool described [here](https://docs.microsoft.com/nuget/reference/migrate-packages-config-to-package-reference) to automate this process. -5. Copy the `PackageReference` elements generated in the previous step from the original project into the new project's .csproj file. -6. Copy the `ProjectReference` elements from the original project. Note: The new project format does not use the `Name` and `ProjectGuid` elements, so you can safely delete those. -7. At this point it's a good idea to try and restore/build to make sure all dependencies are properly configured. -8. [Link the files](#link-files-from-the-old-project) from your existing .NET Framework Windows Forms project to the .NET Core 3.1 Windows Forms project. -9. **Optional** If you have difficulties with compiler linking, you can copy the project files from the .NET Framework Windows Forms project to the new .NET Core 3.1 Windows Forms project. - - * C# files (files with the `.cs` extension) are included by default in the .csproj. - * Other project elements like `EmbeddedResources` can also use globbing. +## Create a Windows Forms app in Visual Studio -### Migration tips - -#### Configure assembly file generation - -Most existing projects include an `AssemblyInfo.cs` file in the Properties folder. The new project style uses a different approach and generates the same assembly attributes as part of the build process. To disable that behavior you can add the property: - -```xml -false -``` - -#### Include the Windows.Compatibility Pack - -Not every framework assembly is available in the .NET Core base class library. Windows applications like Windows Forms and WPF could have dependencies that are not available in .NET Core or .NET Standard. Adding a reference to the [Windows Compatibility Pack](https://docs.microsoft.com/dotnet/core/porting/windows-compat-pack) will help reduce missing assembly dependencies as it includes several types that might be needed by your application. - -```cmd -dotnet add package Microsoft.Windows.Compatibility -``` - -#### Link Files from the old project - -Visual Studio does not yet support designers and custom tools for .NET Core desktop development. You can keep your files in the original project and link the generated files to the new project by using the link attribute in the project elements, e.g. ``. See the [sample](helloworld-sharedsource) in this repo for an example of this. - -#### Migrating WCF clients - -.NET Core has its own implementation of `System.ServiceModel` with some differences: - -* It's available as NuGet packages (also included in the Windows Compatibility Pack). -* There are [unsupported features](https://github.com/dotnet/wcf/blob/main/release-notes/SupportedFeatures-v2.1.0.md) that you should review. -* The binding and endpoint address must be specified in the service client constructor. Otherwise, if you reuse the ServiceReference created by Visual Studio, you may get the following error: `System.PlatformNotSupportedException: 'Configuration files are not supported.'` +To create a new app in Visual Studio, see [Tutorial: Create a Windows Forms app with .NET](https://learn.microsoft.com/dotnet/desktop/winforms/get-started/create-app-visual-studio?view=netdesktop-9.0). ## Filing issues and getting help -You can file Windows Forms and WPF related issues in the [dotnet/core repo](https://github.com/dotnet/core/issues). If you are trying out WPF or Windows Forms development on top of .NET Core 3.1 and get stuck or have questions, reach out to . - -### Known issues - -Take a look at the issues filed with the [WinForms area tag](https://github.com/dotnet/core/labels/area-winforms). +You can file Windows Forms related issues in the [dotnet/winforms repo](https://github.com/dotnet/winforms/issues). diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame.Logic/Game.cs b/windowsforms/matching-game/net-windows/cs/MatchingGame.Logic/Game.cs similarity index 100% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame.Logic/Game.cs rename to windowsforms/matching-game/net-windows/cs/MatchingGame.Logic/Game.cs diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame.Logic/GameSettings.cs b/windowsforms/matching-game/net-windows/cs/MatchingGame.Logic/GameSettings.cs similarity index 100% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame.Logic/GameSettings.cs rename to windowsforms/matching-game/net-windows/cs/MatchingGame.Logic/GameSettings.cs diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame.Logic/MatchingGame.Logic.csproj b/windowsforms/matching-game/net-windows/cs/MatchingGame.Logic/MatchingGame.Logic.csproj similarity index 92% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame.Logic/MatchingGame.Logic.csproj rename to windowsforms/matching-game/net-windows/cs/MatchingGame.Logic/MatchingGame.Logic.csproj index 6647e09a21f..0c60300e8cc 100644 --- a/windowsforms/matching-game/net8-windows/cs/MatchingGame.Logic/MatchingGame.Logic.csproj +++ b/windowsforms/matching-game/net-windows/cs/MatchingGame.Logic/MatchingGame.Logic.csproj @@ -1,6 +1,6 @@  - net8.0 + net9.0 Library false MatchingGame.Logic diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame.Logic/Properties/AssemblyInfo.cs b/windowsforms/matching-game/net-windows/cs/MatchingGame.Logic/Properties/AssemblyInfo.cs similarity index 100% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame.Logic/Properties/AssemblyInfo.cs rename to windowsforms/matching-game/net-windows/cs/MatchingGame.Logic/Properties/AssemblyInfo.cs diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame.sln b/windowsforms/matching-game/net-windows/cs/MatchingGame.sln similarity index 91% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame.sln rename to windowsforms/matching-game/net-windows/cs/MatchingGame.sln index 5c9963fa389..6ce5320603d 100644 --- a/windowsforms/matching-game/net8-windows/cs/MatchingGame.sln +++ b/windowsforms/matching-game/net-windows/cs/MatchingGame.sln @@ -1,11 +1,11 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.28315.86 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MatchingGame", "MatchingGame\MatchingGame.csproj", "{33E7C299-4ABD-4224-9335-3BC70512A1B3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MatchingGame", "MatchingGame\MatchingGame.csproj", "{33E7C299-4ABD-4224-9335-3BC70512A1B3}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MatchingGame.Logic", "MatchingGame.Logic\MatchingGame.Logic.csproj", "{36B3E6E2-A9AE-4924-89AE-7F0120CE08BD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MatchingGame.Logic", "MatchingGame.Logic\MatchingGame.Logic.csproj", "{36B3E6E2-A9AE-4924-89AE-7F0120CE08BD}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame/MainForm.Designer.cs b/windowsforms/matching-game/net-windows/cs/MatchingGame/MainForm.Designer.cs similarity index 100% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame/MainForm.Designer.cs rename to windowsforms/matching-game/net-windows/cs/MatchingGame/MainForm.Designer.cs diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame/MainForm.cs b/windowsforms/matching-game/net-windows/cs/MatchingGame/MainForm.cs similarity index 100% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame/MainForm.cs rename to windowsforms/matching-game/net-windows/cs/MatchingGame/MainForm.cs diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame/MainForm.resx b/windowsforms/matching-game/net-windows/cs/MatchingGame/MainForm.resx similarity index 100% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame/MainForm.resx rename to windowsforms/matching-game/net-windows/cs/MatchingGame/MainForm.resx diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame/MatchingGame.csproj b/windowsforms/matching-game/net-windows/cs/MatchingGame/MatchingGame.csproj similarity index 93% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame/MatchingGame.csproj rename to windowsforms/matching-game/net-windows/cs/MatchingGame/MatchingGame.csproj index 2dc183ddf42..8a37ae12f78 100644 --- a/windowsforms/matching-game/net8-windows/cs/MatchingGame/MatchingGame.csproj +++ b/windowsforms/matching-game/net-windows/cs/MatchingGame/MatchingGame.csproj @@ -1,6 +1,6 @@  - net8.0-windows + net9.0-windows WinExe false true diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame/Program.cs b/windowsforms/matching-game/net-windows/cs/MatchingGame/Program.cs similarity index 100% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame/Program.cs rename to windowsforms/matching-game/net-windows/cs/MatchingGame/Program.cs diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame/Properties/Resources.Designer.cs b/windowsforms/matching-game/net-windows/cs/MatchingGame/Properties/Resources.Designer.cs similarity index 86% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame/Properties/Resources.Designer.cs rename to windowsforms/matching-game/net-windows/cs/MatchingGame/Properties/Resources.Designer.cs index 59fb7295edf..b58cb21bf1c 100644 --- a/windowsforms/matching-game/net8-windows/cs/MatchingGame/Properties/Resources.Designer.cs +++ b/windowsforms/matching-game/net-windows/cs/MatchingGame/Properties/Resources.Designer.cs @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace MatchingGame.Properties { - using System; - - +namespace MatchingGame.Properties +{ + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -19,43 +19,51 @@ namespace MatchingGame.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - + internal class Resources + { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { + internal Resources() + { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MatchingGame.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { + internal static global::System.Globalization.CultureInfo Culture + { + get + { return resourceCulture; } - set { + set + { resourceCulture = value; } } diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame/Properties/Resources.resx b/windowsforms/matching-game/net-windows/cs/MatchingGame/Properties/Resources.resx similarity index 100% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame/Properties/Resources.resx rename to windowsforms/matching-game/net-windows/cs/MatchingGame/Properties/Resources.resx diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame/Properties/Settings.Designer.cs b/windowsforms/matching-game/net-windows/cs/MatchingGame/Properties/Settings.Designer.cs similarity index 97% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame/Properties/Settings.Designer.cs rename to windowsforms/matching-game/net-windows/cs/MatchingGame/Properties/Settings.Designer.cs index 57568955d47..7ff0d87c5ba 100644 --- a/windowsforms/matching-game/net8-windows/cs/MatchingGame/Properties/Settings.Designer.cs +++ b/windowsforms/matching-game/net-windows/cs/MatchingGame/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace MatchingGame.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/windowsforms/matching-game/net8-windows/cs/MatchingGame/Properties/Settings.settings b/windowsforms/matching-game/net-windows/cs/MatchingGame/Properties/Settings.settings similarity index 100% rename from windowsforms/matching-game/net8-windows/cs/MatchingGame/Properties/Settings.settings rename to windowsforms/matching-game/net-windows/cs/MatchingGame/Properties/Settings.settings diff --git a/windowsforms/matching-game/net8-windows/cs/readme.md b/windowsforms/matching-game/net-windows/cs/readme.md similarity index 71% rename from windowsforms/matching-game/net8-windows/cs/readme.md rename to windowsforms/matching-game/net-windows/cs/readme.md index 6b15715904b..4cc5dbc7dd4 100644 --- a/windowsforms/matching-game/net8-windows/cs/readme.md +++ b/windowsforms/matching-game/net-windows/cs/readme.md @@ -6,7 +6,7 @@ products: - dotnet-core - windows-forms page_type: sample -name: "Matching Game Sample (.NET 8 C#)" +name: "Matching Game Sample (.NET 9 C#)" urlFragment: "matching-game-net-csharp" description: "A simple matching game written for Windows Forms" --- @@ -16,6 +16,6 @@ This sample demonstrates a simple memory game where you try to match tiles in th ## Prerequisites -- [Visual Studio 2022 version 17.8](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2022+desktopguide+winforms+migration) +- [Visual Studio 2022 version 17.12](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2022+desktopguide+winforms+migration) - Enable the [Visual Studio Desktop workload](https://learn.microsoft.com/visualstudio/install/modify-visual-studio?view=vs-2022&preserve-view=true#modify-workloads). diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/Game.vb b/windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/Game.vb similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/Game.vb rename to windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/Game.vb diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/GameSettings.vb b/windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/GameSettings.vb similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/GameSettings.vb rename to windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/GameSettings.vb diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/MatchingGame.Logic.vbproj b/windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/MatchingGame.Logic.vbproj similarity index 96% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/MatchingGame.Logic.vbproj rename to windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/MatchingGame.Logic.vbproj index a6c14613b52..26074686c75 100644 --- a/windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/MatchingGame.Logic.vbproj +++ b/windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/MatchingGame.Logic.vbproj @@ -1,9 +1,9 @@  - net8.0-windows - Library - WindowsForms + net9.0-windows true + Library + Windows false MatchingGame.Logic MatchingGame.Logic diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/Application.Designer.vb b/windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/Application.Designer.vb similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/Application.Designer.vb rename to windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/Application.Designer.vb diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/Application.myapp b/windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/Application.myapp similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/Application.myapp rename to windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/Application.myapp diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/AssemblyInfo.vb b/windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/AssemblyInfo.vb similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/AssemblyInfo.vb rename to windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/AssemblyInfo.vb diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/Resources.Designer.vb b/windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/Resources.Designer.vb similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/Resources.Designer.vb rename to windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/Resources.Designer.vb diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/Resources.resx b/windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/Resources.resx similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/Resources.resx rename to windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/Resources.resx diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/Settings.Designer.vb b/windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/Settings.Designer.vb similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/Settings.Designer.vb rename to windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/Settings.Designer.vb diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/Settings.settings b/windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/Settings.settings similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame.Logic/My Project/Settings.settings rename to windowsforms/matching-game/net-windows/vb/MatchingGame.Logic/My Project/Settings.settings diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame.sln b/windowsforms/matching-game/net-windows/vb/MatchingGame.sln similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame.sln rename to windowsforms/matching-game/net-windows/vb/MatchingGame.sln diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame/MainForm.Designer.vb b/windowsforms/matching-game/net-windows/vb/MatchingGame/MainForm.Designer.vb similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame/MainForm.Designer.vb rename to windowsforms/matching-game/net-windows/vb/MatchingGame/MainForm.Designer.vb diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame/MainForm.resx b/windowsforms/matching-game/net-windows/vb/MatchingGame/MainForm.resx similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame/MainForm.resx rename to windowsforms/matching-game/net-windows/vb/MatchingGame/MainForm.resx diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame/MainForm.vb b/windowsforms/matching-game/net-windows/vb/MatchingGame/MainForm.vb similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame/MainForm.vb rename to windowsforms/matching-game/net-windows/vb/MatchingGame/MainForm.vb diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame/MatchingGame.vbproj b/windowsforms/matching-game/net-windows/vb/MatchingGame/MatchingGame.vbproj similarity index 97% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame/MatchingGame.vbproj rename to windowsforms/matching-game/net-windows/vb/MatchingGame/MatchingGame.vbproj index 1625abbb078..f7346c3c685 100644 --- a/windowsforms/matching-game/net8-windows/vb/MatchingGame/MatchingGame.vbproj +++ b/windowsforms/matching-game/net-windows/vb/MatchingGame/MatchingGame.vbproj @@ -1,6 +1,6 @@  - net8.0-windows + net9.0-windows WinExe MatchingGame.My.MyApplication WindowsForms diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/Application.Designer.vb b/windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/Application.Designer.vb similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/Application.Designer.vb rename to windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/Application.Designer.vb diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/Application.myapp b/windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/Application.myapp similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/Application.myapp rename to windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/Application.myapp diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/AssemblyInfo.vb b/windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/AssemblyInfo.vb similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/AssemblyInfo.vb rename to windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/AssemblyInfo.vb diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/Resources.Designer.vb b/windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/Resources.Designer.vb similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/Resources.Designer.vb rename to windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/Resources.Designer.vb diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/Resources.resx b/windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/Resources.resx similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/Resources.resx rename to windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/Resources.resx diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/Settings.Designer.vb b/windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/Settings.Designer.vb similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/Settings.Designer.vb rename to windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/Settings.Designer.vb diff --git a/windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/Settings.settings b/windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/Settings.settings similarity index 100% rename from windowsforms/matching-game/net8-windows/vb/MatchingGame/My Project/Settings.settings rename to windowsforms/matching-game/net-windows/vb/MatchingGame/My Project/Settings.settings diff --git a/windowsforms/matching-game/net8-windows/vb/readme.md b/windowsforms/matching-game/net-windows/vb/readme.md similarity index 69% rename from windowsforms/matching-game/net8-windows/vb/readme.md rename to windowsforms/matching-game/net-windows/vb/readme.md index 79a82194c87..eb414a4ce92 100644 --- a/windowsforms/matching-game/net8-windows/vb/readme.md +++ b/windowsforms/matching-game/net-windows/vb/readme.md @@ -6,7 +6,7 @@ products: - dotnet-core - windows-forms page_type: sample -name: "Matching Game Sample (.NET 8 Visual Basic)" +name: "Matching Game Sample (.NET 9 Visual Basic)" urlFragment: "matching-game-net-vb" description: "A simple matching game" --- @@ -16,6 +16,6 @@ This sample demonstrates a simple memory game where you try to match tiles in th ## Prerequisites -- [Visual Studio 2022 version 17.8](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2022+desktopguide+winforms+migration) +- [Visual Studio 2022 version 17.12](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=learn.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2022+desktopguide+winforms+migration) - Enable the [Visual Studio Desktop workload](https://learn.microsoft.com/visualstudio/install/modify-visual-studio?view=vs-2022&preserve-view=true#modify-workloads). diff --git a/windowsforms/matching-game/readme.md b/windowsforms/matching-game/readme.md index 77aae76ca33..d59f073e66a 100644 --- a/windowsforms/matching-game/readme.md +++ b/windowsforms/matching-game/readme.md @@ -1,8 +1,8 @@ # Matching Game Sample -These two samples are used by the [.NET Upgrade Assistant](https://docs.microsoft.com/dotnet/core/porting/upgrade-assistant-wpf-framework) article. +These two samples are used by the [.NET Upgrade Assistant](https://learn.microsoft.com/dotnet/desktop/winforms/migration/) article. - The .NET Framework version of the app is available in the *net45* folder. -- The .NET 5 version of the app is available in the *net5-windows* folder. +- The .NET version of the app is available in the *net#-windows* folder. ![Screenshot](images/screenshot.png)