MSBuild MSBuildCommunityTasks任务时间 [英] MSBuild MSBuildCommunityTasks Task Time

查看:64
本文介绍了MSBuild MSBuildCommunityTasks任务时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MSBuild项目,我希望将当前日期添加到我正在创建的zip文件中.

I have a MSBuild project and I want the current date to be added to a zip file that I am creating.

我正在使用MSBuildCommunityTasks.

I am using the MSBuildCommunityTasks.

<!-- Import the CommunityTasks Helpper -->
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />

在网站上 http://msbuildtasks.tigris.org/我可以看到一个名为时间的任务.我无法找到有关如何使用时间的文档.

On the website http://msbuildtasks.tigris.org/ I can see a task called time. I have not been able to find doc on how to use Time.

推荐答案

所以我正在使用

$([System.DateTime]::Now.ToString(`yyyy.MMdd`))

格式中的那些刻度线是反引号,而不是'

those ticks around the format are backticks not '

这篇关于MSBuild MSBuildCommunityTasks任务时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