Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions TUnit.Assertions/TUnit.Assertions.props
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<PropertyGroup>
<XunitPackageReferenceFound>false</XunitPackageReferenceFound>
</PropertyGroup>

<Target Name="SetXunitPackageReferenceFound" BeforeTargets="PrepareForBuild">
<!-- Filter PackageReference for xunit and xunit.v3 -->
<ItemGroup>
<_XunitReference Include="@(PackageReference)"
Condition="'%(PackageReference.Identity)' == 'xunit' Or '%(PackageReference.Identity)' == 'xunit.v3'" />
</ItemGroup>
<PropertyGroup>
<XunitPackageReferenceFound Condition="'@(_XunitReference)' != ''">true</XunitPackageReferenceFound>
</PropertyGroup>
</Target>

<PropertyGroup Condition="'$(XunitPackageReferenceFound)' == 'false' And '$(TUnitAssertionsImplicitUsings)' == ''">
<PropertyGroup Condition="'$(TUnitAssertionsImplicitUsings)' == ''">
<TUnitAssertionsImplicitUsings>true</TUnitAssertionsImplicitUsings>
</PropertyGroup>

Expand Down
19 changes: 1 addition & 18 deletions TUnit.Core/TUnit.Core.props
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<PropertyGroup>
<XunitPackageReferenceFound>false</XunitPackageReferenceFound>
</PropertyGroup>

<Target Name="SetXunitPackageReferenceFound" BeforeTargets="PrepareForBuild">
<!-- Filter PackageReference for xunit and xunit.v3 -->
<ItemGroup>
<_XunitReference Include="@(PackageReference)"
Condition="'%(PackageReference.Identity)' == 'xunit' Or '%(PackageReference.Identity)' == 'xunit.v3'" />
</ItemGroup>
<PropertyGroup>
<XunitPackageReferenceFound Condition="'@(_XunitReference)' != ''">true</XunitPackageReferenceFound>
</PropertyGroup>
</Target>

<PropertyGroup Condition="'$(XunitPackageReferenceFound)' == 'false'">
<PropertyGroup Condition="'$(TUnitImplicitUsings)' == ''">
<TUnitImplicitUsings>true</TUnitImplicitUsings>
</PropertyGroup>

Expand All @@ -34,9 +19,7 @@
</Target>

<PropertyGroup>
<!-- Default to enabling polyfills for older frameworks -->
<EnableTUnitPolyfills Condition="'$(EnableTUnitPolyfills)' == '' and ('$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1' or '$(TargetFrameworkIdentifier)' == '.NETFramework')">true</EnableTUnitPolyfills>
<!-- Use embedded Polyfill attributes to prevent type conflicts across projects -->
<PolyUseEmbeddedAttribute Condition="'$(PolyUseEmbeddedAttribute)' == ''">true</PolyUseEmbeddedAttribute>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion TUnit.Core/TUnit.Core.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project>

<ItemGroup Condition="'$(TUnitImplicitUsings)' == 'true'">
Expand Down
Loading