Solved

Urgent reated to MSBuild and publishing of web application projects

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Latency in .net app using DB in .net 21 63
Interview questions for support of a legacy ASP.NET site 4 56
ASP.NET MVC 2 31
start a process from a service 3 22
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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 connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

776 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