tag:blogger.com,1999:blog-5704450.post832230370623338992..comments2024-03-20T20:27:05.438-07:00Comments on Vishal Joshi's Tangent: Web Packaging: Creating web packages using MSBuildVishal R Joshihttp://www.blogger.com/profile/05217117734084631137noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-5704450.post-87633181580708298042014-03-06T06:54:42.141-08:002014-03-06T06:54:42.141-08:00Nice post! I found it while trying to do the same...Nice post! I found it while trying to do the same thing using build server.<br /><br />As a follow up, is there a way to set the application pool to an existing one in the target server? This is without using IIS settings on my web project.Chikutojinoreply@blogger.comtag:blogger.com,1999:blog-5704450.post-59542548201899542302012-02-09T22:15:13.674-08:002012-02-09T22:15:13.674-08:00Hi Anonymous,
You just have to configure your l...Hi Anonymous,<br /> You just have to configure your local IIS settings to be what you want on remote. Once you do that then in Package/Publish settings you can just check the box which says "Include IIS Settings" and the package will automatically contain everything that you need.<br />thx<br />VishalVishal R Joshihttps://www.blogger.com/profile/05217117734084631137noreply@blogger.comtag:blogger.com,1999:blog-5704450.post-9681602690426718482012-02-09T15:49:36.194-08:002012-02-09T15:49:36.194-08:00How do I set application pool and possibly other p...How do I set application pool and possibly other properties when creating the package? Or at least how do I tell msbuild to use my custom parameters file when packaging the web application?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5704450.post-50192997980736679372012-02-08T14:38:23.762-08:002012-02-08T14:38:23.762-08:00Yes you can set DeployOnBuild property to true by ...Yes you can set DeployOnBuild property to true by manually editing the project file. Hopefully that will solve the problem.<br />Thanks<br />VishalVishal R Joshihttps://www.blogger.com/profile/05217117734084631137noreply@blogger.comtag:blogger.com,1999:blog-5704450.post-81027993629652801572011-12-20T13:57:31.284-08:002011-12-20T13:57:31.284-08:00Can you do anything to make the package creation a...Can you do anything to make the package creation as part of the build process in visual studio? For instance, when I build my web service, it also builds and generates the package?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5704450.post-49366054642119864002011-10-02T13:54:39.903-07:002011-10-02T13:54:39.903-07:00I think you can copy the tasks and targets located...I think you can copy the tasks and targets located at C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0 to your build machine at the same location. Then TFS works fine. Ofcourse this is not official but works for us.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5704450.post-57815743883947126752011-09-30T02:14:19.026-07:002011-09-30T02:14:19.026-07:00Ahh ok, thanks for the information!
Unfortunately...Ahh ok, thanks for the information!<br /><br />Unfortunately having a studio install on our build agents isn't an option for us, but at least I know :).<br /><br />Cheers,<br /><br />Chrisjacderidahttps://www.blogger.com/profile/10466975343688851762noreply@blogger.comtag:blogger.com,1999:blog-5704450.post-42677078351066899232011-09-29T11:05:46.883-07:002011-09-29T11:05:46.883-07:00Hi Chris,
Yes unfortunately it is required to ...Hi Chris,<br /> Yes unfortunately it is required to install Visual Studio on the build server to enable the scenario. If you do not want to install full VS then you can also install VWD Express 2010.<br />Thx<br />VishalVishal R Joshihttps://www.blogger.com/profile/05217117734084631137noreply@blogger.comtag:blogger.com,1999:blog-5704450.post-12696629271641644432011-09-29T09:27:55.525-07:002011-09-29T09:27:55.525-07:00Hi Vishal,
Good post! I got my package to build j...Hi Vishal,<br /><br />Good post! I got my package to build just fine using a script in my local development environment, but then when I tried to run it on my build server I got the following error:<br />"D:\AgentWork\d055e5f687a62e1c\src\Saturn.WebUI\Saturn.WebUI.csproj : error MSB4057: The target "Package" does not exist in the project."<br /><br />The build server also has web deploy installed on it. There is a version mismatch though - the development machine is running msdeploy 7.1.618.0 and the build server is running 7.1.1070.1. Note also that the build server doesn't have Visual Studio on it - but I wouldn't have thought that that would be a requirement for making the Package target available. Also, I'm using the .NET 4 version of msbuild on both machines.<br /><br />Can you advise if there is an incompatibility between these 2 versions? Or do you need a visual studio install to have the package target available?<br /><br />Many thanks,<br /><br />Chrisjacderidahttps://www.blogger.com/profile/10466975343688851762noreply@blogger.comtag:blogger.com,1999:blog-5704450.post-39542280857194389362011-06-14T13:26:46.067-07:002011-06-14T13:26:46.067-07:00Hi there,
Regarding your question on why /t:Packa...Hi there, <br />Regarding your question on why /t:Package does not work. I think this might be due to the fact that you are doing solution build and when you do so it will try to pass the Package target to all your projects. If you have things like classlibrary, winform etc part of the solution then it is likely that you will get the failure as these projects do not support the Package target. For that reason you might actually want to pass /p:DeployOnBuild=True. This will pass the property to every project and based on typical MsBuild semantics the projects who does not honor the property will ignore it (msbuild cannot do so for targets).<br />I hope this helps. I also have a blog post http://vishaljoshi.blogspot.com/2010/11/team-build-web-deployment-web-deploy-vs.html which talks about team build and deployment in detail.<br />hope this helps.<br />Thx<br />VishalVishal R Joshihttps://www.blogger.com/profile/05217117734084631137noreply@blogger.comtag:blogger.com,1999:blog-5704450.post-1357764190314397742011-06-14T03:53:55.086-07:002011-06-14T03:53:55.086-07:00Vishal, your write ups are fantastic and have help...Vishal, your write ups are fantastic and have helped no end.<br /><br />I have got to the point where I can create a package such as:<br /><br />MSBuild "MyProjectName.csproj" /T:Package<br /><br />However I would ideally like to do this with TFS. I have edited the build definition and added<br /><br />/T:Package<br /><br />to the MSBuild Arguments option but get the errors<br /><br />"The target "Package" does not exist in the project."<br /><br />and<br /><br />TF270015: 'MSBuild.exe' returned an unexpected exit code. Expected '0'; actual '1'.<br /><br />I had assumed they were using the same MSBuild underneath so have I missed some important step?<br /><br />Any help would be massively appreciated, once again thanks for your great effort in these tutorials and hints.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5704450.post-73145840767415716042010-07-06T12:20:25.666-07:002010-07-06T12:20:25.666-07:00>> CC.NET
Hi Ed
Unfortunately, I did not pos...>> CC.NET<br />Hi Ed<br />Unfortunately, I did not post a CC.Net blog post, it is in the queue to be written, although someone from our team is hoping to take it up and provide a blog post soon..<br />In anycase the command line for calling packaging is "msbuild myproj.csproj /t:Package" which can be hooked into CC.Net easily so please do start with that and write back if you encounter any issues...<br />Thx<br />VishalVishal R Joshihttps://www.blogger.com/profile/05217117734084631137noreply@blogger.comtag:blogger.com,1999:blog-5704450.post-84097993705167531692010-07-06T10:14:07.604-07:002010-07-06T10:14:07.604-07:00Nice article. Did you ever post a follow-up on in...Nice article. Did you ever post a follow-up on integration with cc.net? I'd like to automate creating deployment packages for each of our environments (iTest, Staging, and Production). Thanks.Ed.noreply@blogger.comtag:blogger.com,1999:blog-5704450.post-32459386611999407192010-05-18T12:12:58.251-07:002010-05-18T12:12:58.251-07:00Note that you can have packaging done during solut...Note that you can have packaging done during solution build. For that, set DeployOnBuild=true and DeployTarget=Package. For more info see this blog post: http://zvolkov.com/blog/post/2010/05/18/How-to-Publish-Web-Site-project-using-VS2010-and-MsBuild.aspxzvolkovhttp://zvolkov.com/blog/noreply@blogger.comtag:blogger.com,1999:blog-5704450.post-35001406038353639362010-04-22T09:44:44.462-07:002010-04-22T09:44:44.462-07:00Vishal, your write ups are fantastic and have help...Vishal, your write ups are fantastic and have helped no end.<br /><br />I have got to the point where I can create a package such as:<br /><br />MSBuild "MyProjectName.csproj" /T:Package<br /><br />However I would ideally like to do this with TFS. I have edited the build definition and added<br /><br />/T:Package<br /><br />to the MSBuild Arguments option but get the errors<br /><br />"The target "Package" does not exist in the project."<br /><br />and<br /><br />TF270015: 'MSBuild.exe' returned an unexpected exit code. Expected '0'; actual '1'.<br /><br />I had assumed they were using the same MSBuild underneath so have I missed some important step?<br /><br />Any help would be massively appreciated, once again thanks for your great effort in these tutorials and hiints.Justin Wignallnoreply@blogger.comtag:blogger.com,1999:blog-5704450.post-37207673363314379092010-04-03T11:16:11.494-07:002010-04-03T11:16:11.494-07:00Vishal, I know it's a year after you wrote thi...Vishal, I know it's a year after you wrote this thread, but can you point me to any information about how to do the '1-click publish' from the command line?<br /><br />I just cannot find this - I found another post comment where you suggested to someone that adding True to a project would force VS to use msdeploy to to the publishing, and hence reveal the magic command line, but I'm unable to make this work with VS2010RC, though I might be adding it to the wrong part of the project.<br /><br />I can do packaging with msbuild no problem, but not publishing.Willnoreply@blogger.comtag:blogger.com,1999:blog-5704450.post-77747941792915381642010-01-24T19:28:45.247-08:002010-01-24T19:28:45.247-08:00Hi Vishal,
I am following your series on Web Depl...Hi Vishal,<br /><br />I am following your series on Web Deployment with VS 2010. In the previous post in this series, •Web Deployment with VS 2010 and IIS" http://vishaljoshi.blogspot.com/2009/02/web-packaging-creating-web-package.html, you said that VS 2010 uses MSDeploy to create the Web Package. <br /><br />In this post, you show how to use MSBuild tool to build a Web Package. There are somethings i dont understand and i have a few questions.<br /><br />But which tool actually creates the web package ? Can both be used for this ? What is the co-relation between MSBuild and MSDeploy? Is MSDeploy an MSBuild task ?<br /><br />I'd appreciate any respone :)TShttps://www.blogger.com/profile/05006857249420096371noreply@blogger.comtag:blogger.com,1999:blog-5704450.post-55649658474994630082009-11-23T16:59:04.656-08:002009-11-23T16:59:04.656-08:00How is this supposed to work in a TeamBuild enviro...How is this supposed to work in a TeamBuild environment? Everything I've seen seems to be based on the concept that deployments are going to be done from Visual Studio - you choose a configuration, build, and deploy. But what happens if you use continuous integration, and then the built packages are handed over to your operations team for deployment? Do you have to create individual packages for each configuration in your build?David Keavenyhttps://www.blogger.com/profile/07944978161341604262noreply@blogger.comtag:blogger.com,1999:blog-5704450.post-28536977568130669392009-04-02T14:15:00.000-07:002009-04-02T14:15:00.000-07:00There have been a few asks around using these feat...There have been a few asks around using these feature sets in VS 2008... Well in all honesty it is just set of target files and task dlls in MSBuild directories, if you could copy them then it could work... Ofcourse it is a non supported scenario :-)<BR/>There is also one more big gotcha that the task dlls are written using .NET 4.0 so without .NET 4.0 things will not work... <BR/>I would say there will be a convoluted way by which someone can make it work in VS2008 but unfortunately not supported...<BR/>Hope this helps...<BR/>-Vishal<BR/><BR/>PS: I am predicting that plugging pre-compile & merge into VS10 would be much more simpler...:-)Vishal R Joshihttps://www.blogger.com/profile/05217117734084631137noreply@blogger.comtag:blogger.com,1999:blog-5704450.post-4684025711977796522009-04-02T13:10:00.000-07:002009-04-02T13:10:00.000-07:00Enjoyed your post. Couple of questions. Are ther...Enjoyed your post. Couple of questions. Are there any barriers to doing this w/ a vs2008 setup? We currently user .msbuid/.wdproj with many assemblies and targets leading to a aspnet precompiles for deployments. I've been looking for a same of how try and combind the precompile and msdeploy task/activities.Ryan & Teenahttps://www.blogger.com/profile/12608927048477155300noreply@blogger.com