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 开发者_如何学Pythonin 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.
- 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.
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:
- http://mjhutchinson.com/journal/2008/08/15/web_application_projects_md_and_vwd
- http://mjhutchinson.com/journal/2007/06/04/rethinking_asp_net_project_models
- http://mjhutchinson.com/journal/2006/06/10/asp_net_project_models
Probably, in the long run, the best solution for you will be to migrate from WebSite to WebApp.
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
Create a new project in MonoDevelop and import the files into it.
精彩评论