How can I debug XSP in monodevelop with my MVC Application?

654 Views Asked by At

I cloned the mono xsp project at: https://github.com/mono/xsp.git and built xsp in mono develop but I having trouble getting it to run. I get the same error in the IDE or on the command line. My end goal is to run my site while debugging xsp. How can I fix the error?

Handling exception type FileNotFoundException
Message is Could not load file or assembly 'Mono.WebServer.XSP, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
IsTerminating is set to True
Could not load file or assembly 'Mono.WebServer.XSP, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
  at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string)
  at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string)
  at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x0031f] in /builddir/build/BUILD/mono-4.0.1/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs:242 
  at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.XSP.Server.DebugMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x0020e] in /home/myuser/Downloads/git/xsp/src/Mono.WebServer.XSP/main.cs:166 
  at Mono.WebServer.XSP.Server.DebugMain (System.String[] args) [0x00036] in /home/myuser/Downloads/git/xsp/src/Mono.WebServer.XSP/main.cs:75 
  at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00002] in /home/myuser/Downloads/git/xsp/src/Mono.WebServer.XSP/main.cs:66 
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Mono.WebServer.XSP, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
File name: 'Mono.WebServer.XSP, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
  at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string)
  at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string)
  at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x0031f] in /builddir/build/BUILD/mono-4.0.1/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs:242 
  at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.XSP.Server.DebugMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x0020e] in /home/myuser/Downloads/git/xsp/src/Mono.WebServer.XSP/main.cs:166 
  at Mono.WebServer.XSP.Server.DebugMain (System.String[] args) [0x00036] in /home/myuser/Downloads/git/xsp/src/Mono.WebServer.XSP/main.cs:75 
  at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00002] in /home/myuser/Downloads/git/xsp/src/Mono.WebServer.XSP/main.cs:66 
1

There are 1 best solutions below

0
On

The key to the problem is that mono could not find the assembly, Mono.WebServer.XSP. I added MONO_PATH with value /home/myuser/Downloads/git/xsp/src/Mono.WebServer.XSP/bin/Debug to the environment variables of the project. With the addition of some command line parameters I was able to run my ASP.net site.