Solved

Urgent reated to MSBuild and publishing of web application projects

Posted on 2008-10-14
4
2,218 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

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

691 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