...
- TargetFramework - net48
- LangVersion - 7.3
- NoWarn - 1591,1587
- RootPath - depends on csproj and sln location
- AssemblySearchPaths - includes RootPath/3rdParty
- OutputPath - RootPath/Output
- AssemblyTitle - csproj file name
- <Import Project="$(RootPath)TIME\Solutions\IncludeGlobalAssembly.targets" /> is set
- <Import Project="$(RootPath)RiverSystem\Solutions\NormalisePdbBuildRoot.targets" /> is set
- Project References are set using <ProjectReference Include="..\TIME\TIME.csproj" />
- dll references are set with
- private = false
- specific version = false
Notes:
<Import Project="$(RootPath)TIME\Solutions\IncludeGlobalAssembly.targets" />
to set the global assembly - no AssemblyInfo.cs is required anymore - these properties are set in the csproj file.<Import Project="$(RootPath)RiverSystem\Solutions\NormalisePdbBuildRoot.targets" />
to configure the normalization of pdbs- CopyReferences are done via the Directory.Build.targets (currently lives in time)
- AppendTargetFrameworkToOutputPath, AppendRuntimeIdentifierToOutputPath and WarningsAsErrors are set by Directory.Build.props
- this is to stop the /win/x64 folders from being generated
- Copy 3rdParty to output is done via the Directory.Build.targets
- this is done since the Choose/When directives don't seem to work when running the builds via cake/msbuild (they work ok with visual studio 2017/2019)
- Compile Remove="file.cs" should be deleted and the "file.cs" should be deleted from the git repo as well.
- For projects containing WPF or WinForms the SDK should be changed SDK make the the following changes:
- Change the SDK from "
Microsoft.NET.Sdk
" to "MSBuild.Sdk.Extras/1.6.68
" (from https://www.nuget.org/packages/MSBuild.Sdk.Extras)
- Add
- For WPF add
<ExtrasEnableWpfProjectSetup>true</ExtrasEnableWpfProjectSetup>
for WPF - Add <ExtrasEnableWinFormsProjectSetup>true</ExtrasEnableWinFormsProjectSetup> for WinForms
- EmbeddedResource to the
PropertyGroup
- For WinForms add
<ExtrasEnableWinFormsProjectSetup>true</ExtrasEnableWinFormsProjectSetup>
to thePropertyGroup
- Remove
EmbeddedResource
entreies for ".resx" files and the associatedCompile
of ".designer.resx" files should be removed - Remove
Compile
entries of ".cs"UserControl
,Form
andComponent
files and associated ".designer.cs" files should be removed - Remove
Compile
entries of ".xaml.cs" files and associated ".xaml"Page
should be removed files
- Change the SDK from "
Add entries using wildcards for resources if they exist similar to the following:
Code Block language xml <ItemGroup> <EmbeddedResource Include="Persistence\Mappings\*.hbm.xml" /> <EmbeddedResource Include="Persistence\SchemaUpgrades\*.sql" /> <Resource Include="Resources\**\*"> <Pack>True</Pack> </Resource> </ItemGroup>
- Remove individual entries for resources
...