Skip to content

Commit

Permalink
Merge pull request #56 from marcominerva/develop
Browse files Browse the repository at this point in the history
Update .csproj files for packaging and build improvements
  • Loading branch information
marcominerva authored Sep 23, 2024
2 parents 3386ec8 + 56fbcfe commit feff0bb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/marcominerva/MinimalHelpers.git</RepositoryUrl>
<RepositoryBranch>master</RepositoryBranch>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);IncludeProjectReferenceDlls</TargetsForTfmSpecificBuildOutput>
<NoWarn>$(NoWarn);NU5131</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand All @@ -42,6 +44,17 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MinimalHelpers.Validation.Abstractions\MinimalHelpers.Validation.Abstractions.csproj" />
<ProjectReference Include="..\MinimalHelpers.Validation.Abstractions\MinimalHelpers.Validation.Abstractions.csproj" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<!-- Add a ref folder to the package which only exposes the library so that the referenced class library doesn't get exposed. -->
<None Include="$(TargetPath)" PackagePath="ref/$(TargetFramework)" Pack="true" Condition="'$(TargetFramework)' != ''" />
</ItemGroup>

<Target Name="IncludeProjectReferenceDlls" DependsOnTargets="BuildOnlySettings;ResolveReferences">
<ItemGroup>
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('PrivateAssets', 'All'))"/>
</ItemGroup>
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/marcominerva/MinimalHelpers.git</RepositoryUrl>
<RepositoryBranch>master</RepositoryBranch>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
Expand Down
17 changes: 15 additions & 2 deletions src/MinimalHelpers.Validation/MinimalHelpers.Validation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/marcominerva/MinimalHelpers.git</RepositoryUrl>
<RepositoryBranch>master</RepositoryBranch>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);IncludeProjectReferenceDlls</TargetsForTfmSpecificBuildOutput>
<NoWarn>$(NoWarn);NU5131</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand All @@ -42,6 +44,17 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MinimalHelpers.Validation.Abstractions\MinimalHelpers.Validation.Abstractions.csproj" />
<ProjectReference Include="..\MinimalHelpers.Validation.Abstractions\MinimalHelpers.Validation.Abstractions.csproj" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<!-- Add a ref folder to the package which only exposes the library so that the referenced class library doesn't get exposed. -->
<None Include="$(TargetPath)" PackagePath="ref/$(TargetFramework)" Pack="true" Condition="'$(TargetFramework)' != ''" />
</ItemGroup>

<Target Name="IncludeProjectReferenceDlls" DependsOnTargets="BuildOnlySettings;ResolveReferences">
<ItemGroup>
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('PrivateAssets', 'All'))"/>
</ItemGroup>
</Target>
</Project>

0 comments on commit feff0bb

Please sign in to comment.