Skip to content

Commit

Permalink
Latest dependencies (and enable build on Linux)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwilson committed Aug 6, 2024
1 parent a3e453d commit 7780e56
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 122 deletions.
20 changes: 0 additions & 20 deletions Directory.build.props

This file was deleted.

8 changes: 4 additions & 4 deletions Versions.props
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project>

<PropertyGroup>
<ILRepackVersion>2.0.33</ILRepackVersion>
<ILRepackVersion>2.0.34</ILRepackVersion>
<MicrosoftNetCoreAppRefVersion>6.0.11</MicrosoftNetCoreAppRefVersion>
<MicrosoftNetFrameworkReferenceAssembliesVersion>1.0.3</MicrosoftNetFrameworkReferenceAssembliesVersion>
<MicrosoftNetTestSdkVersion>17.10.0</MicrosoftNetTestSdkVersion>
<MicrosoftSourceLinkGitHubVersion>8.0.0</MicrosoftSourceLinkGitHubVersion>
<MicrosoftTestPlatformObjectModelVersion>$(MicrosoftNetTestSdkVersion)</MicrosoftTestPlatformObjectModelVersion>
<NerdbankGitVersioningVersion>3.6.133</NerdbankGitVersioningVersion>
<NerdbankGitVersioningVersion>3.6.139</NerdbankGitVersioningVersion>
<NSubstituteVersion>5.1.0</NSubstituteVersion>
<TunnelVisionLabsReferenceAssemblyAnnotatorVersion>1.0.0-alpha.160</TunnelVisionLabsReferenceAssemblyAnnotatorVersion>
<XunitAnalyzersVersion>1.16.0-pre.21</XunitAnalyzersVersion>
<XunitAnalyzersVersion>1.16.0-pre.23</XunitAnalyzersVersion>
<XunitV2Version>2.9.1-pre.8</XunitV2Version>
<XunitV3Version>0.2.0-pre.51</XunitV3Version>
<XunitV3Version>0.2.0-pre.79</XunitV3Version>
</PropertyGroup>

</Project>
119 changes: 119 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<Project>
<Import Project="..\Versions.props" />

<PropertyGroup>
<DebugType>embedded</DebugType>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<LangVersion>12.0</LangVersion>
<MSBuildCopyContentTransitively>false</MSBuildCopyContentTransitively>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ILRepack" Version="$(ILRepackVersion)">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="$(MicrosoftTestPlatformObjectModelVersion)" PrivateAssets="All" />
<PackageReference Include="Nerdbank.GitVersioning" Version="$(NerdbankGitVersioningVersion)" PrivateAssets="all" />
<PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="$(TunnelVisionLabsReferenceAssemblyAnnotatorVersion)" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(MicrosoftNetCoreAppRefVersion)]" />
</ItemGroup>

