csla icon indicating copy to clipboard operation
csla copied to clipboard

Use CentralPackageVersioning in samples to simplify maintenance

Open TheCakeMonster opened this issue 2 years ago • 2 comments

Central package versioning is now a first class citizen of .NET, and make management of things like sample applications easier. It probably makes sense to change over the samples to make use of this scheme so that they are easier to keep upgraded to the newer versions of CSLA.

https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management

I realised this whilst working on the compilation error we ended up with in the Blazor sample apps. I ended up having to change version numbers in multiple places, which is no longer necessary.

Suggested Solution Upgrade each sample application separately, so that we can upgrade them one at a time. In the longer term we might decide that refactoring the samples folder makes sense to enable even simpler upgrades. However, being too aggressive may make upgrades larger, and hinder progress rather than enable it.

Further Improvement The two Blazor samples BlazorExample and BlazorServerExample share backend packages, but are separate apps. I would suggest that moving both into a Blazor subfolder, so that the Directory.Packages.props file can apply to both, would be even better; this ensures that they are more likely to both compile together. See #3204 for an example of the current problem - upgrading just one of the two sample apps breaks the other.

TheCakeMonster avatar Nov 14 '22 20:11 TheCakeMonster

@TheCakeMonster, @rockfordlhotka, do you have any opinion if it makes any sense to introduce CPM in single-project sample solutions such as DataPortalCacheExample? I ignored them for now, since for me it looks redundant... At the same time, if consistency is more important, I can come up with a single PR that introduces CPM for all the simple .net8 based solutions (for the .net8 projects there is much less work needed so a single PR should be ok).

sshushliapin avatar Jun 25 '24 16:06 sshushliapin

I don't see any value in that case, just added complexity.

rockfordlhotka avatar Jun 25 '24 18:06 rockfordlhotka