Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating various versions and build infrastructure for .NET 6 #220

Merged
merged 1 commit into from
Oct 29, 2021
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
312 changes: 182 additions & 130 deletions .editorconfig

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@
# Set explicit file behavior to:
# treat as binary
###############################################################################
*.png binary
*.wav binary
*.snk binary
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,17 @@ TestResult.xml
###############################################################################
.vs/
.vscode/

###############################################################################
# User Specific Settings
###############################################################################
*.user

###############################################################################
# Asset Files
###############################################################################
*.bmp
*.gif
*.jpg
*.png
*.wav
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@
<ContinuousIntegrationBuild Condition="'$(GITHUB_RUN_ID)' != ''">true</ContinuousIntegrationBuild>
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(Configuration)/</PackageOutputPath>
<Product>TerraFX.Interop.Windows</Product>
<RootNamespace>TerraFX.Interop</RootNamespace>
<VersionPrefix>10.0.20348.0</VersionPrefix>
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">rc1</VersionSuffix>
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">rc2</VersionSuffix>
<VersionSuffix Condition="'$(GITHUB_EVENT_NAME)' == 'pull_request'">pr</VersionSuffix>
</PropertyGroup>

Expand Down
9 changes: 4 additions & 5 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@

<!-- Settings that append the existing setting value -->
<PropertyGroup>
<DefineConstants>$(DefineConstants);$(OS)</DefineConstants>
<NoWarn>$(NoWarn);NU5105</NoWarn>
</PropertyGroup>

<!-- Settings that are only set for CI builds -->
<PropertyGroup Condition="'$(GITHUB_RUN_ID)' != ''">
<PackageVersion Condition="'$(EXCLUDE_RUN_ID_FROM_PACKAGE)' != 'true'">$(Version)-$(GITHUB_RUN_ID)</PackageVersion>
<PackageVersion Condition="'$(EXCLUDE_RUN_ID_FROM_PACKAGE)' != 'true'">$(Version).$(GITHUB_RUN_ID)</PackageVersion>
</PropertyGroup>

<!-- Settings that are only set for executables -->
Expand All @@ -34,10 +33,10 @@

<!-- Package versions for package references across all projects -->
<ItemGroup>
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.0.0" />
<PackageReference Update="NUnit" Version="3.13.1" />
<PackageReference Update="NUnit3TestAdapter" Version="3.17.0" />
<PackageReference Update="NUnit" Version="3.13.2" />
<PackageReference Update="NUnit3TestAdapter" Version="4.0.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion samples/DirectX/TerraFX.Samples.DirectX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/WinForms/TerraFX.Samples.WinForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0-windows;net6.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0-windows</TargetFrameworks>
<OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ try {
$DotNetInstallDirectory = Join-Path -Path $ArtifactsDir -ChildPath "dotnet"
Create-Directory -Path $DotNetInstallDirectory

& $DotNetInstallScript -Channel 5.0 -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture
& $DotNetInstallScript -Channel 6.0 -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture

$env:PATH="$DotNetInstallDirectory;$env:PATH"
Expand Down
1 change: 0 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ if [[ ! -z "$architecture" ]]; then
DotNetInstallDirectory="$ArtifactsDir/dotnet"
CreateDirectory "$DotNetInstallDirectory"

. "$DotNetInstallScript" --channel 5.0 --version latest --install-dir "$DotNetInstallDirectory" --architecture "$architecture"
. "$DotNetInstallScript" --channel 6.0 --version latest --install-dir "$DotNetInstallDirectory" --architecture "$architecture"

PATH="$DotNetInstallDirectory:$PATH:"
Expand Down
1 change: 0 additions & 1 deletion sources/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

<PropertyGroup>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\Directory.Build.props</MSBuildAllProjects>
<TerraFXProjectCategory>sources</TerraFXProjectCategory>
</PropertyGroup>

Expand Down
4 changes: 0 additions & 4 deletions sources/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
MSBuildAllProjects, as that is done by the file that imports us.
-->

<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\Directory.Build.targets</MSBuildAllProjects>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.targets" />

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion sources/Interop/Windows/TerraFX.Interop.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<NoWarn>1573;1591;$(NoWarn)</NoWarn>
<RootNamespace>TerraFX.Interop</RootNamespace>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
</PropertyGroup>

</Project>
1 change: 0 additions & 1 deletion tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
-->

<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\Directory.Build.props</MSBuildAllProjects>
<TerraFXProjectCategory>tests</TerraFXProjectCategory>
</PropertyGroup>

Expand Down
4 changes: 0 additions & 4 deletions tests/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
MSBuildAllProjects, as that is done by the file that imports us.
-->

<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileDirectory)..\Directory.Build.targets</MSBuildAllProjects>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.targets" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<RootNamespace>TerraFX.Interop.UnitTests</RootNamespace>
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down