<!-- Enable building .NET Framework on non-Windows machines -->
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="$(MicrosoftNetFrameworkReferenceAssembliesVersion)">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<!-- Support deterministic builds (via https://github.com/clairernovotny/DeterministicBuilds) -->
<PropertyGroup>
<ContinuousIntegrationBuild Condition=" '$(GITHUB_ACTIONS)' == 'true' ">true</ContinuousIntegrationBuild>
<TargetFrameworkMonikerAssemblyAttributesPath Condition="'$(TargetFrameworkMoniker)' != ''">$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
</ItemGroup>

<!-- Use ILRepack to pack in most dependencies rather than ship them separately -->
<Target
Name="ILRepack"
AfterTargets="Build"
Condition=" '$(TargetFramework)' != '' ">
<PropertyGroup>
<OutputAssembly>$([System.IO.Path]::Combine($(TargetDir), "merged", "$(TargetFileName)"))</OutputAssembly>
</PropertyGroup>

<Message Text="$(TargetName) -> $(OutputAssembly)" Importance="High" />
<CallTarget Targets="ILRepackConditional" />
</Target>

<Target
Name="ILRepackConditional"
Inputs="$(TargetPath)"
Outputs="$(TargetDir)merged\$(TargetFileName)">

<MakeDir Directories="$(TargetDir)merged" />

<PropertyGroup>
<MainAssembly>$([System.IO.Path]::Combine($(TargetDir), "$(TargetFileName)"))</MainAssembly>
<OutputAssembly>$([System.IO.Path]::Combine($(TargetDir), "merged", "$(TargetFileName)"))</OutputAssembly>
</PropertyGroup>

<ItemGroup>
<ILRepackExclusions Include="$(TargetDir)xunit.abstractions.dll;$(TargetDir)Microsoft.TestPlatform.*.dll;$(TargetDir)Microsoft.VisualStudio.*.dll" />
<ILRepackDependencies
Include="$(TargetDir)*.dll"
Exclude="$(MainAssembly);@(ILRepackExclusions)"/>
<ILRepackLibPaths Include="$(TargetDir)" />
<ILRepackLibPaths Include="$(TargetFrameworkRootPath)$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\" Condition=" '$(TargetFrameworkRootPath)' != '' " />
</ItemGroup>

<Copy SourceFiles="@(ILRepackExclusions)" DestinationFolder="$(TargetDir)merged" />
<Exec
StandardOutputImportance="low"
IgnoreStandardErrorWarningFormat="true"
Command="dotnet &quot;$(ILRepack)&quot; -internalize -ndebug @(ILRepackLibPaths->'-lib:%(FullPath)', ' ') -out:$(OutputAssembly) $(MainAssembly) @(ILRepackDependencies, ' ')" />
<Exec Command="chmod +x '$(OutputAssembly)'" Condition=" '$(OS)' != 'Windows_NT' AND $(OutputAssembly.EndsWith('.exe')) " />
</Target>

<!-- Supplement Nerdbank.GitVersioning version calculations -->
<Target Name="UpdateAssemblyVersionInfo" BeforeTargets="GenerateAssemblyNBGVVersionInfo" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<!-- Local builds should have a '-dev' suffix on the build number -->
<PrereleaseSuffix Condition=" '$(GITHUB_ACTIONS)' != 'true' ">-dev</PrereleaseSuffix>
<!-- AssemblyVersion and AssemblyFileVersion should be x.y.z.0 -->
<AssemblyVersion>$(BuildVersionSimple)</AssemblyVersion>
<AssemblyFileVersion>$(BuildVersionSimple)</AssemblyFileVersion>
<!-- Always put the Git hash in the informational version, even for non-pre-release versions -->
<AssemblyInformationalVersion>$(BuildVersionSimple)$(PrereleaseVersion)$(PrereleaseSuffix)+$(GitCommitIdShort)</AssemblyInformationalVersion>
</PropertyGroup>
</Target>

<Target Name="UpdateNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<SignedPath />
<SignedPath Condition=" '$(SIGN_APP_SECRET)' != '' ">signed\</SignedPath>
<!-- Local builds should have a '-dev' suffix on the build number -->
<PrereleaseSuffix Condition=" '$(GITHUB_ACTIONS)' != 'true' ">-dev</PrereleaseSuffix>
<!-- Never put the Git hash in the package version -->
<PackageVersion>$(BuildVersionSimple)$(PrereleaseVersion)$(PrereleaseSuffix)</PackageVersion>
<!-- Pass through values we don't know ahead of time for any hand-crafted .nuspec files -->
<NuspecProperties>
Configuration=$(Configuration);
GitCommitId=$(GitCommitId);
MicrosoftNetTestSdkVersion=$(MicrosoftNetTestSdkVersion);
MicrosoftTestPlatformObjectModelVersion=$(MicrosoftTestPlatformObjectModelVersion);
PackageVersion=$(PackageVersion);
SignedPath=$(SignedPath);
</NuspecProperties>
</PropertyGroup>
</Target>

</Project>
96 changes: 0 additions & 96 deletions src/xunit.runner.visualstudio/xunit.runner.visualstudio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,104 +13,8 @@
</PropertyGroup>

<ItemGroup>
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(MicrosoftNetCoreAppRefVersion)]" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="ILRepack" Version="$(ILRepackVersion)">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="$(MicrosoftTestPlatformObjectModelVersion)" PrivateAssets="All" />
<PackageReference Include="Nerdbank.GitVersioning" Version="$(NerdbankGitVersioningVersion)" PrivateAssets="all" />
<PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="$(TunnelVisionLabsReferenceAssemblyAnnotatorVersion)" PrivateAssets="All" />
<PackageReference Include="xunit.analyzers" Version="$(XunitAnalyzersVersion)" PrivateAssets="All" />
<PackageReference Include="xunit.v3.runner.utility" Version="$(XunitV3Version)" />
</ItemGroup>

