Skip to content

Commit

Permalink
Build system: get stuff to build (and run tests)
Browse files Browse the repository at this point in the history
Mostly updates to target newer framework, and to use newer versions of
(deprecated) libraries.
- update test to target net8.0 and net472
- leave libraries at older frameworks (because they are 'forward'
  compatible)
- use newer libraries
  - NUnint
  - Microsoft.SourceLink.GitHub
- Directory.Build.props file to sync nuget package versions for
  dotnetdbf and dotnetdbf.enumerable
- Directory.Build.target file to specify directory to which to publish
  nuget packages
  • Loading branch information
davelim committed Oct 30, 2024
1 parent 414321a commit 2f15a68
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
bin
obj
/packages
/publish

*.suo

*.user
.idea/*
.vs/*
.vs/*
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<VersionPrefix>7.0.1</VersionPrefix>
</PropertyGroup>
</Project>
8 changes: 8 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project>
<Target Name="CopyPackage" AfterTargets="Pack">
<Copy
SourceFiles="$(OutputPath)$(PackageId).$(PackageVersion).nupkg"
DestinationFolder="$(SolutionDir)\publish"
/>
</Target>
</Project>
5 changes: 2 additions & 3 deletions DotNetDBF.Enumerable/DotNetDBF.Enumerable.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Version>6.0.0.2</Version>
<IncludeSymbols>True</IncludeSymbols>
<IncludeSource>True</IncludeSource>
</PropertyGroup>
<ItemGroup>
<None Include="..\Copying.txt" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ImpromptuInterface" Version="7.0.1" />
Expand All @@ -35,4 +34,4 @@
<ProjectReference Include="..\DotNetDBF\DotNetDBF.csproj" />
</ItemGroup>

</Project>
</Project>
8 changes: 4 additions & 4 deletions DotNetDBF.Test/DotNetDBF.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net462</TargetFrameworks>
<OutputType Condition="'$(TargetFramework)'!='netcoreapp2.0'">Exe</OutputType>
<TargetFrameworks>net8.0;net472</TargetFrameworks>
<OutputType Condition="'$(TargetFramework)'=='net472'">Exe</OutputType>
<Copyright>Copyright © 2017</Copyright>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.7.1" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.8.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.*" />
</ItemGroup>
Expand Down Expand Up @@ -40,4 +40,4 @@
<EmbeddedResource Include="dbfs\dbase_8b_summary.txt" />
<EmbeddedResource Include="dbfs\dbase_f5_summary.txt" />
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion DotNetDBF.Test/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace DotNetDBF.Test
{
#if !NETCOREAPP2_0
#if NET472
public class Program
{
public static void Main()
Expand Down
3 changes: 1 addition & 2 deletions DotNetDBF/DotNetDBF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<TargetFrameworks>net35;netstandard2.0</TargetFrameworks>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>sn.snk</AssemblyOriginatorKeyFile>
<Version>7.0.0.0</Version>
<Company>Ekon Benefits</Company>
<Copyright>Copyright 2009-2017</Copyright>
<Description>This is a basic file parser for reading and writing xBase DBF files particularlly Clipper. Code originally derived from javadbf.</Description>
Expand All @@ -24,7 +23,7 @@
<None Include="..\Copying.txt" Pack="true" PackagePath=""/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 2f15a68

Please sign in to comment.