Prepare Flax.Build project for .NET 7
Add .NET SDK project generator and upgrade Flax.Build project files
This commit is contained in:
@@ -196,7 +196,7 @@ namespace Flax.Build
|
||||
var workspaceRoot = rootProject.ProjectFolderPath;
|
||||
var projectsRoot = Path.Combine(workspaceRoot, "Cache", "Projects");
|
||||
var projects = new List<Project>();
|
||||
var dotNetProjectGenerator = ProjectGenerator.Create(projectFormat, TargetType.DotNet);
|
||||
var dotNetProjectGenerator = ProjectGenerator.Create(projectFormat, TargetType.DotNetCore);
|
||||
var projectToBinaryModule = new Dictionary<Project, KeyValuePair<string, HashSet<Module>>>();
|
||||
var projectToModulesBuildOptions = new Dictionary<Project, Dictionary<Module, BuildOptions>>();
|
||||
Project mainSolutionProject = null;
|
||||
@@ -367,7 +367,7 @@ namespace Flax.Build
|
||||
|
||||
// Create project description
|
||||
var project = dotNetProjectGenerator.CreateProject();
|
||||
project.Type = TargetType.DotNet;
|
||||
project.Type = TargetType.DotNetCore;
|
||||
project.Name = project.BaseName = binaryModuleName;
|
||||
if (mainSolutionProject != null && projectInfo == rootProject)
|
||||
project.Name += ".CSharp"; // Prevent overlapping name with native code project
|
||||
@@ -480,7 +480,7 @@ namespace Flax.Build
|
||||
using (new ProfileEventScope("CreateProject"))
|
||||
{
|
||||
project = dotNetProjectGenerator.CreateProject();
|
||||
project.Type = TargetType.DotNet;
|
||||
project.Type = TargetType.DotNetCore;
|
||||
project.Name = project.BaseName = rulesProjectName;
|
||||
project.Targets = new[] { target };
|
||||
project.SearchPaths = new string[0];
|
||||
|
||||
@@ -334,6 +334,7 @@ namespace Flax.Build
|
||||
BuildTargetNativeCppBindingsOnly(rules, graph, target, buildContext, platform, architecture, configuration);
|
||||
break;
|
||||
case TargetType.DotNet:
|
||||
case TargetType.DotNetCore:
|
||||
BuildTargetDotNet(rules, graph, target, platform, configuration);
|
||||
break;
|
||||
default: throw new ArgumentOutOfRangeException();
|
||||
@@ -354,6 +355,7 @@ namespace Flax.Build
|
||||
BuildTargetNativeCpp(rules, graph, target, buildContext, toolchain, configuration);
|
||||
break;
|
||||
case TargetType.DotNet:
|
||||
case TargetType.DotNetCore:
|
||||
BuildTargetDotNet(rules, graph, target, toolchain.Platform, configuration);
|
||||
break;
|
||||
default: throw new ArgumentOutOfRangeException();
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using Flax.Build.Graph;
|
||||
using Flax.Deploy;
|
||||
using Task = Flax.Build.Graph.Task;
|
||||
|
||||
namespace Flax.Build
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using System;
|
||||
using System.IO;
|
||||
using Flax.Build.Graph;
|
||||
using Flax.Build.NativeCpp;
|
||||
using Task = Flax.Build.Graph.Task;
|
||||
|
||||
namespace Flax.Build
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using Flax.Build.Graph;
|
||||
using Task = Flax.Build.Graph.Task;
|
||||
|
||||
namespace Flax.Build.BuildSystem.Graph
|
||||
{
|
||||
|
||||
@@ -19,9 +19,14 @@ namespace Flax.Build
|
||||
NativeCpp,
|
||||
|
||||
/// <summary>
|
||||
/// The C# project.
|
||||
/// The C# Mono project.
|
||||
/// </summary>
|
||||
DotNet,
|
||||
|
||||
/// <summary>
|
||||
/// The C# .NET SDK project.
|
||||
/// </summary>
|
||||
DotNetCore,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user