Solved

Urgent reated to MSBuild and publishing of web application projects

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
.NET 2008 VB and C# 6 39
Adding bootstrap to only Content page and NOT master page 1 52
FInd Image Control Gridview 3 23
Open a link in vb.net 2 16
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…
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…
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…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

820 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