Equivalent msbuild command for Publish from VS2008

匿名 (未验证) 提交于 2019-12-03 02:59:02

问题:

any idea which is the command for publish in msbuild corresponding to the one in VS2008? What I want is the resulting output to be the same, without that _PublishedWebSites subdirectory. Is this achievable from command line or I should use a build file?

Thanks.

回答1:

You could take a look at the Vs2008 Web Deployment stuff. Underneath, it uses the AspNetCompiler Task, so you could hack that into you .*proj file.



回答2:

Solved this by specifying WebProjectOutputDir property.
It looks something like this:
MSBuild.exe /t:Rebuild "MyTestProject.sln" /p:OutDir=c:\Project\bin\ /p:WebProjectOutputDir=C:\Project\ /p:Configuration=Debug



回答3:

You can also check out these blog posts:
- http://blog.m.jedynak.pl/2008/03/publishing-web-application-with-msbuild.html
- http://codingcockerel.co.uk/2008/05/18/how-to-publish-a-web-site-with-msbuild/



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!