diff --git a/Source/Tools/Flax.Build/Build/Builder.Projects.cs b/Source/Tools/Flax.Build/Build/Builder.Projects.cs
index 3ccc562cc..85c478961 100644
--- a/Source/Tools/Flax.Build/Build/Builder.Projects.cs
+++ b/Source/Tools/Flax.Build/Build/Builder.Projects.cs
@@ -251,7 +251,7 @@ namespace Flax.Build
SetupProjectConfigurations(project, projectInfo);
// Get all modules aggregated into all binary modules used in all configurations of this target
- foreach (var configurationData in mainProject.Configurations)
+ foreach (var configurationData in project.Configurations)
{
var configurationBinaryModules = GetBinaryModules(projectInfo, configurationData.Target, configurationData.Modules);
foreach (var configurationBinaryModule in configurationBinaryModules)
@@ -323,6 +323,10 @@ namespace Flax.Build
if (targets[0].IsPreBuilt)
continue;
+ // Skip if project of that name has been already added
+ if (projects.Any(x => x.OutputType == TargetOutputType.Library && x.Type == TargetType.DotNetCore && x.BaseName == binaryModuleName))
+ continue;
+
using (new ProfileEventScope(binaryModuleName))
{
// TODO: add support for extending this code and support generating bindings projects for other scripting languages
diff --git a/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs b/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs
index 855a0155d..ed8222fb7 100644
--- a/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs
+++ b/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs
@@ -66,7 +66,7 @@ namespace Flax.Build.Projects.VisualStudio
var allPlatforms = project.Configurations.Select(x => x.ArchitectureName).Distinct().ToArray();
csProjectFileContent.AppendLine(string.Format(" {0}", string.Join(";", allConfigurations)));
csProjectFileContent.AppendLine(string.Format(" {0}", string.Join(";", allPlatforms)));
-
+
// Provide default platform and configuration
csProjectFileContent.AppendLine(string.Format(" {0}", defaultConfiguration.Text));
csProjectFileContent.AppendLine(string.Format(" {0}", defaultConfiguration.ArchitectureName));
@@ -128,11 +128,10 @@ namespace Flax.Build.Projects.VisualStudio
csProjectFileContent.AppendLine(" ");
- // Unused when using explicitly NetCore7 ?
- //foreach (var reference in project.CSharp.SystemReferences)
+ /*foreach (var reference in project.CSharp.SystemReferences)
{
- //csProjectFileContent.AppendLine(string.Format(" ", reference));
- }
+ csProjectFileContent.AppendLine(string.Format(" ", reference));
+ }*/
foreach (var reference in project.CSharp.FileReferences)
{
@@ -235,7 +234,6 @@ namespace Flax.Build.Projects.VisualStudio
csProjectFileContent.AppendLine(" true");
csProjectFileContent.AppendLine(" ");
- csProjectFileContent.AppendLine("");
// Generate configuration-specific references
foreach (var reference in configuration.TargetBuildOptions.ScriptingAPI.FileReferences)
@@ -246,9 +244,11 @@ namespace Flax.Build.Projects.VisualStudio
csProjectFileContent.AppendLine(string.Format(" ", Path.GetFileNameWithoutExtension(reference)));
csProjectFileContent.AppendLine(string.Format(" {0}", Utilities.MakePathRelativeTo(reference, projectDirectory).Replace('/', '\\')));
csProjectFileContent.AppendLine(" ");
- csProjectFileContent.AppendLine(" ");
+ csProjectFileContent.AppendLine(" ");
}
}
+
+ csProjectFileContent.AppendLine("");
}
}
}