我想在Windows CMD控制台中运行两个命令.
在Linux中,我会这样做
touch thisfile ; ls -lstrh
它是如何在Windows上完成的?
我们为所有生产版本执行代码签名和时间戳.偶尔(通常在我们即将进行RTM(!)时)Verisign的时间戳服务器(" http://timestamp.verisign.com/scripts/timstamp.dll ")决定间歇性地脱机.
在这种情况下我们该怎么做?
我有一个Web项目,用于触发构建后事件"成功构建"以执行一些清理/迁移活动(命令脚本).
在VS2012中,成功后构建仅在代码更改时触发.如果没有代码更改,编译器仍会报告Successful Build,但是,成功后构建事件不会触发.
在VS2010中,无论代码更改如何,成功后的构建后事件都会在每次成功构建时触发.这就是我所期待的.编译成功,即使没有发生任何更改,因此事件应该触发.
使用代码更改的VS2012构建示例:
------ Build started: Project: ABC.Business.Web.Migrate, Configuration: Debug Any CPU ------
Build started 2012-08-23 01:26:13.
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
  C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /errorendlocation /preferreduilang:en-US /highentropyva- /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" /reference:C:\Dev\ABC\Source\ABC.Business.Web\bin\ABC.Business.Web.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" /debug+ /debug:full /optimize- /out:obj\Debug\ABC.Web.Migrate.dll /target:library /utf8output Properties\AssemblyInfo.cs "C:\Users\Administrator\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cs"
_CopyFilesMarkedCopyLocal:
  Copying file from "C:\Dev\ABC\Source\ABC.Business.Web\bin\ABC.Business.Web.dll" to "bin\ABC.Business.Web.dll".
  Copying file from "C:\Dev\ABC\Source\ABC.Business.Web\bin\ABC.Web.dll" to "bin\ABC.Web.dll".
  Copying file from "C:\Dev\ABC\Source\ABC.Business.Web\bin\ABC._Services.dll" …鉴于bin\内部德尔福项目中包含的文件目录Cert.pem和Key.pem低于德尔福后生成事件的唯一副本,如果这两个文件C:\Binaries\Cert.pem不存在:
if not exist $(OUTPUTDIR)Cert.pem (copy bin\Cert.pem $(OUTPUTDIR))
if not exist $(OUTPUTDIR)Key.pem (copy bin\Key.pem $(OUTPUTDIR))
一旦C:\Binaries\Cert.pem存在,Key.pem永远不会复制该文件.
如何在后期制作活动中解决这个问题?
编辑:与我的2014年帖子不同,这确实可以使用括号.请参阅下面的答案.