Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleNew csproj example
Code Block
languagexml
linenumberstrue
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <AssemblyTitle>TIME.RainfallRunoff</AssemblyTitle>
    <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)RiverSystem\Solutions\SDK.build.props" />
  <Import Project="$(RootPath)RiverSystem\Solutions\SDKIncludeGlobalAssembly.targets" />
  <Import Project="$(RootPath)RiverSystem\Solutions\SDK.build.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>

...

  1. Easiest way to install this is via dotnet cli tooling:
    1. dotnet tool install -g Project2015To2017.Migrate2019.Tool\
  2. Then to run the conversion:
    1. dotnet migrate-2019 wizard old-output-path  C:\src\rm3\riversystem\Solutions\<solution>.sln
  3. Tidy up using regex:
    1.  <ReferencePath>$(RootPath)3rdParty</ReferencePath><AssemblySearchPaths>$(RootPath)3rdParty;$(AssemblySearchPaths);</AssemblySearchPaths>

  4. Make additional changes as outlined in Notes above.
  5. Remove duplicate entries which are often added by removing and collapsing the Release and Debug sections.
  6. Remove old junk which isn't needed anymore.

...