Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up.NET Core 3.0, csprojs cleanup, add generic setup #69
Conversation
How does this compare to my branch? https://github.com/ardalis/CleanArchitecture/tree/ardalis/net30update Now that 3.0 is RTM, I suppose it makes sense to have master default to it, and to just tag 2.2 for those who will still want to use that. I could probably create a 2.2 Release as well. I just don't want to force all users to have to use 3.0 if they can't upgrade yet. |
Answering your question. In ~80% this same code if we're speaking about migration from 2.2 to 3.0.
and
Everything else it's only cleanup of references and targets. Projects have minimum information about custom deploy settings. Good point, additional branch as 2.2 before migration to keep two versions until 3.1 LTS. |
<OutputType>Exe</OutputType> | ||
<PackageId>CleanArchitecture.Web</PackageId> | ||
<WebProjectMode>true</WebProjectMode> |
Xeinaemm
Oct 4, 2019
Author
Contributor
Custom flag. Common setup for the web can be shared and by enabling flag we don't need to copy-paste configuration in each project. This setup can be found here:
CleanArchitecture/Directory.Build.props
Lines 31 to 44 in f97e336
This same approach for tests:
setup:
CleanArchitecture/Packages.props
Lines 22 to 32 in f97e336
and
CleanArchitecture/Directory.Build.props
Lines 46 to 48 in f97e336
Xeinaemm
Oct 4, 2019
•
Author
Contributor
This approach gives predictable results because scripts, custom setups are defined inside a shared solution so the configuration of the additional projects is dynamic and simple in most cases - we know what we want from tests, web, libraries.
Changesets:
Directory.Build.Targets manage targets that's we want to define inside csproj's.
Directory.Build.props manage common properties that can be shared across projects.
Packages.props defines a list of packages and it's versions - version changed inside this file will change all references. You cannot add package inside a project without definition in Packages.props.
This change introduces the deterministic approach to build applications. Projects should be clean, stupid. More generic abstractions like solutions or build system should know how to deploy a project.
Everything base on the project Jarvis. This approach working at my client's systems that deploying more than 50 systems parallelly. Azure DevOps invoke orchestrator(Cake) that know how to deploy systems.
In DeploymentSettings.props I added an example of custom flag DeployNugetPackages that deploy packages automatically into the local repository(C:\NugetSource - windows based directory) that use nuget.config. I turned off this approach at this moment because NuGet is greedy and without valid source will fail(no folder, Linux, etc.). This approach gives the fast development of packages because they are available after the build.
I wanted to split web with infrastructure and core because it's possible with this approach and will give deterministic result but we are using DTOs inside web so I abandoned this approach at this moment.