views:

18

answers:

3

So I'm left maintaining a proprietary codebase from a third-party vendor. The vendor is still sort of around, but support is limp. The site is ASP.NET.

I have made some changes but I am having a really hard time getting IIS to compile these changes in. The bin/ directory has what I believe is a precompiled dll for the core classes. I've changed these but it doesn't recompile. I have tried deleting the dll but then the app refuses to build saying that the Global.asax can't inherit the type anymore, so I don't really know how to rebuild with changes.

I spent all day Saturday setting up a build environment and trying to get a testing thing working. I have just been importing into VS2008 as a web site from the local IIS server. I got it to rebuild the app without changes, but it ignores changes I would place in it.

So I need to make a solution out of this website and/or directory structure so that I can do actual, big, full grown-up rebuilds and make changes to this codebase. Anyone know how I can go about this?

EDIT: A bit more elaboration. I've tried creating a blank project and just Add Existing File... on the whole website directory. This hasn't worked, it stops the import about 10% in.

A: 

Try these links, I suppose this is what you are looking for.

http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/01/20/linking-files-in-visual-studio.aspx

http://support.microsoft.com/kb/306234

Karthik
Thanks, the problem is not just that I want to link the files instead of copying them. I want to figure out how to create a solution around existing source code for an ASP.NET site that allows me to build in a sensible manner. Also, at least that KB article is not applicable to VS2008.
cookiecaper
@cookiecaper, sorry I thought you were looking for file linking :) but here goes the yet simple way, In the VS2008, From the FileMenu-> New -> Website, then in the "New Website" dialog select "Empty Website" and store it in some location. Then open the newly created ".sln" file in any text editor and change the path to the root directory of your source files. "Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "WebSite2", "Specify your path here",". Hope this would help you.
Karthik
+1  A: 

Keep in mind there are two (actually, three) levels of 'builds' or compiles going on here.

1) The DLLs in the /bin directory should be pre-built, by visual studio or otherwise. The content of .ASPX, ASCX, ASHX, ASAX etc fiels are not included in those.

2) The ASPX, etc files I noted above are then compiled by IIS when the first request comes in (normally; there are ways to change that behavior). That is the source of the error with Global.asax you are seeing; With the DLL(s) gone, the class that Global.asax is supposed to inherit from does not exist.

3) Then there is the just-in-time compilation, which is not relevant for this discussion.

It sounds like you may be missing the source files for the project, or perhaps the web site is not getting properly set up as a project to compile that DLL

Andrew Barber
A: 

Not sure this question is really valid anymore. The source we were working with was rather different than it should have been. Not sure if someone got angry in the past and moved stuff around or what, but grabbing a new copy of the source fixed most of our issues. I am able to build now with an included csproj.

This doesn't really help many others with the same issue I suppose, but if you are getting weird build behavior like this, you might want to start with basics, like making sure that your source checkout is valid.

cookiecaper