Skip to content

Commit 44ed5d4

Browse files
authored
Merge pull request #142 from adrianiftode/fixes/fluent-assertions-web-types-still-adverstised-as-dependency
FluentAssertions.Web.Types still advertised as a nuget dependency
2 parents a0de6b4 + 7cd8247 commit 44ed5d4

10 files changed

Lines changed: 67 additions & 10 deletions

File tree

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ after_test:
6262
# will fail when the test coverage is lower than the threshold
6363
- minicover report --threshold 95
6464
- ps: 'if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { & dotnet sonarscanner end /d:sonar.login="$env:SONAR_TOKEN" }'
65-
- dotnet pack --no-build --include-symbols -c %CONFIGURATION% /p:PackageVersion=%APPVEYOR_BUILD_VERSION%
65+
- dotnet pack --include-symbols -c %CONFIGURATION% /p:PackageVersion=%APPVEYOR_BUILD_VERSION%
6666

6767
artifacts:
6868
- path: '**\*.nupkg'

src/FluentAssertions.Web.Serializers.NewtonsoftJson/FluentAssertions.Web.Serializers.NewtonsoftJson.csproj

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,26 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<ProjectReference Include="..\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" />
15-
<None Include="bin\Release\netstandard2.0\FluentAssertions.Web.Types.dll" Pack="true" PackagePath="lib\netstandard2.0" />
16-
<None Include="bin\Release\netstandard2.0\FluentAssertions.Web.Types.xml" Pack="true" PackagePath="lib\netstandard2.0" />
14+
<ProjectReference Include="..\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" PrivateAssets="all" />
1715
</ItemGroup>
1816

17+
<PropertyGroup>
18+
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
19+
</PropertyGroup>
20+
21+
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="BuildOnlySettings;ResolveReferences">
22+
<ItemGroup>
23+
<!-- Filter out unnecessary files -->
24+
<_ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('PrivateAssets', 'all'))"/>
25+
</ItemGroup>
26+
27+
<!-- Print batches for debug purposes -->
28+
<Message Text="Batch for .nupkg: ReferenceCopyLocalPaths = @(_ReferenceCopyLocalPaths), ReferenceCopyLocalPaths.DestinationSubDirectory = %(_ReferenceCopyLocalPaths.DestinationSubDirectory) Filename = %(_ReferenceCopyLocalPaths.Filename) Extension = %(_ReferenceCopyLocalPaths.Extension)" Importance="High" Condition="'@(_ReferenceCopyLocalPaths)' != ''" />
29+
30+
<ItemGroup>
31+
<!-- Add file to package with consideration of sub folder. If empty, the root folder is chosen. -->
32+
<BuildOutputInPackage Include="@(_ReferenceCopyLocalPaths)" TargetPath="%(_ReferenceCopyLocalPaths.DestinationSubDirectory)"/>
33+
</ItemGroup>
34+
</Target>
35+
1936
</Project>

src/FluentAssertions.Web.v8/FluentAssertions.Web.v8.csproj

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
</ItemGroup>
2121

2222
<ItemGroup>
23-
<ProjectReference Include="..\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" />
24-
<None Include="bin\Release\netstandard2.0\FluentAssertions.Web.Types.dll" Pack="true" PackagePath="lib\netstandard2.0" />
25-
<None Include="bin\Release\netstandard2.0\FluentAssertions.Web.Types.xml" Pack="true" PackagePath="lib\netstandard2.0" />
23+
<ProjectReference Include="..\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" PrivateAssets="all" />
2624
</ItemGroup>
2725

2826
<ItemGroup>
@@ -36,4 +34,23 @@
3634
</Compile>
3735
</ItemGroup>
3836

37+
<PropertyGroup>
38+
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
39+
</PropertyGroup>
40+
41+
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="BuildOnlySettings;ResolveReferences">
42+
<ItemGroup>
43+
<!-- Filter out unnecessary files -->
44+
<_ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths-&gt;WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')-&gt;WithMetadataValue('PrivateAssets', 'all'))" />
45+
</ItemGroup>
46+
47+
<!-- Print batches for debug purposes -->
48+
<Message Text="Batch for .nupkg: ReferenceCopyLocalPaths = @(_ReferenceCopyLocalPaths), ReferenceCopyLocalPaths.DestinationSubDirectory = %(_ReferenceCopyLocalPaths.DestinationSubDirectory) Filename = %(_ReferenceCopyLocalPaths.Filename) Extension = %(_ReferenceCopyLocalPaths.Extension)" Importance="High" Condition="'@(_ReferenceCopyLocalPaths)' != ''" />
49+
50+
<ItemGroup>
51+
<!-- Add file to package with consideration of sub folder. If empty, the root folder is chosen. -->
52+
<BuildOutputInPackage Include="@(_ReferenceCopyLocalPaths)" TargetPath="%(_ReferenceCopyLocalPaths.DestinationSubDirectory)" />
53+
</ItemGroup>
54+
</Target>
55+
3956
</Project>

src/FluentAssertions.Web/FluentAssertions.Web.csproj

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,29 @@
1515
</ItemGroup>
1616

1717
<ItemGroup>
18-
<ProjectReference Include="..\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" />
19-
<None Include="bin\Release\netstandard2.0\FluentAssertions.Web.Types.dll" Pack="true" PackagePath="lib\netstandard2.0" />
20-
<None Include="bin\Release\netstandard2.0\FluentAssertions.Web.Types.xml" Pack="true" PackagePath="lib\netstandard2.0" />
18+
<ProjectReference Include="..\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" PrivateAssets="all" />
2119
</ItemGroup>
20+
2221
<ItemGroup>
2322
<None Include="../../readme.md" Pack="true" PackagePath="\"/>
2423
</ItemGroup>
24+
<PropertyGroup>
25+
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
26+
</PropertyGroup>
27+
28+
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="BuildOnlySettings;ResolveReferences">
29+
<ItemGroup>
30+
<!-- Filter out unnecessary files -->
31+
<_ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('PrivateAssets', 'all'))"/>
32+
</ItemGroup>
33+
34+
<!-- Print batches for debug purposes -->
35+
<Message Text="Batch for .nupkg: ReferenceCopyLocalPaths = @(_ReferenceCopyLocalPaths), ReferenceCopyLocalPaths.DestinationSubDirectory = %(_ReferenceCopyLocalPaths.DestinationSubDirectory) Filename = %(_ReferenceCopyLocalPaths.Filename) Extension = %(_ReferenceCopyLocalPaths.Extension)" Importance="High" Condition="'@(_ReferenceCopyLocalPaths)' != ''" />
36+
37+
<ItemGroup>
38+
<!-- Add file to package with consideration of sub folder. If empty, the root folder is chosen. -->
39+
<BuildOutputInPackage Include="@(_ReferenceCopyLocalPaths)" TargetPath="%(_ReferenceCopyLocalPaths.DestinationSubDirectory)"/>
40+
</ItemGroup>
41+
</Target>
2542

2643
</Project>

test/FluentAssertions.Web.FluentAssertionsWebConfig.Tests/FluentAssertions.Web.FluentAssertionsWebConfig.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
</ItemGroup>
66

77
<ItemGroup>
8+
<ProjectReference Include="..\..\src\FluentAssertions.Web\FluentAssertions.Web.csproj" />
89
<ProjectReference Include="..\..\src\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" />
910
<ProjectReference Include="..\..\src\FluentAssertions.Web.Serializers.NewtonsoftJson\FluentAssertions.Web.Serializers.NewtonsoftJson.csproj" />
1011
</ItemGroup>

test/FluentAssertions.Web.Serializers.NewtonsoftJson.Tests/FluentAssertions.Web.Serializers.NewtonsoftJson.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
<ItemGroup>
88
<ProjectReference Include="..\..\src\FluentAssertions.Web\FluentAssertions.Web.csproj" />
9+
<ProjectReference Include="..\..\src\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" />
910
<ProjectReference Include="..\..\src\FluentAssertions.Web.Serializers.NewtonsoftJson\FluentAssertions.Web.Serializers.NewtonsoftJson.csproj" />
1011
</ItemGroup>
1112

test/FluentAssertions.Web.Tests/FluentAssertions.Web.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<ItemGroup>
88
<ProjectReference Include="..\..\src\FluentAssertions.Web.Serializers.NewtonsoftJson\FluentAssertions.Web.Serializers.NewtonsoftJson.csproj" />
99
<ProjectReference Include="..\..\src\FluentAssertions.Web\FluentAssertions.Web.csproj" />
10+
<ProjectReference Include="..\..\src\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" />
1011
</ItemGroup>
1112

1213
</Project>

test/FluentAssertions.Web.v8.Tests/FluentAssertions.Web.v8.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<ItemGroup>
1212
<ProjectReference Include="..\..\src\FluentAssertions.Web.Serializers.NewtonsoftJson\FluentAssertions.Web.Serializers.NewtonsoftJson.csproj" />
1313
<ProjectReference Include="..\..\src\FluentAssertions.Web.v8\FluentAssertions.Web.v8.csproj" />
14+
<ProjectReference Include="..\..\src\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" />
1415
</ItemGroup>
1516

1617
<ItemGroup>

test/Sample.Api.Tests/Sample.Api.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
<ItemGroup>
1818
<ProjectReference Include="..\..\src\FluentAssertions.Web\FluentAssertions.Web.csproj" />
19+
<ProjectReference Include="..\..\src\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" />
1920
</ItemGroup>
2021

2122
</Project>

test/Sample.Api.v8.Tests/Sample.Api.v8.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
<ItemGroup>
2323
<ProjectReference Include="..\..\src\FluentAssertions.Web.v8\FluentAssertions.Web.v8.csproj" />
24+
<ProjectReference Include="..\..\src\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" />
2425
</ItemGroup>
2526

2627
<ItemGroup>

0 commit comments

Comments
 (0)