Skip to content

Commit

Permalink
Don't depend on SolutionDir to allow Pack from project
Browse files Browse the repository at this point in the history
The SolutionDir property is only available when building from the
solution. For packing, it's actually not necessary and we could
also easily allow packing from the Moq.csproj project itself.

This change, in addition to enabling that, also makes the icon
path more flexible since it could be moved down to the src folder
(say) without requiring a change to the .csproj.
  • Loading branch information
kzu authored and stakx committed Nov 10, 2020
1 parent e1cf8ba commit 5da774c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Moq/Moq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
</ItemGroup>

<ItemGroup>
<None Include="$(SolutionDir)moq-icon.png" Pack="true" PackagePath="moq.png" Visible="False" />
<None Include="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), moq-icon.png))\moq-icon.png" Pack="true" PackagePath="moq.png" Visible="False" />
</ItemGroup>

<Target Name="Test" />
Expand Down

0 comments on commit 5da774c

Please sign in to comment.