Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aspnet_compiler ASPParse Could Not Load Type

I am unable to build my Web Application (not Web Site) in our build environement. We use DMAKE in our build environment (this unfortunately is non negotiable, therefore using MSBUILD is not permitted ) and when invoking the asp.net precompiler through

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler -d -nologo -p Site -f -fixednames -errorstack -v / Debug

We get the following error

error ASPPARSE: Could not load type 'X.Y.Admin.Site.Global

If I compile from the ide it is successful. If i then compile with aspnet_compilier it is successful. So i only get a successful compile with aspnet_compiler when the target dll i am trying to compile is in the bin of the web application i am compiling.

I keep running into postings that talk about solutions using MSBUILD which unfortunately I cant try.

Any help would be appreciated

like image 501
F.A.B Avatar asked Nov 21 '08 21:11

F.A.B


3 Answers

We had the same problem on our web application: error ASPPARSE: Could not load type '...'

The problem was that we had the file on disk (on the project folder) but it wasn't included in our application project (in the .csproj file). We solved the problem by including the file in the project :)

like image 179
Costin Avatar answered Nov 04 '22 01:11

Costin


I ran into a similar problem using NANT. The trick was to compile the web applications code files into a dll then include that when using aspnet_compiler.

use the command line compiler,either csc.exe (c#) or vbc.exe (visual basic), to compile your web application with an output of type library. This will create a dll that you can use in your aspnet_compiler task

like image 4
hansolosuperstar Avatar answered Nov 04 '22 02:11

hansolosuperstar


Have you tried specifying the path using -p? Sounds to me like it can't find that type / assembly.

http://msdn.microsoft.com/en-us/library/ms229863(VS.80).aspx

like image 2
pbz Avatar answered Nov 04 '22 01:11

pbz