# How to Publish a Web project with Finalbuilder

**URL:** https://www.finalbuilder.com/forums/t/how-to-publish-a-web-project-with-finalbuilder/1656
**Category:** Discussion
**Created:** [November 29, 2010, 8:34am UTC](https://www.finalbuilder.com/forums/t/how-to-publish-a-web-project-with-finalbuilder/1656 "2010-11-29T08:34:37Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![davincij](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/53a042/32.png) [@davincij](https://www.finalbuilder.com/forums/u/davincij)
#### Post date: [November 29, 2010, 8:34am UTC](https://www.finalbuilder.com/forums/t/how-to-publish-a-web-project-with-finalbuilder/1656/1 "2010-11-29T08:34:37Z")

</div>

This should be simple in the Visual Studio 2010 I can right click my project and select "Publish..." I publish it to a folder on my computer and all the files created by that feature are the files I wish to deploy in my install.&nbsp;&nbsp; Is there a way to do this in finalbuilder?

If not is there a work around to accomplish the same thing?

Thanks

Davinci

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [November 29, 2010, 11:15am UTC](https://www.finalbuilder.com/forums/t/how-to-publish-a-web-project-with-finalbuilder/1656/2 "2010-11-29T11:15:10Z")

</div>

Hi Davinci,   
  
 Unfortunately the web site ‘Publish’ function in Visual Studio has been implemented in the VS IDE and is not available from the command line, which means we can’t call it from FinalBuilder. You will need to first use the MSBuild action to compile the web application, this will put the binaries and the content files in an output folder, then you can use other FinalBuilder actions to copy or upload the files to the web server.   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![davincij](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/53a042/32.png) [@davincij](https://www.finalbuilder.com/forums/u/davincij)
#### Post date: [December 1, 2010, 5:39am UTC](https://www.finalbuilder.com/forums/t/how-to-publish-a-web-project-with-finalbuilder/1656/3 "2010-12-01T05:39:05Z")

</div>

Thanks for the reply I wanted just the files needed to run the web project in another folder so my install program will grab them.&nbsp; I guess I have to build that manually I'll have to exclude code files and debug files, include script files and images.

It sucks but if that's what I gottah do I'll take the time to build a batch program or vbscript to do this for all of my diffrent we applications.

Thanks for responding.

Davinci

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [December 1, 2010, 5:47am UTC](https://www.finalbuilder.com/forums/t/how-to-publish-a-web-project-with-finalbuilder/1656/4 "2010-12-01T05:47:36Z")

</div>

Hi Davinci,   
  
 I am using FinalBuilder to do something very similar to what you are trying to do. I’m using MS Web Deploy to publish my web sites. You can do this by specifying DeployOnBuild=True as a project property when building. This will generate a script to deploy the web site. It will be a .cmd file. Then, all you have to do is execute the file and it will publish your changes to your web site.   
  
 If you want more specific info, just let me know.   
  
 Thanks,   
  
 Nick

---

<div class="post-metadata">

### Author: ![davincij](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/53a042/32.png) [@davincij](https://www.finalbuilder.com/forums/u/davincij)
#### Post date: [December 1, 2010, 8:07am UTC](https://www.finalbuilder.com/forums/t/how-to-publish-a-web-project-with-finalbuilder/1656/5 "2010-12-01T08:07:02Z")

</div>

Thanks Nick

That's very close to what I am looking for, I thought I had it doing exactly what you said using DeployOnBuild=True and PackageAsSingleFile=False it worked once and created a folder in the obj\Release\Package\.&nbsp;&nbsp; This created all the files I was JUMPING FOR JOY because that’s what I wanted and have been working to get this in a command line for what seems like forever.&nbsp; However when I tried to move it to another folder by changing the project property "Location where Package will be created" under the tab "Package/Publish Web"&nbsp; it stopped working even after I reverted the code.

  
  

Strange eh?&nbsp; I work in a virtual machine because this happens more often than not so I'll roll back to an older snapshot.

  
  

Every notice Nick it's the simplest thing you want to accomplish cannot be done.&nbsp; I mean how hard is it to reproduce the feature of “Publish to a directory” from the command line, I'm not asking it to go over the web, I'm not asking to push to IIS, I just want to build it to a folder.&nbsp; I feel like an idiot.

I'll keep working at it for a bit long if you could provide any assistance in accomplishing what I can do in the GUI at the command line I would greatly appreciate it.  
If I figure it out I’ll add the command line here.  
  
Thanks again.  
Davinci  
&nbsp;

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [December 1, 2010, 10:06am UTC](https://www.finalbuilder.com/forums/t/how-to-publish-a-web-project-with-finalbuilder/1656/6 "2010-12-01T10:06:35Z")

</div>

&nbsp;Hi Davinci,

&nbsp;

Assuming you've got a 'web application' project and not a 'web site' project, building the project using MSBuild will move all the files required to the run the website, including aspx, images, stylesheets, etc to a single location. I've attached an example project, have a look in the 'Output' folder after running the FinalBuilder project and you'll see a '\_PublishedWebsites' folder, this folder contains all your site files.

&nbsp;

Regards,

Paul.
[001\_Project.zip](https://www.finalbuilder.com/forums/uploads/default/original/2X/5/5faa6817d5a6afa9e2912a01c113afdc9f3c1b0c.zip) (156.126 KB)

---

<div class="post-metadata">

### Author: ![davincij](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/53a042/32.png) [@davincij](https://www.finalbuilder.com/forums/u/davincij)
#### Post date: [December 2, 2010, 5:29am UTC](https://www.finalbuilder.com/forums/t/how-to-publish-a-web-project-with-finalbuilder/1656/7 "2010-12-02T05:29:26Z")

</div>

Thanks Paul,

I found out what I need to do and figured out some of the pit falls.

http://www.digitallycreated.net/Blog/59/locally-publishing-a-vs2010-asp.net-web-application-using-msbuild#Comment23

---

<div class="post-metadata">

### Author: ![bbrewder](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/b/b5ac83/32.png) [@bbrewder](https://www.finalbuilder.com/forums/u/bbrewder)
#### Post date: [December 15, 2011, 2:53am UTC](https://www.finalbuilder.com/forums/t/how-to-publish-a-web-project-with-finalbuilder/1656/8 "2011-12-15T02:53:46Z")

</div>

In case it helps anybody, I have a MS Build action in FinalBuilder that will create the folder with just the files needed for deployment.   
  
 Here are the properties I set in the MS Build action property dialog…   
  
 Project File: MyProject.csproj   
 Targets: Package   
 Project Properties:   
 \_PackageTempDir: DirectoryToPutFiles   
 Configuration: Debug or Release   
 AutoParameterizationWebConfigConnectionStrings: False (needed if you use web.config transforms)   
  
 The build action is followed by a “Create Zip File” action where I put the contents of “DirectoryToPutFiles” into a zip file and then I put that into the folder where I put my build artifiacts.

---

<div class="post-metadata">

### Author: ![samc](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/9de053/32.png) [@samc](https://www.finalbuilder.com/forums/u/samc)
#### Post date: [September 6, 2013, 2:40am UTC](https://www.finalbuilder.com/forums/t/how-to-publish-a-web-project-with-finalbuilder/1656/9 "2013-09-06T02:40:05Z")

</div>

> Posted By [Brian](https://www.finalbuilder.com/User-Profile/userid/4369.aspx) on 14 Dec 2011 07:53 PM  
> In case it helps anybody, I have a MS Build action in FinalBuilder that will create the folder with just the files needed for deployment.   
> 
> Big thanks mate. Worked perfectly first go!
