Versions Compared

Key

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

...

  • <Import Project="$(RootPath)TIME\Solutions\IncludeGlobalAssembly.targets" /> to set the global assembly
  • <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 and AppendRuntimeIdentifierToOutputPath are set by Directory.Build.props
  • Compile Remove="xxxxxxxfile.cs" should be deleted and the "file.cs" should be deleted from the git repo as well.


Example:

Expand
titleNew csproj example
Code Block
languagexml
linenumberstrue
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <StartupObject />
    <LangVersion>7.3</LangVersion>
    <NoWarn>1591,1587</NoWarn>
    <RootPath>$(MSBuildThisFileDirectory)..\..\</RootPath>
    <AssemblyTitle>TIME</AssemblyTitle>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <RemoveIntegerChecks>false</RemoveIntegerChecks>
    <FileAlignment>4096</FileAlignment>
    <NoWarn>1591,1587</NoWarn>
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
    <BaseAddress>285212672</BaseAddress>
    <TargetFramework>net48</TargetFramework>
    <OutputPath>$(RootPath)Output</OutputPath>
    <AssemblySearchPaths>$(RootPath)3rdParty;$(AssemblySearchPaths);</AssemblySearchPaths>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.CSharp" Version="4.*" />
    <PackageReference Include="System.IO.Compression" Version="4.*" />
  </ItemGroup>
  <ItemGroup>
    <Reference Include="CsvHelper">
      <Private>True</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="gdal_csharp">
      <Private>True</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="LZ4">
      <Private>True</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="MathNet.Numerics">
      <Private>True</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="Microsoft.Office.Interop.Excel">
      <Private>True</Private>
      <SpecificVersion>False</SpecificVersion>
      <EmbedInteropTypes>True</EmbedInteropTypes>
    </Reference>
    <Reference Include="Microsoft.Practices.EnterpriseLibrary.Common">
      <Private>True</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="Microsoft.Practices.EnterpriseLibrary.Validation">
      <Private>True</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="Newtonsoft.Json">
      <Private>True</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="ogr_csharp">
      <Private>True</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="PresentationCore">
      <Private>False</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="System.Reactive">
      <Private>True</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="System.Runtime.Serialization.Formatters.Soap">
      <Private>False</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <ProjectReference Include="..\TIME.NetCDF\TIME.NetCDF.csproj" />
    <Reference Include="PresentationFramework">
      <Private>False</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="System.ComponentModel.DataAnnotations">
      <Private>False</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="System.Windows.Forms">
      <Private>False</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="System.Xaml">
      <Private>False</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="WindowsBase">
      <Private>False</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
    <Reference Include="SciChart.Charting">
      <Private>True</Private>
      <SpecificVersion>False</SpecificVersion>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Update="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <Compile Update="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
      <DesignTime>True</DesignTime>
    </Compile>
    <None Include="key.snk" />
    <None Include="Properties\Settings.settings">
    <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
    <Compile Update="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
    <None Include="Science\Statistics\ClassDiagram.cd" />
  </ItemGroup>
  <ItemGroup>
    <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Resources\FinderBlackList.txt" />
  </ItemGroup>
  <ItemGroup>
    <Compile Remove="ManagedExtensions\IListExtensions.cs" />
    <Compile Remove="Management\LegacyFinder.cs" />
    <Compile Remove="DataTypes\IO\CSVFileIO.cs" />
    <Compile Remove="Wetlands\Solver\Cluster.cs" />
    <Compile Remove="Wetlands\Solver\MultiSolutionCluster.cs" />
    <Compile Remove="Wetlands\Solver\SolutionCluster.cs" />
    <Compile Remove="Wetlands\Solver\SolutionClusterLogger.cs" />
    <Compile Remove="Wetlands\Solver\SolutionClusterPrinter.cs" />
    <Compile Remove="Wetlands\Solver\TestCases.cs" />
    <Compile Remove="Wetlands\Solver\TestCluster.cs" />
    <Compile Remove="Wetlands\Solver\TestInternalHalving.cs" />
  </ItemGroup>
  <Import Project="$(RootPath)TIME\Solutions\IncludeGlobalAssembly.targets" />
  <Import Project="$(RootPath)RiverSystem\Solutions\NormalisePdbBuildRoot.targets" />
  <Target Name="CopyRootContent" AfterTargets="AfterBuild">
    <Copy DestinationFolder="$(OutputPath)" SourceFiles="@(RootContent)" SkipUnchangedFiles="true" />
  </Target>
</Project>

...