Problem with Development

G

Guest

We have an application developed originally by a third party developer (who
is out of the picture now). The application is a combination of several
projects, a web service, and a web site application. The application was
written in VS2003 and C#. Upon receipt of the application, I converted to
VS2005. I have managed to remove all of the references from the compiled
DLLs and replace them with references to the project code, except for one:
the web application. When I attempt to remove the reference to the DLL
produced by the web application, I can no longer compile the web application
(it is looking for the namespace created in the web application). This is
the error I receive:

Error 1 Could not load type 'MyPortal.Intranet.Global'.
C:\Inetpub\wwwroot\development\MyPortal\Global.asax 1

I have tried to recreate the issue with a brand new project, but cannot do so.

How do I remove the reference to the DLL from the web application, yet still
compile the project?
 
G

Guest

I'd start by removing the global.asax from the web project. It may not have
had any code in it anyway. If it did, you can add a new one and try to
reconstruct it.
Peter
 
L

Laurent Bugnion

Hi,

Lucas said:
We have an application developed originally by a third party developer (who
is out of the picture now). The application is a combination of several
projects, a web service, and a web site application. The application was
written in VS2003 and C#. Upon receipt of the application, I converted to
VS2005. I have managed to remove all of the references from the compiled
DLLs and replace them with references to the project code, except for one:
the web application. When I attempt to remove the reference to the DLL
produced by the web application, I can no longer compile the web application
(it is looking for the namespace created in the web application). This is
the error I receive:

Error 1 Could not load type 'MyPortal.Intranet.Global'.
C:\Inetpub\wwwroot\development\MyPortal\Global.asax 1

I have tried to recreate the issue with a brand new project, but cannot do so.

How do I remove the reference to the DLL from the web application, yet still
compile the project?

Open the file Global.asax in a text editor (NOT the code behind, the
asax file itself). On top of the file, you'll see how the code-behind is
referenced. My guess is that your file uses "codefile" to reference the
CS file, but the CS file is not found. If that's the case, you must use
"publish" to deploy your site, in order to include the class in the DLL.
Or, you can remove the "codefile" attribute and reference the type using
the "inherits" attribute only.

Another possibility is that the type referenced is wrong, that happens
sometimes when you change the namespace in the code-behind, but forget
to update the front-end files.

HTH,
Laurent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top