Skip to content

Commit

Permalink
[MVC] Fix MSB4186 error (#31066)
Browse files Browse the repository at this point in the history
Fix MSB4186 error if a project references Microsoft.AspNetCore.Mvc.Testing that is not itself an ASP.NET project, such as a helper library in a test suite.
  • Loading branch information
martincostello authored Apr 6, 2021
1 parent 2dced01 commit 3143d95
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</Target>

<Target Name="_AddContentRootForProjectReferences" BeforeTargets="PrepareResources" DependsOnTargets="_ResolveMvcTestProjectReferences">
<ItemGroup>
<ItemGroup Condition="'@(_ContentRootProjectReferences->Count())' != 0">
<_ManifestProjects Include="%(_ContentRootProjectReferences.FusionName)">
<ContentRoot>$([System.IO.Path]::GetDirectoryName(%(_ContentRootProjectReferences.MSBuildSourceProjectFile)))</ContentRoot>
</_ManifestProjects>
Expand Down

0 comments on commit 3143d95

Please sign in to comment.