Skip to content

Commit

Permalink
Stop verify.xunit.props from interfering with verify.props (#1252)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Jul 23, 2024
1 parent eead6f8 commit ec8f6a0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<NoWarn>CS1591;CS0649;xUnit1026;xUnit1013;CS1573;VerifyTestsProjectDir;VerifySetParameters;PolyFillTargetsForNuget</NoWarn>
<Version>26.0.0</Version>
<Version>26.0.1</Version>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>preview</LangVersion>
<AssemblyVersion>1.0.0</AssemblyVersion>
Expand Down
10 changes: 5 additions & 5 deletions src/Verify.Xunit/buildTransitive/Verify.Xunit.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
Inputs="$(MSBuildAllProjects)"
Outputs="$(IntermediateOutputPath)$(VerifyXunitAttributesFile)">
<PropertyGroup>
<AttributesFilePath>$(IntermediateOutputPath)$(VerifyXunitAttributesFile)</AttributesFilePath>
<VerifyXunitAttributesFilePath>$(IntermediateOutputPath)$(VerifyXunitAttributesFile)</VerifyXunitAttributesFilePath>
</PropertyGroup>
<ItemGroup>
<Attributes Include="VerifyXunit.UseVerifyAttribute" />
<VerifyXunitAttributes Include="VerifyXunit.UseVerifyAttribute" />
<!-- Ensure not part of Compile, as a workaround for https://github.com/dotnet/sdk/issues/114 -->
<Compile Remove="$(AttributesFilePath)" />
<Compile Remove="$(VerifyXunitAttributesFilePath)" />
</ItemGroup>
<WriteCodeFragment AssemblyAttributes="@(Attributes)"
<WriteCodeFragment AssemblyAttributes="@(VerifyXunitAttributes)"
Language="$(Language)"
OutputFile="$(AttributesFilePath)">
OutputFile="$(VerifyXunitAttributesFilePath)">
<Output TaskParameter="OutputFile" ItemName="Compile" Condition="$(Language) != 'F#'" />
<Output TaskParameter="OutputFile" ItemName="CompileBefore" Condition="$(Language) == 'F#'" />
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
Expand Down
24 changes: 12 additions & 12 deletions src/Verify/buildTransitive/Verify.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@
<PropertyGroup>
<Deterministic>false</Deterministic>
<DeterministicSourcePaths>false</DeterministicSourcePaths>
<AttributesFile>Verify.Attributes$(MSBuildProjectExtension.Replace('proj', ''))</AttributesFile>
<VerifyAttributesFile>Verify.Attributes$(MSBuildProjectExtension.Replace('proj', ''))</VerifyAttributesFile>
<NoWarn>$(NoWarn);CA2255</NoWarn>
</PropertyGroup>
<Target Name="WriteVerifyAttributes"
Condition="$(Language) == 'VB' or $(Language) == 'C#' or $(Language) == 'F#'"
BeforeTargets="BeforeCompile;CoreCompile"
Inputs="$(MSBuildAllProjects)"
Outputs="$(IntermediateOutputPath)$(AttributesFile)">
Outputs="$(IntermediateOutputPath)$(VerifyAttributesFile)">
<PropertyGroup>
<AttributesFilePath>$(IntermediateOutputPath)$(AttributesFile)</AttributesFilePath>
<VerifyAttributesFilePath>$(IntermediateOutputPath)$(VerifyAttributesFile)</VerifyAttributesFilePath>
</PropertyGroup>
<ItemGroup>
<Attributes Include="System.Reflection.AssemblyMetadata">
<VerifyAttributes Include="System.Reflection.AssemblyMetadata">
<_Parameter1>Verify.TargetFrameworks</_Parameter1>
<_Parameter2>$(TargetFrameworks)</_Parameter2>
</Attributes>
<Attributes Include="System.Reflection.AssemblyMetadata">
</VerifyAttributes>
<VerifyAttributes Include="System.Reflection.AssemblyMetadata">
<_Parameter1>Verify.ProjectDirectory</_Parameter1>
<_Parameter2>$(ProjectDir)</_Parameter2>
</Attributes>
<Attributes Include="System.Reflection.AssemblyMetadata"
</VerifyAttributes>
<VerifyAttributes Include="System.Reflection.AssemblyMetadata"
Condition="'$(SolutionDir)' != '' And '$(SolutionDir)' != '*Undefined*'">
<_Parameter1>Verify.SolutionDirectory</_Parameter1>
<_Parameter2>$(SolutionDir)</_Parameter2>
</Attributes>
</VerifyAttributes>
<!-- Ensure not part of Compile, as a workaround for https://github.com/dotnet/sdk/issues/114 -->
<Compile Remove="$(AttributesFilePath)" />
<Compile Remove="$(VerifyAttributesFilePath)" />
</ItemGroup>
<WriteCodeFragment AssemblyAttributes="@(Attributes)"
<WriteCodeFragment AssemblyAttributes="@(VerifyAttributes)"
Language="$(Language)"
OutputFile="$(AttributesFilePath)">
OutputFile="$(VerifyAttributesFilePath)">
<Output TaskParameter="OutputFile" ItemName="Compile" Condition="$(Language) != 'F#'" />
<Output TaskParameter="OutputFile" ItemName="CompileBefore" Condition="$(Language) == 'F#'" />
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
Expand Down

0 comments on commit ec8f6a0

Please sign in to comment.