diff --git a/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs b/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs
index a46e12fea..855a0155d 100644
--- a/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs
+++ b/Source/Tools/Flax.Build/Projects/VisualStudio/CSSDKProjectGenerator.cs
@@ -137,7 +137,7 @@ namespace Flax.Build.Projects.VisualStudio
foreach (var reference in project.CSharp.FileReferences)
{
csProjectFileContent.AppendLine(string.Format(" ", Path.GetFileNameWithoutExtension(reference)));
- csProjectFileContent.AppendLine(string.Format(" {0}", Utilities.MakePathRelativeTo(reference, projectDirectory)));
+ csProjectFileContent.AppendLine(string.Format(" {0}", Utilities.MakePathRelativeTo(reference, projectDirectory).Replace('/', '\\')));
csProjectFileContent.AppendLine(" ");
}
@@ -233,8 +233,22 @@ namespace Flax.Build.Projects.VisualStudio
csProjectFileContent.AppendLine(" 1591");
csProjectFileContent.AppendLine(string.Format(" {0}\\{1}.CSharp.xml", outputPath, project.BaseName));
csProjectFileContent.AppendLine(" true");
+
csProjectFileContent.AppendLine(" ");
csProjectFileContent.AppendLine("");
+
+ // Generate configuration-specific references
+ foreach (var reference in configuration.TargetBuildOptions.ScriptingAPI.FileReferences)
+ {
+ if (!project.CSharp.FileReferences.Contains(reference))
+ {
+ csProjectFileContent.AppendLine(string.Format(" ", configuration.Name));
+ csProjectFileContent.AppendLine(string.Format(" ", Path.GetFileNameWithoutExtension(reference)));
+ csProjectFileContent.AppendLine(string.Format(" {0}", Utilities.MakePathRelativeTo(reference, projectDirectory).Replace('/', '\\')));
+ csProjectFileContent.AppendLine(" ");
+ csProjectFileContent.AppendLine(" ");
+ }
+ }
}
}
}