Skip to content

Upgrade to net10#11

Open
daveMueller wants to merge 3 commits into
futurist:githubfrom
daveMueller:upgrade-to-NET10
Open

Upgrade to net10#11
daveMueller wants to merge 3 commits into
futurist:githubfrom
daveMueller:upgrade-to-NET10

Conversation

@daveMueller

Copy link
Copy Markdown
Contributor

We are updating our system where your app is used. I wanted to get rid of the dependency to .Net Framework 3.5 and didn't want to find another launcher alternative.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly modernizes the runapp project by upgrading its target framework from the outdated .NET Framework 3.5 to net10.0-windows. This crucial update involves migrating the project to the streamlined SDK-style format, eliminating the need for a separate AssemblyInfo.cs file, and updating the solution file for compatibility with current Visual Studio versions. The overall purpose is to remove a dependency on an older .NET Framework, enhancing maintainability and leveraging newer platform features.

Highlights

  • Target Framework Upgrade: The project's target framework has been upgraded from .NET Framework 3.5 to net10.0-windows, signifying a major modernization of the application's underlying platform.
  • Project File Modernization: The runapp.csproj file has been converted from the older MSBuild format to the contemporary SDK-style project format, simplifying project configuration and management.
  • AssemblyInfo.cs Removal: The Properties/AssemblyInfo.cs file has been removed, as assembly attributes are now typically managed directly within the SDK-style .csproj file.
  • Solution File Update: The runapp.sln file has been updated to a newer Visual Studio format, including version information and a new solution GUID, ensuring compatibility with modern development environments.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • Properties/AssemblyInfo.cs
    • Removed the traditional assembly information file, as its contents are now managed within the project file.
  • runapp.csproj
    • Migrated the project file to the SDK-style format, simplifying its structure.
    • Updated the target framework from .NET Framework 3.5 to net10.0-windows.
    • Removed numerous legacy project properties and explicit references, which are now implicitly handled or inferred.
    • Added UseWindowsForms and ImportWindowsDesktopTargets to correctly configure Windows Forms for the new framework.
    • Updated the ApplicationVersion from 1.1.1.0 to 2.0.0.0.
  • runapp.sln
    • Updated the solution file format from Visual Studio 2008 to Visual Studio 2017.
    • Added VisualStudioVersion and MinimumVisualStudioVersion properties.
    • Included a new SolutionGuid within the ExtensibilityGlobals section.
Activity
  • No specific activity (comments, reviews, progress updates) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully upgrades the project from the legacy .NET Framework to a modern SDK-style project. My review focuses on several important corrections and improvements for the new .csproj file. There is a critical issue with an invalid Target Framework Moniker that will prevent the project from building. I've also included suggestions to align the project with modern .NET best practices, such as using the correct SDK for Windows Forms, cleaning up redundant references, and ensuring assembly metadata is preserved.

Comment thread runapp.csproj
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{AF33361C-4CFB-44C0-9070-FDB34A87E362}</ProjectGuid>
<TargetFramework>net10.0-windows</TargetFramework>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The Target Framework Moniker (TFM) net10.0-windows is not valid and will cause the build to fail. Please use a valid TFM. For example, if you are targeting .NET 8 (the current Long-Term Support version), the correct TFM would be net8.0-windows.

    <TargetFramework>net8.0-windows</TargetFramework>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is not true, it is a valid TFM. Check the the docs here https://learn.microsoft.com/en-us/dotnet/standard/frameworks#os-specific-tfms

Comment thread runapp.csproj
@@ -1,22 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For Windows Forms applications, it's recommended to use the Microsoft.NET.Sdk.WindowsDesktop SDK. This simplifies the project file by automatically including necessary settings and references for Windows Forms. By making this change, you can also remove the <ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets> property on line 25, as it becomes redundant.

<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed anymore. If you use Microsoft.NET.Sdk.WindowsDesktop the compiler throws a warning:

warning NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Consider changing the Sdk attribute of the root Project element to 'Microsoft.NET.Sdk'

Comment thread runapp.csproj Outdated
Comment on lines +28 to +29
<Reference Update="System.Core"/>
<Reference Update="System.Xml.Linq"/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In SDK-style projects, framework assemblies like System.Core and System.Xml.Linq are referenced automatically as part of the target framework. These <Reference Update="..." /> tags are unnecessary and should be removed to keep the project file clean.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct, I removed them with a new commit.

@futurist

futurist commented Mar 8, 2026

Copy link
Copy Markdown
Owner

Can you test on some old windows like windows 10 to ensure the compatible is OK?

@daveMueller

Copy link
Copy Markdown
Contributor Author

Sure I checked it. As long as .net 10 is installed it will work on a Windows OS. I usually prefere to compile self contained in a single file so that I don't need a separate .net 10 installation. But that is just a personal preference.

D:\Repos\runapp> dotnet publish -p:PublishSingleFile=true --self-contained

Here is a gif for the test on Windows 10.

runapp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants