build ASP.Net default web site error - asp.net

I am using VSTS 2008 and I am using Create new ASP.Net web site and using default settings/automatically generated files.
My questions are,
How to use command line script (msbuild) to build the ASP.Net web site automatically?
I want to build the web site into a DLL which could be easily copied to target IIS server later.
Any samples or quick answer how to do these tasks in msbuild?
EDIT1: There is no sln and csproj file in the web site folder. Here is the link.
http://tinypic.com/view.php?pic=dra5jp&s=5
Here is how I create in VSTS 2008.
http://i40.tinypic.com/208zfxv.jpg

I use VS.NET 2005 and using this command to build my asp.net web application in release mode :
cd "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\"
MSBuild "C:\Projects\MyProject.csproj" /t:Rebuild /p:Configuration=Release /verbosity:quiet /p:WarningLevel=0

"Web Applications" have .csproj files, "Web Sites" do not. http://damieng.com/blog/2008/02/07/web-site-vs-web-application
You want to compile it with aspnet_compiler.exe in the bin directory C:\windows\framework\version
http://msdn.microsoft.com/en-us/library/ms178466.aspx
Easier way is to use deployment projects or the "Publish Web Site" command in Visual Studio. (Right Click on website)
http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project-support-released.aspx

Related

How to run ASP.NET MVC app using MSBuild command line

How do I compile and run an ASP.NET MVC app using nothing other than the MSBuild command line? My Visual Studio is super slow and I just want to be able to run an app quickly for bugfixes and showcasing etc. Is this possible? What's the command line for it?
MSBuild is for building your application. If you want to run your app outside of Visual Studio, you need a web server for it. I'd recommend you to publish your app on local IIS. Just point your IIS website to your Web project folder. After that you will be able to access your application from the browser without running it from Visual Studio.
You can build your project from command line. Use msbuild.exe utility for it:
msbuild.exe projectname
You can find it in one of your .NET Framework folders (I recommend you to use the latest one):
C:\Windows\Microsoft.Net\Framework\v2.0.50727\MSBuild.exe
C:\Windows\Microsoft.Net\Framework\v3.5\MSBuild.exe
C:\Windows\Microsoft.Net\Framework\v4.0.30319\MSBuild.exe
C:\Windows\Microsoft.Net\Framework64\v2.0.50727\MSBuild.exe
C:\Windows\Microsoft.Net\Framework64\v3.5\MSBuild.exe
C:\Windows\Microsoft.Net\Framework64\v4.0.30319\MSBuild.exe
When IIS is set up, you can build your app and see changes in your browser. Visual Studio is not necessary at this point.
Instead of IIS you can use IIS Express. Here is an article of how to run application on IIS Express from command line.

how to deploy the project in asp.net web application

Have create the project in asp.net web application ,then add the dbml file and Create new folder name is (urlImages) for upload. its working in local visual studio ,
how to deploy the project?
thanking you
Right click on the web project and Publish it. Than upload the published files to webserver.
You can right-click the project, click on Publish and follow the instruction in the dialog box. There are several other options
Web Application Project Deployment Overview for Visual Studio and ASP.NET
VS 2010 Web Deployment - ScottGu

How to compile a Web Site Project directly out of Visual Studio without aspnet_compiler?

I have a Web Site project and want my .aspx and .cs to be compiled. For this I am using a the aspnet compiler like this:
aspnet_compiler -v /My_Site -p c:\site_published_with_Visual_Studio c:\site_compiled_with_aspnet_compiler
This means, that I have to publish my website with Visual Studio 2010 first and then open a command line to call aspnet_compiler.
Is there a way to compile a web site project directly with Visual Studio 2010, maybe by clicking around instead of using a command line? Thanks in advance for your help!
You may use Publish WebSite wizard - Build Menu + Publish WebSite. Have a look at MSDN article - How to: Deploy a Web Site Project by Using the Publish Web Site Tool.

How to build silverlight website & create XAP's using script?

I am just getting started with Silverlight and have recently added a Silverlight project to an established solution. In this particular scenario my solution included an existing ASP.NET web site which Visual Studio kindly offered to integrated my Silverlight application into, which I accepted.
So everything is fine and all, and the Silverlight XAP is being copied to the web site's ClientBin directory when i was buiding solution through visual studio, But
I want same thing through using nant script when i am used nant script that time all project in the solution are build but recenty added silverlight website do not create XAP's in ClientBin dierctory.
I m using following script :-
target name="build" description="compiles the source code">
exec program="${framework::get-framework-directory(framework::get-target-framework())}
\msbuild.exe" commandline="MY.sln" workingdir="ProjectFolder" />
what are the ways ??
You could reverse-engineer the MsBuild scripts used to build Silverlight apps and .Xap files, the files will be located in:
C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0
Your msbuild compilation should be creating the XAP file in the Bin\Debug folder of the silverlight project. You can simply use the Nant copy task to move it to the Web project's ClientBin folder.

How do I get the "Publish Website" command to emit PDB files for my Visual Studio 2005 Web Site project?

I have a VS 2005 Web Site project (not the web application project model, the 'web site' project model) and I want to be able to include the PDB files for the page assemblies in the bin folder via the "Publish Website" command within Visual Studio to help out with debugging an issue.
No matter what I try with regard to the "Debug/Release" mode settings, I can't seem to get PDB files for the website assemblies to show up in the 'bin' folder once I've published the site. I do get them for any externally references assemblies, but not for the actual website code-behind assemblies, which is what I need.
How do I get Visual Studio to include these files when publishing using the web site project model?
The Publish command always compiles your project for release and I haven't found a way to cause the pdb files to be generated during the precompile.
There is a workaround I have tried. If when you precompile you check the box "Allow this precompiled site to be updatable" and then update the web site in place this results in a dynamic compilation. The dynamic compilation should produce debug code and pdb files if your web.config settings has:
<compilation defaultLanguage="your language" debug="true" />
Here is a good blog post about the different publish options.

Resources