Skip to content

Update comment on roslyn tasks #12045

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

Merged
merged 3 commits into from
Jun 26, 2025
Merged

Update comment on roslyn tasks #12045

merged 3 commits into from
Jun 26, 2025

Conversation

jjonescz
Copy link
Member

Follow up on dotnet/dotnet#629.
cc @jaredpar

@Copilot Copilot AI review requested due to automatic review settings June 20, 2025 08:09
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces hard-coded Roslyn targets paths with the new $(RoslynTasksAssembly) property for CopyRefAssembly, Csc, and Vbc tasks.

  • Swapped AssemblyFile="$(RoslynTargetsPath)\Microsoft.Build.Tasks.CodeAnalysis.dll" for AssemblyFile="$(RoslynTasksAssembly)"
  • Consolidated Roslyn task assembly references behind a single MSBuild property
Comments suppressed due to low confidence (2)

src/Tasks/Microsoft.Common.tasks:107

  • [nitpick] Update this comment to mention the $(RoslynTasksAssembly) property and remove references to RoslynTargetsPath to reflect the new usage.
  <!-- NOTE: Keep in sync with SDK: src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets -->

src/Tasks/Microsoft.Common.tasks:108

  • [nitpick] Consider adding a Condition="'$(RoslynTasksAssembly)' != ''" attribute to each <UsingTask> so the build fails more gracefully if the property isn't set.
  <UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.CopyRefAssembly"           AssemblyFile="$(RoslynTasksAssembly)" />

@jjonescz jjonescz marked this pull request as draft June 20, 2025 14:03
@jjonescz jjonescz changed the title Use RoslynTasksAssembly Update comment on roslyn tasks Jun 23, 2025
@jjonescz jjonescz marked this pull request as ready for review June 23, 2025 08:54
@jjonescz jjonescz requested a review from jaredpar June 23, 2025 09:35
Co-authored-by: Rainer Sigwald <raines@microsoft.com>
@jjonescz
Copy link
Member Author

Looks like I don't have permissions to merge this.

@rainersigwald rainersigwald merged commit aed5bcf into main Jun 26, 2025
9 checks passed
@rainersigwald rainersigwald deleted the jjonescz-patch-1 branch June 26, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants