使用 WriteCodeFragment MSBuild 任务
我正在尝试使用 WriteCodeFragment
MSBuild 任务来创建 AssemblyVersion
属性。我在创建属性组以正确传递处理所需的 ITaskItem
数组时遇到问题。有人可以帮忙举个例子吗?
I am trying to use the WriteCodeFragment
MSBuild task to create an AssemblyVersion
attribute. I'm having a problem creating a property group to correctly pass the ITaskItem
array required for processing. Can someone help with an example?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这将创建一个名为
BuildVersion.cs
的文件,其AssemblyVersion
属性为123.123.123.123
。如果OutputFile
被删除,则将使用随机生成的文件名。Compile
项名称会自动将该项添加到 Compile 项中(在构建中包含BuildVersion.cs
)。FileWrites
项名称允许在清理期间删除文件。This creates a file called
BuildVersion.cs
with anAssemblyVersion
attribute of123.123.123.123
. IfOutputFile
is removed then a randomly generated file name will be used instead. TheCompile
item name automatically adds the item to the Compile items (includesBuildVersion.cs
in the build). TheFileWrites
item name allows the file to be removed during Clean.