Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions RaspberryDebugger/Models/VisualStudio/ProjectProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public static ProjectProperties CopyFrom(Solution solution, EnvDTE.Project proje
// ASPNETCORE_SERVER.URLS=http://0.0.0.0:<port>

var launchSettingsPath = Path.Combine(projectFolder ?? string.Empty, "Properties", "launchSettings.json");
var activeDebugProfile = (string)project.Properties.Item("ActiveDebugProfile").Value;
var commandLineArgs = new List<string>();
var environmentVariables = new Dictionary<string, string>();
var isAspNet = false;
Expand All @@ -146,7 +147,7 @@ public static ProjectProperties CopyFrom(Solution solution, EnvDTE.Project proje
{
foreach (var profile in ((JObject)profiles.Value).Properties())
{
if (profile.Name == project.Name)
if (profile.Name == activeDebugProfile)
{
var profileObject = (JObject)profile.Value;
var environmentVariablesObject = (JObject)profileObject.Property("environmentVariables")?.Value;
Expand Down Expand Up @@ -263,7 +264,6 @@ string SetLaunchUrl(JObject profileObject)
var platformTarget = (string)project.ConfigurationManager.ActiveConfiguration.Properties
.Item( "PlatformTarget" ).Value;


// Determine whether the project is Raspberry compatible.
var isRaspberryCompatible = isNetCore &&
outputType == 1 && // 1=EXE
Expand All @@ -286,6 +286,7 @@ string SetLaunchUrl(JObject profileObject)
FullPath = project.FullName,
Guid = projectGuid,
Configuration = project.ConfigurationManager.ActiveConfiguration.ConfigurationName,
ActiveDebugProfile = activeDebugProfile,
IsNetCore = isNetCore,
Framework = targetFramework,
SdkVersion = new Version( netVersion.Major, netVersion.Minor),
Expand Down Expand Up @@ -467,6 +468,11 @@ private static List<string> ParseArgs(string commandLine)
/// </summary>
public string Configuration { get; private set; }

/// <summary>
/// Returns the Selected Debug profile.
/// </summary>
public string ActiveDebugProfile { get; private set; }

/// <summary>
/// Returns the fully qualified path to the project's output directory.
/// </summary>
Expand Down