如何通过Nuget将propertyGroup-S或ItemGroup-S添加到CSPROJ中

发布于 2025-01-27 13:07:06 字数 219 浏览 4 评论 0原文

为了使我的Nuget软件包正确工作,必须在csproj文件中存在某些部分。如果我手动添加这些部分,可以通过操纵目标项目或添加.targets文件,它可以正常工作。

我想做同样的事情,但会自动这样做,因此仅通过引用我的nuget软件包,我的自定义propertygroup s就会注入C#项目。

我该怎么做?

For my nuget package to work correctly, there must be certain sections present in the csproj file. If I add these sections manually, either through manipulating the target project or adding a .targets file, it works correctly.

I want to do the same, but automatically, so that just by referencing my nuget package,my custom PropertyGroups get injected into the C# project.

How can I accomplish this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文