Solved

Urgent reated to MSBuild and publishing of web application projects

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now