Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/8.0-preview5] Always use the old protocol #3183

Merged
Merged
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
29 changes: 9 additions & 20 deletions src/Aspire.Hosting/Dcp/ApplicationExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1030,30 +1030,19 @@ private void PrepareProjectExecutables()
{
exeSpec.ExecutionType = ExecutionType.IDE;

if (_dcpInfo?.Version?.CompareTo(DcpVersion.MinimumVersionIdeProtocolV1) >= 0)
#pragma warning disable CS0612 // These annotations are obsolete; remove in Aspire Preview 6
annotationHolder.Annotate(Executable.CSharpProjectPathAnnotation, projectMetadata.ProjectPath);

// ExcludeLaunchProfileAnnotation takes precedence over LaunchProfileAnnotation.
if (project.TryGetLastAnnotation<ExcludeLaunchProfileAnnotation>(out _))
{
projectLaunchConfiguration.DisableLaunchProfile = project.TryGetLastAnnotation<ExcludeLaunchProfileAnnotation>(out _);
if (project.TryGetLastAnnotation<LaunchProfileAnnotation>(out var lpa))
{
projectLaunchConfiguration.LaunchProfile = lpa.LaunchProfileName;
}
annotationHolder.Annotate(Executable.CSharpDisableLaunchProfileAnnotation, "true");
}
else
else if (project.TryGetLastAnnotation<LaunchProfileAnnotation>(out var lpa))
{
#pragma warning disable CS0612 // These annotations are obsolete; remove in Aspire Preview 6
annotationHolder.Annotate(Executable.CSharpProjectPathAnnotation, projectMetadata.ProjectPath);

// ExcludeLaunchProfileAnnotation takes precedence over LaunchProfileAnnotation.
if (project.TryGetLastAnnotation<ExcludeLaunchProfileAnnotation>(out _))
{
annotationHolder.Annotate(Executable.CSharpDisableLaunchProfileAnnotation, "true");
}
else if (project.TryGetLastAnnotation<LaunchProfileAnnotation>(out var lpa))
{
annotationHolder.Annotate(Executable.CSharpLaunchProfileAnnotation, lpa.LaunchProfileName);
}
#pragma warning restore CS0612
annotationHolder.Annotate(Executable.CSharpLaunchProfileAnnotation, lpa.LaunchProfileName);
}
#pragma warning restore CS0612
}
else
{
Expand Down