After reviewing the current state of the solution I have come up with some suggested changes to the project files and how the NuGet packages are created to streamline and simplify package publishing.
Currently, my proposals are as follows:
[x] Replace netcoreapp2.0 with a modern framework moniker. This applies to Mapster.Async.Tests, Mapster.JsonNet.Tests and Mapster.DependencyInjection.Tests. netcoreapp2.0 is EOL and updating this moniker will reduce the amount of warnings generated when building the solution.
[x] Remove targeting of net45 and net40. These frameworks are EOL and support from Microsoft ends on April 26 2022 (source). These monikers also prevents building the solution with Visual Studio 2022.
[x] Upgrade LangVersion from 8.0 to 10
[x] Add Directory.Build.Props in /src (and possibly in some subfolders) which will contain common properties across project files.
[x] Clean up the project files and remove duplicated properties that can be consolidated in Directory.Build.Props files.
[x] Discard the old pack/publish scripts that rely on psake (currently residing in /deployment).
[x] Add <IsPackable>true|false</IsPackable> to the project files to indicate which projects should be packaged.
[x] Create a simple Pack.bat file which calls dotnet pack on the solution and consequently creates the NuGet packages in a common folder. Only projects with the IsPackable flag set to true will be packaged.
[x] Create a simple Publish.bat script that takes a Nuget.org API key as input and enumerates and publishes package files from the above mentioned package folder
[x] Add support for snupkg if possible using -p:IncludeSymbols=true and -p:SymbolPackageFormat=snupkg when calling dotnet pack. This will help some users when debugging mapping problems.
I'm keen to know your opinion on these changes and whether they could be improved or for other reasons discarded. I will have a pull request ready with the proposed changes in a short while which should help further the discussion.
Edit 15.02.2022 22:28: Added proposal to remove net45 and net40.Edit 19.02.2022 12:15: Added proposal to upgrade LangVersion from 8.0 to 10.
After reviewing the current state of the solution I have come up with some suggested changes to the project files and how the NuGet packages are created to streamline and simplify package publishing.
Currently, my proposals are as follows:
netcoreapp2.0
with a modern framework moniker. This applies to Mapster.Async.Tests, Mapster.JsonNet.Tests and Mapster.DependencyInjection.Tests.netcoreapp2.0
is EOL and updating this moniker will reduce the amount of warnings generated when building the solution.Directory.Build.Props
in /src (and possibly in some subfolders) which will contain common properties across project files.Directory.Build.Props
files.<IsPackable>true|false</IsPackable>
to the project files to indicate which projects should be packaged.dotnet pack
on the solution and consequently creates the NuGet packages in a common folder. Only projects with theIsPackable
flag set to true will be packaged.-p:IncludeSymbols=true
and-p:SymbolPackageFormat=snupkg
when callingdotnet pack
. This will help some users when debugging mapping problems.I'm keen to know your opinion on these changes and whether they could be improved or for other reasons discarded. I will have a pull request ready with the proposed changes in a short while which should help further the discussion.
Edit 15.02.2022 22:28: Added proposal to remove net45 and net40. Edit 19.02.2022 12:15: Added proposal to upgrade LangVersion from 8.0 to 10.