Skip to content

Conversation

@sven-n
Copy link
Member

@sven-n sven-n commented Dec 22, 2025

Tasks:

  • Set build targets to .NET 10
  • Centralized Package Management
  • Extracted common web stuff into a new project MUnique.OpenMU.Web.Shared so that static web assets aren't copied around a dozens of times
  • Fix CI/CD workflows
  • Update all nuget packages
  • Test the distributed deployment since GameServer.Host and AdminPanel.Host is affected by the Web.Shared project change

The upgrade involves a workaround for the following issue in the .NET 10 SDK: dotnet/sdk#52089

@gemini-code-assist
Copy link

Summary of Changes

Hello @sven-n, 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 primarily focuses on a significant infrastructure upgrade, migrating the entire codebase to .NET 10. This transition is accompanied by the adoption of Centralized Package Management to simplify dependency handling. A major architectural improvement involves extracting shared web functionalities into a new MUnique.OpenMU.Web.Shared project to house common web components and utilities, reducing code duplication and improving maintainability for the web frontends. Additionally, Docker build configurations have been updated to reflect the new .NET version, and a targeted fix has been applied to address a static web asset issue encountered during the upgrade process.

Highlights

  • Framework Modernization: The entire solution has been upgraded to target .NET 10, embracing the latest performance enhancements and features of the platform.
  • Streamlined Dependency Management: Centralized Package Management has been implemented by introducing a Directory.Packages.props file, simplifying the management and consistency of NuGet package versions across all projects.
  • Architectural Refinement for Web Projects: Common web-related code, including UI components, services, and styling, has been extracted from MUnique.OpenMU.Web.AdminPanel into a new MUnique.OpenMU.Web.Shared project, significantly improving modularity and reusability.
  • Containerization Updates: Dockerfiles for various services have been updated to utilize .NET 10 base images, ensuring that containerized deployments are aligned with the new framework version.
  • Static Web Asset Resolution: A specific build target has been added to address a known .NET SDK bug that caused issues with static web asset discovery when web projects referenced each other, ensuring correct asset bundling and serving.

🧠 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.

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.

Copy link

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

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 is a significant step forward, upgrading the project to .NET 10, centralizing package management, and refactoring shared web components. These are all excellent improvements for the project's maintainability and future-proofing. The workaround for the .NET 10 SDK bug is well-documented and correctly implemented.

I've found a few issues that need attention. There are several duplicate package definitions in the new Directory.Packages.props file, which will likely cause build failures. Additionally, some necessary scripts and stylesheets for Blazored.Modal appear to be commented out, which could break modal dialog functionality. I've also included a suggestion to improve maintainability by moving an inline script to a separate file. Please see my detailed comments.

Comment on lines 28 to 38
//yield return "_content/Blazored.Modal/blazored.modal.js";
yield return "_content/BlazorInputFile/inputfile.js";
}
}

private static IEnumerable<string> SharedStylesheets
{
get
{
yield return "_content/Blazored.Typeahead/blazored-typeahead.css";
//yield return "_content/Blazored.Modal/blazored-modal.css";

Choose a reason for hiding this comment

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

high

The scripts and stylesheets for Blazored.Modal are commented out. This library is used in several places for modal dialogs, and without its JavaScript and CSS files, the modals will not function correctly. These lines should be uncommented to ensure modals work as expected.

            yield return "_content/Blazored.Typeahead/blazored-typeahead.js";
            yield return "_content/Blazored.Modal/blazored.modal.js";
            yield return "_content/BlazorInputFile/inputfile.js";
        }
    }

    private static IEnumerable<string> SharedStylesheets
    {
        get
        {
            yield return "_content/Blazored.Typeahead/blazored-typeahead.css";
            yield return "_content/Blazored.Modal/blazored-modal.css";

Comment on lines +11 to +17
<script>
// plain javascript to make JS Interop easier
function GetMapHostBoundingClientRect() {
return document.getElementsByClassName("map-host")[0].getBoundingClientRect();
}
</script>

Choose a reason for hiding this comment

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

medium

Placing JavaScript directly inside a .razor file is generally not recommended as it can make the code harder to maintain, debug, and reuse. It's better to keep your JavaScript in separate .js files.

I suggest moving this script to its own file, for example, wwwroot/js/map-editor.js within the MUnique.OpenMU.Web.Shared project, and then including it through the Exports.cs file. This will improve code organization and allow the browser to cache the script file.

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.

2 participants