Skip to content

Commit 7496c61

Browse files
committed
Makes only the robot project required to be built correctly
Closes #21
1 parent f1373a3 commit 7496c61

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

FRC-Extension/RoboRIOCode/DeployManager.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,22 @@ public async Task<CodeReturnStruct> BuildAndPrepareCode(bool debug, Project robo
143143
writer.WriteLine("Building Robot Code");
144144
var sb = (SolutionBuild2)m_dte.Solution.SolutionBuild;
145145
//Check if we are building for debug or release
146+
string configuration = "Release";
146147
if (debug)
147148
{
149+
configuration = "Debug";
148150
//Switch build to debug mode
149-
sb.SolutionConfigurations.Item("Debug").Activate();
151+
sb.SolutionConfigurations.Item(configuration).Activate();
150152
}
151153
else
152154
{
155+
configuration = "Release";
153156
//Switch to release
154-
sb.SolutionConfigurations.Item("Release").Activate();
157+
sb.SolutionConfigurations.Item(configuration).Activate();
155158
}
156-
await Task.Run(() => sb.Build(true));
159+
await Task.Run(() => sb.BuildProject(configuration, robotProject.FullName, true));
160+
161+
157162

158163
//If Build Succeded
159164
if (sb.LastBuildInfo == 0)

0 commit comments

Comments
 (0)