...
Things to look for during dev review:
- TargetFramework set to - net48
- LangVersion set to - 7.3
- NoWarn set to - 1591,1587
- RootPath - depends on csproj and sln location
- AssemblySearchPaths - includes RootPath/3rdParty
- OutputPath set to - RootPath/Output
- AssemblyTitle set to - 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
...
Expand |
---|
|
Code Block |
---|
language | xml |
---|
linenumbers | true |
---|
| <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<LangVersion>7.3</LangVersion>
<NoWarn>1591,1587</NoWarn>
<RootPath>$(MSBuildThisFileDirectory)..\..\</RootPath>
<AssemblySearchPaths>$(RootPath)3rdParty;$(AssemblySearchPaths);</AssemblySearchPaths>
<OutputPath>$(RootPath)Output</OutputPath>
<AssemblyTitle>TIME.RainfallRunoff</AssemblyTitle>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<FileAlignment>4096</FileAlignment>
<NoWarn>1591,1587</NoWarn>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<OutputPath>$(RootPath)Output</OutputPath>
<BaseAddress>285212672</BaseAddress>
</PropertyGroup>
<Import Project="$(RootPath)TIME\Solutions\IncludeGlobalAssembly.targets" />
<Import Project="$(RootPath)RiverSystem\Solutions\NormalisePdbBuildRoot.targets" />
<ItemGroup>
<Reference Include="Microsoft.Practices.EnterpriseLibrary.Validation">
<Private>True</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations">
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TIME\TIME.csproj" />
<ProjectReference Include="..\TIME.Tools\TIME.Tools.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="AWRA\AWRA.cd" />
</ItemGroup>
</Project> |
|
Conversion process:
The conversion is made far easier using:
- Easiest way to install this is via dotnet cli tooling:
- dotnet tool install -g Project2015To2017.Migrate2017.Tool\
- Then to run the conversion:
- dotnet migrate-2017 wizard old-output-path C:\src\rm3\riversystem\Solutions\<solution>.sln
- Tidy up using regex:
<ReferencePath>$(RootPath)3rdParty</ReferencePath> → <AssemblySearchPaths>$(RootPath)3rdParty;$(AssemblySearchPaths);</AssemblySearchPaths>
- Update to using correct ImportProjects (e.g. use the new imports from TIME rather than riversystem since they work with the new sdk format)