Thursday 12 March 2009

error ASPPARSE: Could not load type 'Global'

I'm working on an ASP.Net 2.0 project using VS 2005 and so I thought I'd take the opportunity to try out the Visual Studio 2005 Web Deployment Projects (WDP).

All went well up until the point I tried to build the deployment project. The build failed with the "error ASPPARSE: Could not load type 'Global' " error. I looked for a solution on the Web and It turns out that Asp_net compiler wants a "bin" folder with all the dll references inside the project (the one you are tyring to build). After some more research I found the answer to my problem.

There is an element in the wdproj file (the MSBuild file created by the WDP) called 'SourceWebPhysicalPath'. This contained the value '..\PDR' (where PDR is the name of my Web application). Using a text editor to change this value to '..\PDR\bin' fixed the problem. The complete element is <SourceWebPhysicalPath>..\PDR\bin</SourceWebPhysicalPath>

No comments:

Post a Comment