Solved

Urgent reated to MSBuild and publishing of web application projects

Posted on 2008-10-14
4
2,194 Views
Last Modified: 2013-11-26
Hi All,

I have a solution in VS.net 2008 which contains approx. 5-6 web application projects. I want to publish the web application project using command line. I can successfully build the project in debug and release mode using MSBuild but not able to publish it (mimic the publish feature in iDE). I tried to use the following command:

msbuid  c:\projectpathforcsprojfile /target:publish /property:OutDir=c:\deployPath\

After running this command, I got the following output:

Build started 15/10/2008 2:44:23 PM.
Project "project name with path.csproj" on node 0 (publish target(s)).
  Skipping unpublishable project.
Done Building Project "project name with path.csproj"
publish target(s)).


Build succeeded.
    0 Warning(s)
    0 Error(s)


Can someone help me with this....
0
Comment
Question by:RohitGupta2008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 25

Assisted Solution

by:apeter
apeter earned 100 total points
ID: 22722632
Looks like we can not publish using MSBuild. More information in below link.
http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/40bb7d32-a9ad-40d7-8113-cb3ed2747e69/

You can publish to a local computer from the IDE but not to another computer due to permission problems.
0
 

Author Comment

by:RohitGupta2008
ID: 22727089
I have already seen hundreds of similar kin do of blogs discussing the same issue but everyone just explains it with IDE as the only solution to publish web application projects. Therefore, I posted the question here.

I am still not sure how you can do it. If someone know then please help me out with this. I am really stuck at this point.
0
 

Accepted Solution

by:
RohitGupta2008 earned 0 total points
ID: 22727136
Great...I found the better solution, checkout

http://blogs.msdn.com/nmoreau/default.aspx

I also worked around the problem but with the different approach....here is the code snippet that you can use to deploy the Web application project from command line.

First run the following command on the visua studio command line ad it will deploy the WAP at the specified location (without the sources code files which is what we want)

MsBuild /p:Configuration=Release /t:_CopyWebApplication /p:OutDir=C:\DeployPath\ /p:WebProjectOutputDir=C:\DeployPath\ /p:ReferencePath="referenceToAllAssembiesUsedInTheProjectSeperatedbySemiColon" PathOfTheWAP.csproj

This command will deploy your WAP into the DeployPath dir but if you look at the bin directory there you will not find any referenced assembilies dll. To do this, run the next command as follows(checkout ResolveReferences in the following command):

MsBuild /p:Configuration=Release /t:ResolveReferences /p:OutDir=C:\DeployPath\bin /p:ReferencePath="referenceToAllAssembiesUsedInTheProjectSeperatedbySemiColon" PathOfTheWAP.csproj

0
 

Author Comment

by:RohitGupta2008
ID: 22727145
no objection....question resolved
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question