0

Compiling an ASP.Net website using aspnet_compiler.exe fails with error: /global.asax(1): error ASPPARSE: Could not load type 'namespace.className'.

I have followed all the usual recommendations to fix similar issues and it fails the same way every time:

  1. Check the references, I think all the referenced dlls are present.
  2. This is content of the global.asax file: <%@ Application Codebehind="Global.asax.cs" Inherits="namespace.className" Language="C#" %>
  3. Clean and rebuild

I have also made sure that the global.asax and global.asax.cs -where the class is defined- are in the folder where I am trying to precompile the website using aspnet_compiler.exe.

This is the command line I am using:

path_to_asnet_compiler.exe\aspnet_compiler.exe -v / -p correct_path_to_compiled_the_website_project -f -c output_path\binTemp

Any help is appreciated.

Guillermo
  • 1
  • 1
  • Did you change the "Any CPU" option (In Visual Studio IDE, right next to the Debug drop-down option) to something else? This has been known to change the directory output path for your bin folder. – Ramp2010 Apr 05 '23 at 15:30

0 Answers0