Generate Visual Studio Code build tasks for C#-projects
This commit is contained in:
@@ -155,9 +155,9 @@ namespace Flax.Build.Projects.VisualStudioCode
|
||||
{
|
||||
foreach (var project in solution.Projects)
|
||||
{
|
||||
// C++ project
|
||||
if (project.Type == TargetType.NativeCpp)
|
||||
{
|
||||
if (project.Name == "BuildScripts")
|
||||
continue;
|
||||
|
||||
bool defaultTask = project == solution.MainProject;
|
||||
foreach (var configuration in project.Configurations)
|
||||
{
|
||||
@@ -168,20 +168,17 @@ namespace Flax.Build.Projects.VisualStudioCode
|
||||
|
||||
json.AddField("label", name);
|
||||
|
||||
if (defaultTask && configuration.Configuration == TargetConfiguration.Development && configuration.Platform == Platform.BuildPlatform.Target)
|
||||
{
|
||||
defaultTask = false;
|
||||
bool isDefaultTask = defaultTask && configuration.Configuration == TargetConfiguration.Development && configuration.Platform == Platform.BuildPlatform.Target;
|
||||
|
||||
json.BeginObject("group");
|
||||
{
|
||||
json.AddField("kind", "build");
|
||||
json.AddField("isDefault", true);
|
||||
json.AddField("isDefault", isDefaultTask);
|
||||
}
|
||||
json.EndObject();
|
||||
}
|
||||
else
|
||||
{
|
||||
json.AddField("group", "build");
|
||||
}
|
||||
|
||||
if (isDefaultTask)
|
||||
defaultTask = false;
|
||||
|
||||
switch (Platform.BuildPlatform.Target)
|
||||
{
|
||||
@@ -273,7 +270,6 @@ namespace Flax.Build.Projects.VisualStudioCode
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
json.EndArray();
|
||||
}
|
||||
json.EndRootObject();
|
||||
|
||||
Reference in New Issue
Block a user