Skip to content

Commit 539d50f

Browse files
committed
build: refactor projects to use Directory.Build.props
1 parent e108e93 commit 539d50f

File tree

7 files changed

+16
-58
lines changed

7 files changed

+16
-58
lines changed

build.props renamed to Directory.Build.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
<RepositoryUrl>https://github.com/anthonyreilly/NetCoreForce</RepositoryUrl>
2020
<PackageReleaseNotes>Release notes and documentation can be found on the project site: https://github.com/anthonyreilly/NetCoreForce</PackageReleaseNotes>
2121

22+
<!-- Intentionally targeting EOL frameworks -->
23+
<CheckEolTargetFramework>false</CheckEolTargetFramework>
24+
2225
<!--Project Root-->
2326
<SolutionDir>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), *.sln))</SolutionDir>
2427
</PropertyGroup>

src/NetCoreForce.Client.Tests/NetCoreForce.Client.Tests.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.props))\build.props" />
32
<PropertyGroup>
43
<TargetFrameworks>$(TestTargetFrameworks)</TargetFrameworks>
5-
<LangVersion>$(LangVersion)</LangVersion>
64
<IsPackable>false</IsPackable>
7-
<!-- Ignore warnings about referencing obsolete methods -->
8-
<!-- <NoWarn>CS0618</NoWarn> -->
9-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
105
</PropertyGroup>
116

127
<Choose>
@@ -54,4 +49,4 @@
5449
</None>
5550
</ItemGroup>
5651

57-
</Project>
52+
</Project>

src/NetCoreForce.Client/NetCoreForce.Client.csproj

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import
3-
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.props))\build.props" />
42
<PropertyGroup>
53
<AssemblyName>NetCoreForce.Client</AssemblyName>
64
<Product>NetCoreForce.Client</Product>
75
<OutputType>Library</OutputType>
86
<TargetFrameworks>$(LibTargetFrameworks)</TargetFrameworks>
9-
<VersionPrefix>$(VersionPrefix)</VersionPrefix>
10-
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
7+
118
<!--NuGet-->
12-
<Authors>$(Authors)</Authors>
13-
<Copyright>$(Copyright)</Copyright>
149
<Description>A .NET Standard and .NET Core Salesforce REST API integration library</Description>
1510
<IsPackable>true</IsPackable>
1611
<PackageId>NetCoreForce.Client</PackageId>
17-
<PackageLicenseExpression>$(PackageLicenseExpression)</PackageLicenseExpression>
18-
<PackageProjectUrl>$(PackageProjectUrl)</PackageProjectUrl>
19-
<PackageRequireLicenseAcceptance>$(PackageRequireLicenseAcceptance)</PackageRequireLicenseAcceptance>
20-
<PackageTags>$(PackageTags)</PackageTags>
21-
<RepositoryType>$(RepositoryType)</RepositoryType>
22-
<RepositoryUrl>$(RepositoryUrl)</RepositoryUrl>
23-
<PackageReleaseNotes>$(PackageReleaseNotes)</PackageReleaseNotes>
2412
<PackageReadmeFile>README.md</PackageReadmeFile>
2513
</PropertyGroup>
2614

@@ -34,7 +22,6 @@
3422
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
3523
<!-- warning CS1591: Missing XML comment for publicly visible type or member -->
3624
<NoWarn>CS1591</NoWarn>
37-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
3825
</PropertyGroup>
3926

4027
<PropertyGroup Condition="'$(Configuration)'=='Release'">

src/NetCoreForce.FunctionalTests/NetCoreForce.FunctionalTests.csproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.props))\build.props" />
3-
<PropertyGroup>
2+
<PropertyGroup>
43
<TargetFrameworks>$(TestTargetFrameworks)</TargetFrameworks>
5-
<LangVersion>$(LangVersion)</LangVersion>
64
<IsPackable>false</IsPackable>
7-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
85
</PropertyGroup>
96

107
<Choose>
@@ -49,4 +46,4 @@
4946
</None>
5047
</ItemGroup>
5148

52-
</Project>
49+
</Project>

