Skip to content

Commit

Permalink
Updated build targets and silenced warning RCS1139
Browse files Browse the repository at this point in the history
Upgraded the `.nuproj` to ensure SDK project is packable, ensuring compatibility with modern build environments. Additionally, streamlined license file handling by incorporating `PackageLicenseFile` in `EnsureLicense.targets`. Improved maintainability by consolidating `TargetFramework` into `Directory.Build.props` to apply across all projects. Also added a new warning, RCS1139, to the `NoWarn` list to suppress related noise during build.

Resolves #42 – "Ensure SDK is packable"
Closes #55 – "Suppress additional warnings for cleaner builds"
  • Loading branch information
dgmjr committed Dec 22, 2023
1 parent afe990a commit e028a76
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 38 deletions.
3 changes: 3 additions & 0 deletions src/Build/EnsureLicense.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@
<Target Name="EnsureLicenseFileExists" BeforeTargets="Pack" Condition="!$(LicenseFileExists)">
<Copy SourceFiles="$(MSBuildThisFileDirectory)../LICENSE.md"
DestinationFolder="$(MSBuildProjectDirectory)" />
<PropertyGroup>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
</PropertyGroup>
</Target>
</Project>
2 changes: 1 addition & 1 deletion src/Build/NoWarn.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<DisableMostAnnoyingWarnings>true</DisableMostAnnoyingWarnings>
<RestoreDependsOn>$(RestoreDependsOn);NoWarn</RestoreDependsOn>
<NoWarn>$(NoWarn);CA2252;CS8335;NU1603;CS8981;NU1605;S3604;</NoWarn>
<NoWarn>$(NoWarn);CA2252;CS8335;NU1603;CS8981;NU1605;S3604;RCS1139;</NoWarn>
</PropertyGroup>
<ItemDefinitionGroup>
<NoWarn>
Expand Down
2 changes: 1 addition & 1 deletion src/DgmjrSdk.nuproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<PropertyGroup>
<ProjectGuid>EB008C4C-9C3A-4498-A19D-34A42B6E2CE1</ProjectGuid>
<ProjectTypeGuid>FAE04EC0-301F-11D3-BF4B-00C04F79EFBC</ProjectTypeGuid>
<TargetFramework>netstandard1.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IsNuGetized>true</IsNuGetized>
<IsPackable>true</IsPackable>
</PropertyGroup>
<PropertyGroup>
<Title>The DGMJR-IO SDK</Title>
Expand Down
75 changes: 39 additions & 36 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,43 @@
-->

<Project>
<!-- <Import Project="./Build/TargetFraneworks.props" /> -->
<Import Project="./Build/AIsMultiTargeting.props" />
<Import Project="./Build/AAGitRoot.props" />
<Import Project="./Build/ADefaultBuildConfiguration.props" />
<Import Project="./Build/AssemblySigning.props" />
<Import Project="./Build/Authors-Owners.props" />
<Import Project="./Build/BuildConfigurations.props" />
<Import Project="./Build/BuildFromSource.props" />
<Import Project="./Build/CentralPackages.props" />
<Import Project="./Build/CentralPackagesFile.props" />
<Import Project="./Build/CentralPackageVersions.props" />
<Import Project="./Build/CompilerVisibleProperties.props" />
<Import Project="./Build/CopyLocalLockFileAssemblies.props" />
<Import Project="./Build/CustomBeforeAndAfterNoTargets.props" />
<Import Project="./Build/Deterministic.props" />
<Import Project="./Build/EnsureLicense.props" />
<Import Project="./Build/EmbeddedResourcesStringExtensions.props" />
<Import Project="./Build/EmitNuspec.props" />
<Import Project="./Build/EnablePreviewFeatures.props" />
<Import Project="./Build/MinVer.props" />
<Import Project="./Build/NuGetizer.props" />
<Import Project="./Build/NuGetOutputs.props" />
<Import Project="./Build/PackageIcon.props" />
<Import Project="./Build/PackageMetadata.props" />
<Import Project="./Build/PackageProjectUrl.props" />
<Import Project="./Build/PackageReadme.props" />
<Import Project="./Build/PackageTags.props" />
<Import Project="./Build/PackageVersionOverride.props" />
<Import Project="./Build/ProjectMetadata.props" />
<Import Project="./Build/ProjectTypeInfo.props" />
<Import Project="./Build/SlnGen.props" />
<Import Project="./Build/SourceLinkPatch.props" />
<Import Project="./Build/TargetFrameworks.props" />
<Import Project="./Build/Testing.props" />
<Import Project="./Build/TestingLocal.props" />
<Import Project="./Build/UserSecrets.props" />
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
</PropertyGroup>
<!-- <Import Project="./Build/TargetFraneworks.props" /> -->
<Import Project="./Build/AIsMultiTargeting.props" />
<Import Project="./Build/AAGitRoot.props" />
<Import Project="./Build/ADefaultBuildConfiguration.props" />
<Import Project="./Build/AssemblySigning.props" />
<Import Project="./Build/Authors-Owners.props" />
<Import Project="./Build/BuildConfigurations.props" />
<Import Project="./Build/BuildFromSource.props" />
<Import Project="./Build/CentralPackages.props" />
<Import Project="./Build/CentralPackagesFile.props" />
<Import Project="./Build/CentralPackageVersions.props" />
<Import Project="./Build/CompilerVisibleProperties.props" />
<Import Project="./Build/CopyLocalLockFileAssemblies.props" />
<Import Project="./Build/CustomBeforeAndAfterNoTargets.props" />
<Import Project="./Build/Deterministic.props" />
<Import Project="./Build/EnsureLicense.props" />
<Import Project="./Build/EmbeddedResourcesStringExtensions.props" />
<Import Project="./Build/EmitNuspec.props" />
<Import Project="./Build/EnablePreviewFeatures.props" />
<Import Project="./Build/MinVer.props" />
<Import Project="./Build/NuGetizer.props" />
<Import Project="./Build/NuGetOutputs.props" />
<Import Project="./Build/PackageIcon.props" />
<Import Project="./Build/PackageMetadata.props" />
<Import Project="./Build/PackageProjectUrl.props" />
<Import Project="./Build/PackageReadme.props" />
<Import Project="./Build/PackageTags.props" />
<Import Project="./Build/PackageVersionOverride.props" />
<Import Project="./Build/ProjectMetadata.props" />
<Import Project="./Build/ProjectTypeInfo.props" />
<Import Project="./Build/SlnGen.props" />
<Import Project="./Build/SourceLinkPatch.props" />
<Import Project="./Build/TargetFrameworks.props" />
<Import Project="./Build/Testing.props" />
<Import Project="./Build/TestingLocal.props" />
<Import Project="./Build/UserSecrets.props" />
</Project>

0 comments on commit e028a76

Please sign in to comment.