How do I recover from .net maui error NU1105 ... The property PackageVersion was expected to have a single value across all target frameworks, but instead...

Kurt K 176 Reputation points
2025-07-08T03:13:08.76+00:00

This happened after I upgraded Microsoft.Maui.Controls from 9.0.70 to 9.0.81 using the NuGet Package Manager.

Full error message:

NU1105 Unable to read project information for '<MyProject>': The property PackageVersion was expected to have a single value across all target frameworks, but instead had the following values: 1.1, 1.0.0

Exiting Visual Studio, then deleting obj and bin folders, then starting Visual Studio again does not help.

Thank you.

Developer technologies | .NET | .NET MAUI
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Le (WICLOUD CORPORATION) 1,145 Reputation points Microsoft External Staff
    2025-08-13T03:26:25.2+00:00

    Hello @Kurt K,

    I really appreciate your engagement and patience in troubleshooting the issue. To assist you and others who may encounter a similar issue, I have summarized the problem and its resolution below for clarity.

    Problem Summary

    The issue arose due to ApplicationVersion and ApplicationDisplayVersion being defined in multiple locations within the project, leading to conflicts during the build process, particularly in multi-targeted .NET projects.

    Resolution

    To resolve this issue, I recommend avoiding multi-targeting by building one target framework at a time. Additionally, ensure that version properties are defined consistently and appropriately for your project’s requirements.

    1. Specify a Single Target Framework in the .csproj File
      Modify your .csproj file to target a single framework at a time, rather than using multi-targeting. Update the TargetFrameworks property to a single TargetFramework as shown below:
         <!-- Before (Multi-Targeting) -->
         <TargetFrameworks>net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.19041</TargetFrameworks>
       
         <!-- After (Single Target, Choose One) -->
         <TargetFramework>net9.0-ios</TargetFramework>
         <!-- OR -->
         <TargetFramework>net9.0-maccatalyst</TargetFramework>
         <!-- OR -->
         <TargetFramework>net9.0-windows10.0.19041</TargetFramework>
      

      Note that you should choose one of the target frameworks based on your current development focus. If you need to build for multiple platforms, consider doing so in separate builds rather than in a single multi-targeted build.

    2. Define Version Properties Consistently If all platforms share the same version, define ApplicationDisplayVersion and ApplicationVersion only once in the .csproj file, outside of any platform-specific conditional blocks:
         <PropertyGroup>
           <ApplicationDisplayVersion>1.1</ApplicationDisplayVersion>
           <ApplicationVersion>1</ApplicationVersion>
         </PropertyGroup>
      
    3. Handle Platform-Specific Versioning If your application requires different versions for each platform (e.g., iOS = 1.2, Android = 1.1), set these values directly in the respective platform-specific manifest files:
      • iOS: Info.plist
      • Android: AndroidManifest.xml
      • Windows: Package.appxmanifest
    4. Clean and Rebuild the Project
      After making these changes, clean your project to remove any cached build artifacts and then rebuild to ensure the new settings are applied correctly.

    Additional Notes

    • Ensure no duplicate definitions of ApplicationVersion or ApplicationDisplayVersion exist in your .csproj file or other configuration files, as this can lead to conflicts.
    • For further details on resolving NuGet-related issues, refer to the official documentation: NuGet Error NU1105.

    Again, thank you for your patience and collaboration in resolving this issue. If you have any further questions or need additional assistance, please feel free to reach out. I really appreciate your feedback.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.