Skip to content

Instantly share code, notes, and snippets.

@ap0llo
Last active August 12, 2019 17:05
Show Gist options
  • Save ap0llo/197efbd6d630e56b323718b29512730f to your computer and use it in GitHub Desktop.
Save ap0llo/197efbd6d630e56b323718b29512730f to your computer and use it in GitHub Desktop.
Repro - OpenCover Issue #910
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>Project_with_manual_Import</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OpenCover" Version="4.7.922" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Import Project="$(NuGetPackageRoot)\OpenCover\4.7.922\MSBuild\OpenCover.targets" />
<Target Name="Build">
<Message Text="OpenCover task is available" Condition=" '$(OpenCoverMSBuildTasksLib)'!= ''" Importance="high" />
<Error Text="OpenCover task is not available" Condition=" '$(OpenCoverMSBuildTasksLib)' == ''" />
</Target>
</Project>
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>Project_without_manual_Import</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OpenCover" Version="4.7.922" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Target Name="Build">
<Message Text="OpenCover task is available" Condition=" '$(OpenCoverMSBuildTasksLib)'!= ''" Importance="high" />
<Error Text="OpenCover task is not available" Condition=" '$(OpenCoverMSBuildTasksLib)' == ''" />
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment