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

Add net6.0 build target to player project #1447

Merged
merged 2 commits into from
Jul 3, 2023
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
2 changes: 1 addition & 1 deletion Bonsai.Configuration/Bonsai.Configuration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<TargetFramework>net472</TargetFramework>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<VersionPrefix>2.8.0</VersionPrefix>
</PropertyGroup>
<ItemGroup>
Expand Down
9 changes: 5 additions & 4 deletions Bonsai.Configuration/ConfigurationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Xml;
using System.Xml.Serialization;

Expand All @@ -19,7 +20,7 @@ public static class ConfigurationHelper

static string GetEnvironmentPlatform()
{
return Environment.Is64BitProcess ? "x64" : "x86";
return RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();
}

static string GetDefaultConfigurationFilePath()
Expand All @@ -40,9 +41,9 @@ static void AddLibraryPath(string path)

public static string GetConfigurationRoot(PackageConfiguration configuration = null)
{
return configuration == null || string.IsNullOrWhiteSpace(configuration.ConfigurationFile)
? Path.GetDirectoryName(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile)
: Path.GetDirectoryName(configuration.ConfigurationFile);
return !string.IsNullOrWhiteSpace(configuration?.ConfigurationFile)
? Path.GetDirectoryName(configuration.ConfigurationFile)
: AppDomain.CurrentDomain.BaseDirectory;
}

public static string GetAssemblyLocation(this PackageConfiguration configuration, string assemblyName)
Expand Down
4 changes: 3 additions & 1 deletion Bonsai.Configuration/ScriptExtensionsProvider.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.CSharp;
#if NET472_OR_GREATER
using Microsoft.CSharp;
using NuGet.Common;
using NuGet.Configuration;
using NuGet.Frameworks;
Expand Down Expand Up @@ -179,3 +180,4 @@ string GetAssemblyLocation(string fileName)
}
}
}
#endif
9 changes: 7 additions & 2 deletions Bonsai.NuGet/Bonsai.NuGet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
<PropertyGroup>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<TargetFramework>net472</TargetFramework>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<VersionPrefix>2.8.0</VersionPrefix>
</PropertyGroup>
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<PackageReference Include="Rx-Main" Version="2.2.5" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Reactive" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NuGet.Protocol" Version="6.6.1" />
<PackageReference Include="NuGet.Resolver" Version="6.6.1" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions Bonsai.Player/Bonsai.Player.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<Description>A command line player for Bonsai workflows.</Description>
<PackageTags>Bonsai Player Rx Reactive Extensions</PackageTags>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<TargetFramework>net472</TargetFramework>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<VersionPrefix>2.8.0</VersionPrefix>
</PropertyGroup>
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<PackageReference Include="ILRepack.MSBuild.Task" Version="2.0.13">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand All @@ -19,7 +19,7 @@
<ProjectReference Include="..\Bonsai.Core\Bonsai.Core.csproj" />
<ProjectReference Include="..\Bonsai.Configuration\Bonsai.Configuration.csproj" PrivateAssets="all" />
</ItemGroup>
<Target Name="ILRepack" AfterTargets="Build">
<Target Name="ILRepack" AfterTargets="Build" Condition="'$(TargetFramework)' == 'net472'">
<PropertyGroup>
<WorkingDirectory>$(MSBuildThisFileDirectory)bin\$(Configuration)\$(TargetFramework)</WorkingDirectory>
</PropertyGroup>
Expand Down