Skip to content

Commit

Permalink
Run target before BeforeCompile
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslevesque committed May 20, 2020
1 parent 0ed29a0 commit 321bf08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion InternalsVisibleTo.MSBuild.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>InternalsVisibleTo.MSBuild</id>
<version>1.0.3</version>
<version>1.0.4</version>
<description>Enables declaring 'InternalsVisibleTo' items in a .NET project file, rather than declaring them to an AssemblyInfo.cs file.</description>
<authors>Thomas Levesque</authors>
<projectUrl>https://github.com/thomaslevesque/InternalsVisibleTo.MSBuild</projectUrl>
Expand Down
4 changes: 3 additions & 1 deletion build/InternalsVisibleTo.MSBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>

<Target Name="AddInternalsVisibleTo" BeforeTargets="CoreCompile">
<Target Name="AddInternalsVisibleTo" BeforeTargets="BeforeCompile">

<ItemGroup Condition="@(InternalsVisibleTo->Count()) &gt; 0">
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>%(InternalsVisibleTo.Identity)</_Parameter1>
Expand All @@ -16,6 +17,7 @@
<_Parameter1>$(AssemblyName)%(InternalsVisibleToSuffix.Identity)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

</Target>

</Project>

0 comments on commit 321bf08

Please sign in to comment.