src/NetCoreForce.ModelGenerator/NetCoreForce.ModelGenerator.csproj

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import
3-
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.props))\build.props" />
42
<PropertyGroup>
53
<AssemblyName>dotnet-modelgenerator</AssemblyName>
64
<Product>NetCoreForce.ModelGenerator</Product>
75
<OutputType>Exe</OutputType>
86
<TargetFrameworks>$(AppTargetFrameworks)</TargetFrameworks>
9-
<VersionPrefix>$(VersionPrefix)</VersionPrefix>
10-
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
7+
118
<!--NuGet-->
12-
<Authors>$(Authors)</Authors>
13-
<Copyright>$(Copyright)</Copyright>
14-
<Description>NetCoreForce ModelGenerator tool to generate object models against a live
15-
Salesforce org.</Description>
9+
<Description>NetCoreForce ModelGenerator tool to generate object models against a live Salesforce org.</Description>
1610
<IsPackable>true</IsPackable>
1711
<PackageId>NetCoreForce.ModelGenerator</PackageId>
18-
<PackageLicenseExpression>$(PackageLicenseExpression)</PackageLicenseExpression>
19-
<PackageProjectUrl>$(PackageProjectUrl)</PackageProjectUrl>
20-
<PackageRequireLicenseAcceptance>$(PackageRequireLicenseAcceptance)</PackageRequireLicenseAcceptance>
21-
<PackageTags>$(PackageTags)</PackageTags>
22-
<RepositoryType>$(RepositoryType)</RepositoryType>
23-
<RepositoryUrl>$(RepositoryUrl)</RepositoryUrl>
24-
<PackageReleaseNotes>$(PackageReleaseNotes)</PackageReleaseNotes>
2512
<PackAsTool>true</PackAsTool>
2613
<ToolCommandName>NetCoreForce.ModelGenerator</ToolCommandName>
2714
<CheckEolTargetFramework>false</CheckEolTargetFramework>
@@ -36,12 +23,15 @@
3623
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
3724
<PackageOutputPath>$(SolutionDir)/packages</PackageOutputPath>
3825
</PropertyGroup>
26+
3927
<ItemGroup>
4028
<ProjectReference Include="..\NetCoreForce.Client\NetCoreForce.Client.csproj" />
4129
</ItemGroup>
30+
4231
<ItemGroup>
4332
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.6.0" />
4433
</ItemGroup>
34+
4535
<ItemGroup>
4636
<None Update="modelgenerator_config.json">
4737
<CopyToOutputDirectory>Always</CopyToOutputDirectory>

src/NetCoreForce.Models/NetCoreForce.Models.csproj

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import
3-
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.props))\build.props" />
42
<PropertyGroup>
53
<AssemblyName>NetCoreForce.Models</AssemblyName>
64
<Product>NetCoreForce.Models</Product>
75
<OutputType>Library</OutputType>
86
<TargetFrameworks>$(LibTargetFrameworks)</TargetFrameworks>
9-
<VersionPrefix>$(VersionPrefix)</VersionPrefix>
10-
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
7+
118
<!--NuGet-->
12-
<Authors>$(Authors)</Authors>
13-
<Copyright>$(Copyright)</Copyright>
149
<Description>NetCoreForce standard obect models package</Description>
1510
<IsPackable>true</IsPackable>
1611
<PackageId>NetCoreForce.Models</PackageId>
17-
<PackageLicenseExpression>$(PackageLicenseExpression)</PackageLicenseExpression>
18-
<PackageProjectUrl>$(PackageProjectUrl)</PackageProjectUrl>
19-
<PackageRequireLicenseAcceptance>$(PackageRequireLicenseAcceptance)</PackageRequireLicenseAcceptance>
20-
<PackageTags>$(PackageTags)</PackageTags>
21-
<RepositoryType>$(RepositoryType)</RepositoryType>
22-
<RepositoryUrl>$(RepositoryUrl)</RepositoryUrl>
23-
<PackageReleaseNotes>$(PackageReleaseNotes)</PackageReleaseNotes>
2412
<PackageReadmeFile>README.md</PackageReadmeFile>
2513
</PropertyGroup>
2614

@@ -35,12 +23,13 @@
3523
<!-- warning CS1591: Missing XML comment for publicly visible type or member -->
3624
<!-- warning CS1587: XML comment is not placed on a valid language element -->
3725
<NoWarn>CS1591,CS1587</NoWarn>
38-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
3926
</PropertyGroup>
27+
4028
<PropertyGroup Condition="'$(Configuration)'=='Release'">
4129
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
4230
<PackageOutputPath>$(SolutionDir)/packages</PackageOutputPath>
4331
</PropertyGroup>
32+
4433
<ItemGroup>
4534
<ProjectReference Include="..\NetCoreForce.Client\NetCoreForce.Client.csproj" />
4635
</ItemGroup>
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.props))\build.props" />
32
<PropertyGroup>
43
<OutputType>Exe</OutputType>
54
<TargetFrameworks>$(AppTargetFrameworks)</TargetFrameworks>
65
<IsPackable>false</IsPackable>
7-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
86
</PropertyGroup>
97

108
<ItemGroup>
119
<ProjectReference Include="..\NetCoreForce.Client\NetCoreForce.Client.csproj" />
1210
<ProjectReference Include="..\NetCoreForce.Models\NetCoreForce.Models.csproj" />
13-
</ItemGroup>
11+
</ItemGroup>
1412

1513
<ItemGroup>
1614
<None Update="credentials_dev.json">
1715
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1816
</None>
1917
</ItemGroup>
20-
2118
</Project>

0 commit comments

Comments
 (0)