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

Embed .cs source files from CodeTaskFactory in binlog #9686

Closed
KirillOsenkov opened this issue Jan 27, 2024 · 0 comments · Fixed by #9746
Closed

Embed .cs source files from CodeTaskFactory in binlog #9686

KirillOsenkov opened this issue Jan 27, 2024 · 0 comments · Fixed by #9746
Assignees
Labels
Area: CodeTaskFactory Issues related to building a task during the build using CodeTaskFactory or RoslynCodeTaskFactory. Area: Debuggability Issues impacting the diagnosability of builds, including logging and clearer error messages. help wanted Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim. internal-team-onboarding Priority:2 Work that is important, but not critical for the release triaged

Comments

@KirillOsenkov
Copy link
Member

For a UsingTask using a CodeTaskFactory or a RoslynCodeTaskFactory, if an external .cs file is specified for the task source code, we should embed the .cs file into the binlog (perhaps using the EmbedInBinlog item or by directly emitting a TaskParameterEventArgs of type AddItem with the item EmbedInBinlog and the path to the file):

  <UsingTask TaskName="MyTask" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
    <ParameterGroup>
      <StringComparison ParameterType="System.String" Required="false" />
    </ParameterGroup>
    <Task>
      <Code Type="Class" Language="cs" Source="$(MSBuildThisFileDirectory)\MyTask.cs" />
    </Task>
  </UsingTask>
@rainersigwald rainersigwald added Area: Debuggability Issues impacting the diagnosability of builds, including logging and clearer error messages. needs-triage Have yet to determine what bucket this goes in. Area: CodeTaskFactory Issues related to building a task during the build using CodeTaskFactory or RoslynCodeTaskFactory. labels Jan 29, 2024
@AR-May AR-May added help wanted Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim. Priority:2 Work that is important, but not critical for the release internal-team-onboarding labels Jan 30, 2024
@AR-May AR-May added triaged and removed needs-triage Have yet to determine what bucket this goes in. labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CodeTaskFactory Issues related to building a task during the build using CodeTaskFactory or RoslynCodeTaskFactory. Area: Debuggability Issues impacting the diagnosability of builds, including logging and clearer error messages. help wanted Issues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim. internal-team-onboarding Priority:2 Work that is important, but not critical for the release triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants