我为MsBuild.exe指定了OutputPath,但它无法识别.Build成功但c:/TEST
文件夹中没有文件。如果我错过了什么,你能告诉我吗?默认情况下,发布文件存储在哪里?
C:\Windows\Microsoft.NET\Framework\v4.0.30319>MsBuild.exe "c:\TFS\WebApps.sln" /t:publish /p:Configuration=Release /p:OutputPath=c:\TEST
答案 0 :(得分:2)
您是否尝试过使用OutDir而不是OutputPath?这是来自Microsoft.Common.targets文件的注释:
OutDir: Indicates the final output location for the project or solution. When building a solution, OutDir can be used to gather multiple project outputs in one location. In addition, OutDir is included in AssemblySearchPaths used for resolving references. OutputPath: This property is usually specified in the project file and is used to initialize OutDir. OutDir and OutputPath are distinguished for legacy reasons, and OutDir should be used if at all possible.
答案 1 :(得分:0)
您是在c:\ TFS下执行该命令吗?
我的猜测是查看控制台输出,找出它首先在C:\ TFS下放置文件的位置。
然后尝试将此包含在您的命令中:
/fl3 /flp3:Verbosity=diag;logfile=msbuild.log
然后在您喜欢的文本编辑器中打开日志并进行调查!