csla
csla copied to clipboard
Update the Csla.Analyzers Project
Is your feature request related to a problem? Please describe. Not a problem.
Describe the solution you'd like There are differences with analyzer projects created now in 2021 compared to when they were done years ago when they were introduced into CSLA.
Describe alternatives you've considered If you look at the project created by the analyzer template in VS, you'll see that:
- It targets NS 2.0 now.
Csla.Analyzerstargets NS 1.3. - The .ps1 files may not be needed. I believe they were only there for VS 2015 to get analyzers installed correctly, but from VS 2017 on they're not needed. I'm looking into this to get more details.
These should be simple changes, and the analyzers currently work as expected, so IMO this is a low-priority code cleanup item.
About the .ps1 files, they're needed for projects that use packages.config. If you're using the modern SDK style for .csproj files, and you're using <PackageReference> in the file, you don't need the .ps1 files.
So...given that CSLA can still be referenced by projects that are using the old, crusty, GUID-riddled .csproj files :), we probably still need to keep them around, though we can update them with the code that's generated by the current analyzer template.
More details from someone on the Roslyn Discord server...
"Old-style projects have been able to use PackageReference instead of packages.config for a very long time now, and there are very few reasons that prevent people from moving to it even if there is a reason they can't move to SDK csproj. Compare https://github.com/microsoft/CsWin32/pull/98 to see that the .ps1 files are only relevant if you want to support packages.config. I stopped using packages.config in the Visual Studio 2015 Update 3 timeframe even though we were still forced to use legacy csproj for years after that."
So, the real question is, how many people are still using packages.config?
Analyzers already target NetStandard2.0. IMHO the install/uninstall.ps1 are not that big and many (and are still included in the actual MS Analyzer template).
Hence this issue can be closed?
@rockfordlhotka @JasonBock Bump