views:

91

answers:

4

I have an ASP.NET application which I'd like to try running on Mono, just as an experiment. When I bring the application as it is to Mac, start xsp2 on the directory, it runs as I would imagine it should. That is, it crashes on because of the file system path differences (\ vs / in directories).

This is where I would like to open it in MonoDevelop and fix the problems. But since it was website, it doesn't have .csproj file. And it seems that there's no .sln file either, since Visual Studio stores those to some random directory by default. In Visual Studio you could open the project with Open -> Web site... -> Local IIS etc., but I see no such thing in Mono.

Is there a way to open a directory as a web site or somehow generate the .csproj file? I would prefer an answer which won't need Visual Studio or even Windows to help me with that.

A: 

Create a new project in MonoDevelop and import the files into it.

Simon
That's what I thought first, but the problem is that "Add Files..." dialog doesn't allow selecting directories. The project has probably about hundred directories containing various app related things and reproducing the directory structure one by one is way too manual.
joukokar
+4  A: 
  • Create new project in MonoDevelop in the same directory as your files.
  • Right click the project in the solution window
  • Choose Display Options -> Show All Files
  • Right click a file and choose Include to Project

You can select multiple files at a time (shift or ctrl click) and include them all at once, or include full directories.

jpobst
A: 

One option to avoid changing your application settings is to use Mono's built-in path remapping feature, basically do this:

$ MONO_IOMAP=all
$ xsp2

For more details you can read:

http://www.mono-project.com/IOMap

miguel.de.icaza
+1  A: 

Unfortunately you can't open WebSites in MonoDevelop. WebApplications are supported in MD, but WebSites aren't. Michael promised yesterday that he will explain why, you can ping him to touch this topic quicker.

Some more information is available:

Probably, in the long run, the best solution for you will be to migrate from WebSite to WebApp.

silk
Insightful information. I didn't know about difference between WebSite and WebApp. I think that might be the problem, since running or building it gives also mysterious problems... but that I might post another question for those.
joukokar