Upgrading the PowerServer C# solution and C# extensions

When a PowerServer Web API solution created in Version 2025 or earlier is built in Version 2025 R2, the solution will be automatically backed up (in WebAPI_bak sub-folder under the solution directory) and then upgraded to the current version.

During the upgrade:

  • Files in the AppModels and ServerAPIs folders that are generated and managed by PowerServer are automatically updated and replaced with the versions required by the current PowerServer release.

  • Projects in the UserExtensions folder are preserved and are intended for custom code and user extensions. Unlike the AppModels and ServerAPIs folders, PowerServer does not replace files in this folder. Instead, it updates only the framework-related dependencies and configuration required by the current PowerServer version.

    For projects in the UserExtensions folder, PowerServer automatically:

    • Updates the project TargetFramework and/or .NET SDK used to build the project, and NuGet packages and transitive dependencies to the versions required by the current PowerServer project.

    • Adds new configuration settings required by new features when necessary (for example, new entries in UserConfig.json).

    • Preserves all custom files, scripts, and other user-added content.

    PowerServer does not automatically:

    • Update custom application code.

    • Update manually added NuGet packages or other third-party dependencies that were added by the developer.

    • Resolve compatibility issues caused by framework or dependency upgrades.

    If custom code or manually added dependencies are incompatible with the upgraded .NET or ASP.NET Core framework, compilation errors may occur due to breaking changes. If this happens, review and update any affected custom code and manually added dependencies in the solution.

    If compilation or runtime issues persist, we recommend:

    • Verify that your custom code was correctly merged into the upgraded solution.

    • Manually update incompatible dependencies or code.

    • If necessary, create a new PowerServer C# solution and manually migrate your custom code into the new solution. (PowerServer created a backup of the original solution (for example, a WebAPI_bak folder) during the upgrade).