diff --git a/Development/Scripts/Linux/CallBuildTool.sh b/Development/Scripts/Linux/CallBuildTool.sh
index aadb8ced7..dcdb531b4 100755
--- a/Development/Scripts/Linux/CallBuildTool.sh
+++ b/Development/Scripts/Linux/CallBuildTool.sh
@@ -10,8 +10,7 @@ if [ $testfilesize -le 1000 ]; then
fi
# Compile the build tool.
-dotnet msbuild /nologo /verbosity:quiet "Source/Tools/Flax.Build/Flax.Build.csproj" /property:Configuration=Release /target:Restore,Clean /property:RestorePackagesConfig=True /p:RuntimeIdentifiers=linux-x64
-dotnet msbuild /nologo /verbosity:quiet "Source/Tools/Flax.Build/Flax.Build.csproj" /property:Configuration=Release /target:Build /property:SelfContained=False /property:RuntimeIdentifiers=linux-x64
+dotnet msbuild /nologo /verbosity:quiet "Source/Tools/Flax.Build/Flax.Build.csproj" /property:Configuration=Release /target:Restore,Build /property:RestorePackagesConfig=True /p:RuntimeIdentifiers=linux-x64
# Run the build tool using the provided arguments.
Binaries/Tools/Flax.Build "$@"
diff --git a/Source/Engine/Scripting/DotNet/CoreCLR.cpp b/Source/Engine/Scripting/DotNet/CoreCLR.cpp
index 210a454f1..fe8e5c61b 100644
--- a/Source/Engine/Scripting/DotNet/CoreCLR.cpp
+++ b/Source/Engine/Scripting/DotNet/CoreCLR.cpp
@@ -63,7 +63,7 @@ bool CoreCLR::LoadHostfxr(const String& library_path_)
hostfxr_set_error_writer = (hostfxr_set_error_writer_fn)Platform::GetProcAddress(hostfxr, "hostfxr_set_error_writer");
hostfxr_get_dotnet_environment_info_result = (hostfxr_get_dotnet_environment_info_result_fn)Platform::GetProcAddress(hostfxr, "hostfxr_get_dotnet_environment_info_result");
hostfxr_run_app = (hostfxr_run_app_fn)Platform::GetProcAddress(hostfxr, "hostfxr_run_app");
-
+
return true;
}
@@ -111,7 +111,7 @@ void* CoreCLR::GetStaticMethodPointer(const String& methodName)
if (rc != 0)
LOG(Fatal, "Failed to get unmanaged function pointer for method {0}: 0x{1:x}", methodName.Get(), (unsigned int)rc);
- cachedFunctions.Add(String(methodName), fun);
+ cachedFunctions.Add(methodName, fun);
return fun;
}
diff --git a/Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj b/Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj
index d89fd2d40..35c575631 100644
--- a/Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj
+++ b/Source/Tools/Flax.Build.Tests/Flax.Build.Tests.csproj
@@ -22,9 +22,6 @@
..\..\..\Cache\Intermediate\Flax.Build.Tests\Debug
-
- ..\..\..\Cache\Intermediate\Flax.Build.Tests\Release
-
diff --git a/Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs b/Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs
index 1ddc390f4..559901ffc 100644
--- a/Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs
+++ b/Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs
@@ -25,7 +25,13 @@ namespace Flax.Build
task.Cost = 100;
task.DisableCache = true;
task.CommandPath = VCEnvironment.MSBuildPath;
- task.CommandArguments = string.Format("\"{0}\" /m /t:Build /p:Configuration=\"{1}\" /p:Platform=\"{2}\" {3} /nologo", target.CustomExternalProjectFilePath, configuration.ToString(), "AnyCPU", VCEnvironment.Verbosity);
+ task.CommandArguments = $"\"{target.CustomExternalProjectFilePath}\" /m /p:BuildProjectReferences=false /t:Restore,Build /p:Configuration=\"{configuration}\" /p:RestorePackagesConfig=True /p:Platform=AnyCPU /nologo {VCEnvironment.Verbosity}";
+ if (task.CommandPath.EndsWith(" msbuild"))
+ {
+ // Special case when using dotnet CLI as msbuild
+ task.CommandPath = task.CommandPath.Substring(0, task.CommandPath.Length - 8);
+ task.CommandArguments = "msbuild " + task.CommandArguments;
+ }
return;
}
diff --git a/Source/Tools/Flax.Build/Deploy/VCEnvironment.cs b/Source/Tools/Flax.Build/Deploy/VCEnvironment.cs
index 5a0d96b27..1640ac190 100644
--- a/Source/Tools/Flax.Build/Deploy/VCEnvironment.cs
+++ b/Source/Tools/Flax.Build/Deploy/VCEnvironment.cs
@@ -55,6 +55,13 @@ namespace Flax.Deploy
case TargetPlatform.Linux:
case TargetPlatform.Mac:
{
+ // Use msbuild for .NET
+ toolPath = UnixPlatform.Which("dotnet");
+ if (toolPath != null)
+ {
+ return toolPath + " msbuild";
+ }
+
// Use msbuild from Mono
toolPath = UnixPlatform.Which("msbuild");
if (toolPath != null)
diff --git a/Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs b/Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs
index ced516a54..e4da48a4c 100644
--- a/Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs
+++ b/Source/Tools/Flax.Build/Platforms/Linux/LinuxPlatform.cs
@@ -40,7 +40,7 @@ namespace Flax.Build.Platforms
if (Platform.BuildTargetPlatform == TargetPlatform.Linux)
{
// Pick the newest compiler (overriden by specified in command line)
- if (Which(Compiler) != null)
+ if (Which(Configuration.Compiler) != null)
Compiler = Configuration.Compiler;
else if (Which("clang++-10") != null)
Compiler = "clang++-10";
diff --git a/Source/Tools/Flax.Build/Projects/VisualStudioCode/VisualStudioCodeProjectGenerator.cs b/Source/Tools/Flax.Build/Projects/VisualStudioCode/VisualStudioCodeProjectGenerator.cs
index d63a8827c..9f67c09cf 100644
--- a/Source/Tools/Flax.Build/Projects/VisualStudioCode/VisualStudioCodeProjectGenerator.cs
+++ b/Source/Tools/Flax.Build/Projects/VisualStudioCode/VisualStudioCodeProjectGenerator.cs
@@ -546,7 +546,7 @@ namespace Flax.Build.Projects.VisualStudioCode
json.EndObject();
// Extension settings
- json.AddField("omnisharp.useModernNet", false);
+ json.AddField("omnisharp.useModernNet", true);
json.EndRootObject();
@@ -566,7 +566,7 @@ namespace Flax.Build.Projects.VisualStudioCode
json.AddField("jake.autoDetect", "off");
json.AddField("grunt.autoDetect", "off");
json.AddField("omnisharp.defaultLaunchSolution", solution.Name + ".sln");
- json.AddField("omnisharp.useModernNet", false);
+ json.AddField("omnisharp.useModernNet", true);
json.EndObject();
// Folders
diff --git a/Source/Tools/FlaxEngine.Tests/FlaxEngine.Tests.Build.cs b/Source/Tools/FlaxEngine.Tests/FlaxEngine.Tests.Build.cs
index 36285cd28..2cb4071b3 100644
--- a/Source/Tools/FlaxEngine.Tests/FlaxEngine.Tests.Build.cs
+++ b/Source/Tools/FlaxEngine.Tests/FlaxEngine.Tests.Build.cs
@@ -29,7 +29,6 @@ public class FlaxEngineTestsTarget : Target
Configurations = new[]
{
TargetConfiguration.Debug,
- TargetConfiguration.Release,
};
CustomExternalProjectFilePath = System.IO.Path.Combine(FolderPath, "FlaxEngine.Tests.csproj");
}
diff --git a/Source/Tools/FlaxEngine.Tests/FlaxEngine.Tests.csproj b/Source/Tools/FlaxEngine.Tests/FlaxEngine.Tests.csproj
index 42a7cbf96..139620d0d 100644
--- a/Source/Tools/FlaxEngine.Tests/FlaxEngine.Tests.csproj
+++ b/Source/Tools/FlaxEngine.Tests/FlaxEngine.Tests.csproj
@@ -2,12 +2,13 @@
Editor.Windows.Debug;Editor.Linux.Debug
x64
- Editor.Windows.Debug
+ Editor.Linux.Debug
x64
{4AAED6A2-38B1-4A31-AB04-9264A94A8ECA}
{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
UnitTest
net7.0
+ Library
11.0
disable
annotations
@@ -17,7 +18,11 @@
..\..\..\Binaries\Tools\
..\..\..\Cache\Intermediate\FlaxEngine.Tests\Debug
false
+ false
+ false
false
+ false
+ true
USE_NETCORE;FLAX_ASSERTIONS
false
false
@@ -26,14 +31,14 @@
-
..\..\Platforms\DotNet\NUnit\build\nunit.framework.dll
+
-
+