Skip to content

Commit b4e8230

Browse files
Fix MSB4186 error
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.
1 parent 4d695c3 commit b4e8230

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</Target>
3030

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

0 commit comments

Comments
 (0)