Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 26, 2025

Fix MSBuild and Source Generator behavior

This PR addresses two issues:

Issue 1: MSBuild dependencies should not be transitive

  • Prevent .dat files from being transitively copied through project references
  • Ensure Lib3 only gets Lib2.dat (not Lib1.dat)
  • Verify .dat files are still generated correctly

Issue 2: Source Generator processes non-resource additional files

  • Filter AdditionalFiles to only process resource files matching the pattern
  • Exclude additional files added by other source generators

Plan:

  1. Fix MSBuild targets to prevent transitive copy of .dat files by setting CopyToOutputDirectory metadata conditionally
  2. Update Source Generator to filter additional files based on the resource pattern
  3. Test changes to ensure both issues are resolved
Original prompt

This section details on the original issue you should resolve

<issue_title>行为修正</issue_title>
<issue_description>## msbuild和sg项目不应该传递依赖。

  • lib3依赖lib2,lib2依赖lib1。
  • 在lib1的msbuild依赖不应该传递给lib3。
  • 但是要确保 dat 文件正常生成。

SG项目, 非资源文件也进行了生成

项目中可能有其他 additional file,这些文件可能是其他 SG 项目添加的,不是要打包的,但是也被错误打包进去了。</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Oct 26, 2025
Copilot AI requested a review from Soar360 October 26, 2025 09:56
Copilot finished work on behalf of Soar360 October 26, 2025 09:56
@Soar360 Soar360 closed this Oct 26, 2025
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.

行为修正

2 participants