-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
I'm starting on writing some conventions and wanted to share some thoughts
Description
In our team we have conventions on how to configure csproj files, described below
Global section
Property | Value |
---|---|
Platform | AnyCPU |
Debug configuration sections
Property | Value |
---|---|
DebugType | Full |
Prefer32bit | false |
Optimize | false |
TreatWarningsAsErrors | true |
Platform | Can't be specified (must only appear in global) |
Release configuration sections
Property | Value |
---|---|
DebugType | pdbonly |
Prefer32bit | false |
Optimize | true |
TreatWarningsAsErrors | true |
Platform | Can't be specified (must only appear in global) |
I started to create implementations of IConvention<ProjectFileItems>
to cover these scenarios.
ReleaseConfigurationDebugTypeIsPdbOnly
AllConfigurationsPrefer32bitIsFalse
ReleaseConfigurationOptimizeIsFalse
- ....
DebugConfigurationDebugTypeIsFull
But this would lead to a lot of types and boiler plate, so I'm thinking of going with 1 types to cover configuration:
ConfigurationHasSpecificValue(ConfigurationType.Release, "Optimize", "true")
ConfigurationHasSpecificValue(ConfigurationType.All, "Platform", "AnyCPU")
ConfigurationHasSpecificValue(ConfigurationType.Debug, "Optimize", "false")
Metadata
Metadata
Assignees
Labels
No labels