For a maui class library, use a fixed maui version or $(MauiVersion)
#35203
-
|
I'm building a <PackageReference Include="Microsoft.Maui.Controls" Version="10.0.50" />
<!-- or --->
<PackageReference Include="Microsoft.Maui.Controls" Version="[10.0.50,)" />
<!-- or --->
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />@jfversluis maybe you can bring some light into this. Thanks a lot for all your work and content so far :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
As with anything (in software development): it depends. If this is a library that is shared with the public, you probably want to be as compatible as possible, which means: the dependency on MAUI should be as low as possible. Additionally, you probably don't want that to version to change when the workload updates, especially if you are using hosted build agents that are outside of your control. And that is exactly what So assuming all these things:
Keep the dependency at the lowest version possible. That way consumers of your library will not be forced to update their MAUI version to use your library when they aren't ready to do that. And unless a MAUI version goes out of support or a MAUI version adds a specific fix or API that your library depends on, only then bump the version. Does that make sense? |
Beta Was this translation helpful? Give feedback.
As with anything (in software development): it depends.
If this is a library that is shared with the public, you probably want to be as compatible as possible, which means: the dependency on MAUI should be as low as possible. Additionally, you probably don't want that to version to change when the workload updates, especially if you are using hosted build agents that are outside of your control. And that is exactly what
$(MauiVersion)does.So assuming all these things:
Keep the dependen…