visual studio 2005 compile website - asp.net

How can I compile website (not web project) using visual studio 2005?
Whenever I compile, those dll for the website app_code is not found in my website bin folder, but instead, in a temporary dll folder (C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files).
Is there anyway for me to have the compiled dll in the bin folder?

you can use publish web site feature:
In the publish Properties, check "Use fixed naming and single page assemblies".

Related

Visual Studio 2008, Why is App_code missing from .NET folders

New to working with Visual Studio Solutions.
I normally place my Site Class file with basic functions in a folder called App_code
But noticed I created a website project in visual studio and only have options for .net folders :
App_Globalresources
App_localresources
Themes
App_Data
App_Browsers
Should I instead put my customer class files in one of these ?
Website project can use App_Code.
Web Application project doesnt use App_Code. You can just add a class. Everythign compiles as code and makes a dll file.

How to reference external assemblies from an ASP.NET web site

I need to reference external assemblies from a dozen asp.net web sites. These assemblies won't be in the GAC, but will be located in a location relative to the web site ("..\..\dlls\release").
From what I understand, Visual studio doesn't have an explicit assembly reference, or way to link a web site to an external .csproj or .dll library. (Unlike a web project).
These sites are sample projects for the open-source image-resizing HttpModule http://imageresizingin.net/.
I don't want to make users run a .bat file to copy the dlls into each /bin folder.
Is there some secret hints file I can use to let visual studio know where to look?
I'm working on dynamic assembly resolution, but that won't help visual studio at all, just hosted versions of the site.
Add the assemblies' full names to the <compilation> element of Web.config, and put them in the GAC on your dev machine.

Visual Studio 2003 vs. Visual Studio 2005

I am personally only familiar with VS 2005 and am working on a project using VS 2003. So I've downloaded the solution to my local drive, opened it and had to fiddle with IIS a bit before it would run and now I also have the website in the inetpub folder.
Can someone just explain using an overall picture what's going on. Am I editing the file in my local source safe folder and when I run the app the sites is copied it the IIS folder?
How do I publish the site, Normally I right click the solution, goto publish and fill out the form. In 1.1 should I just copy the content from my source safe folder to it's destination or copy them out of my IIS folder to the destination or secret option number 3?
Thanks guys
VS 2003 only has the "Web application" project type, not "Websites" that are available in VS 2005. Additionally, the File system website model is lacking in VS 2003.
VS 2003 requires a web application to be a configured virtual folder in IIS. It does not need to be copied to Inetpub\wwwroot folder, but it does need to be a virtual directory. So you do not need to copy the files to the IIS folder.
Lastly, VS 2003 does not have a "Publish" site option because when you build the website, all files are compiled into a single assembly. This is in contrast with the VS 2005 website model where each resource is compiled into a separate assembly allowing for dynamic compilation.
When I developed with vs.net 03, I pointed the IIS site to the same directory to where I had pulled it out of source control, so I dont have to bother copying it over whenever I do any changes, and that seemed to work perfectly well
When publishing the site, you want to copy all the files over, bar the following extensions:
.cs
.resx
.csproj
.projdata
.sln
.csproj.user
.suo
.scc
.load
.vssscc
.vspscc
Dont forget to copy over the bin directory!
In VS2005 you have integrated Web Server, so your web app can be run from any directory on the disk - ie. from your source directory. In VS2003 you can only use IIS, so you have to copy source to IIS folder. Yes, there are tricks to simplify web development in VS2003, but still the comfort of VSA2005 is much, much greater.

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.

build ASP.Net default web site error

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

Resources