<!-- Support deterministic builds (via https://github.com/clairernovotny/DeterministicBuilds) -->
<PropertyGroup>
<ContinuousIntegrationBuild Condition=" '$(GITHUB_ACTIONS)' == 'true' ">true</ContinuousIntegrationBuild>
<TargetFrameworkMonikerAssemblyAttributesPath Condition="'$(TargetFrameworkMoniker)' != ''">$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>
<ItemGroup>
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
</ItemGroup>

<!-- Use ILRepack to pack in most dependencies rather than ship them separately -->
<Target
Name="ILRepack"
AfterTargets="Build"
Condition=" '$(TargetFramework)' != '' ">
<PropertyGroup>
<OutputAssembly>$([System.IO.Path]::Combine($(TargetDir), "merged", "$(TargetFileName)"))</OutputAssembly>
</PropertyGroup>

<Message Text="$(TargetName) -> $(OutputAssembly)" Importance="High" />
<CallTarget Targets="ILRepackConditional" />
</Target>

<Target
Name="ILRepackConditional"
Inputs="$(TargetPath)"
Outputs="$(TargetDir)merged\$(TargetFileName)">

<MakeDir Directories="$(TargetDir)merged" />

<PropertyGroup>
<MainAssembly>$([System.IO.Path]::Combine($(TargetDir), "$(TargetFileName)"))</MainAssembly>
<OutputAssembly>$([System.IO.Path]::Combine($(TargetDir), "merged", "$(TargetFileName)"))</OutputAssembly>
</PropertyGroup>

<ItemGroup>
<ILRepackExclusions Include="$(TargetDir)xunit.abstractions.dll;$(TargetDir)Microsoft.TestPlatform.*.dll;$(TargetDir)Microsoft.VisualStudio.*.dll" />
<ILRepackDependencies
Include="$(TargetDir)*.dll"
Exclude="$(MainAssembly);@(ILRepackExclusions)"/>
<ILRepackLibPaths Include="$(TargetDir)" />
<ILRepackLibPaths Include="$(TargetFrameworkRootPath)$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\" Condition=" '$(TargetFrameworkRootPath)' != '' " />
</ItemGroup>

<Copy SourceFiles="@(ILRepackExclusions)" DestinationFolder="$(TargetDir)merged" />
<Exec
StandardOutputImportance="low"
IgnoreStandardErrorWarningFormat="true"
Command="dotnet &quot;$(ILRepack)&quot; -internalize -ndebug @(ILRepackLibPaths->'-lib:%(FullPath)', ' ') -out:$(OutputAssembly) $(MainAssembly) @(ILRepackDependencies, ' ')" />
<Exec Command="chmod +x '$(OutputAssembly)'" Condition=" '$(OS)' != 'Windows_NT' AND $(OutputAssembly.EndsWith('.exe')) " />
</Target>

<!-- Supplement Nerdbank.GitVersioning version calculations -->
<Target Name="UpdateAssemblyVersionInfo" BeforeTargets="GenerateAssemblyNBGVVersionInfo" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<!-- Local builds should have a '-dev' suffix on the build number -->
<PrereleaseSuffix Condition=" '$(GITHUB_ACTIONS)' != 'true' ">-dev</PrereleaseSuffix>
<!-- AssemblyVersion and AssemblyFileVersion should be x.y.z.0 -->
<AssemblyVersion>$(BuildVersionSimple)</AssemblyVersion>
<AssemblyFileVersion>$(BuildVersionSimple)</AssemblyFileVersion>
<!-- Always put the Git hash in the informational version, even for non-pre-release versions -->
<AssemblyInformationalVersion>$(BuildVersionSimple)$(PrereleaseVersion)$(PrereleaseSuffix)+$(GitCommitIdShort)</AssemblyInformationalVersion>
</PropertyGroup>
</Target>

<Target Name="UpdateNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<SignedPath />
<SignedPath Condition=" '$(SIGN_APP_SECRET)' != '' ">signed\</SignedPath>
<!-- Local builds should have a '-dev' suffix on the build number -->
<PrereleaseSuffix Condition=" '$(GITHUB_ACTIONS)' != 'true' ">-dev</PrereleaseSuffix>
<!-- Never put the Git hash in the package version -->
<PackageVersion>$(BuildVersionSimple)$(PrereleaseVersion)$(PrereleaseSuffix)</PackageVersion>
<!-- Pass through values we don't know ahead of time for any hand-crafted .nuspec files -->
<NuspecProperties>
Configuration=$(Configuration);
GitCommitId=$(GitCommitId);
MicrosoftNetTestSdkVersion=$(MicrosoftNetTestSdkVersion);
MicrosoftTestPlatformObjectModelVersion=$(MicrosoftTestPlatformObjectModelVersion);
PackageVersion=$(PackageVersion);
SignedPath=$(SignedPath);
</NuspecProperties>
</PropertyGroup>
</Target>

</Project>
4 changes: 2 additions & 2 deletions test/test.v1/test.v1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNetTestSdkVersion)" />
<PackageReference Include="xunit" Version="1.9.2" />
<PackageReference Include="xunit.extensions" Version="1.9.2" />
<PackageReference Include="xunit" Version="[1.9.2]" />
<PackageReference Include="xunit.extensions" Version="[1.9.2]" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 7780e56

Please sign in to comment.