Well, the Summer of Code is now ended. The ASP.NET MonoDevelop addin is now open to testing, and although it doesn't look any better than my previous screenshots, it's quite a bit more stable.
If you want to build the AspNetAddIn, just build MonoDevelop from SVN with the --enable-aspnet configure option. To enable the AspNetEdit Visual Designer you will need to build and install the jscall-sharp library (available from Mono SVN) and you will additionally need the MD configure option --enable-aspnetedit. The addin will probably be in the upcoming MonoDevelop 0.12 release, although it won't be built by default, so it may be worth waiting for that.
As well as testing, I welcome bugfixing and new features. If it's something big, please check with me first to make sure that someone else is not working on it already. I personally have a load of feature additions lined up for the future, but right now I need to spend a couple of weeks sorting a lot of stuff out, including this site, and sleeping :).
The Summer of Code has been fantastic. I've gained a lot of experience of working with a large and very well-designed codebase, which I think has improved my own coding a lot. I'd like to thank my mentor Lluis, who has been more than helpful with my many MD-related questions. Thanks also to Miguel and the rest of the Mono community for their help and support; this is a great community to work in, and I plan on sticking around.
And of course thanks to Google for running such a brilliant programme. Not only am I getting paid to do something I enjoy, but most of my favourite open-source projects (Mono, Gnome, GIMP, Inkscape, OGRE and Drupal, to name a few) have gained lots of exciting new features!
Update:
Here are some known issues with AspNetEdit:
Comments
Info
You need monodevelop from svn but you also need the mono frame work from svn?
I first tried it with 1.1.16 unstable but I get compiling errors with monodevelop!
I then reverted to 1.1.13 and i complains that I need a newer version of mono
Can you help me?
Thanks for the time you put in this project!
Good job!
Info
Got it to work now but it's very unstable on my ubuntu machine.
It crashes almost instantly.
I can get the toolbox to work.
Anyway, thanks for the work you put in it
What's the exception?
It works on Ubuntu here. What's the exception you get?
I've updated the main post with a couple of known bugs.
Info
I changed from firefox to mozilla and this helps a lot.
Not only with firefox the selection dissapears but it gets unstable for me.
Mozilla works much better and stable.
Thanks for this great program.
I will search for bugs and I try to help as much as I can.
Can you already put other controls to the toolbox than the standard controls?
Kind regards
The XUL/JS addin was
The XUL/JS addin was developed for Mozilla 1.7 by Blagovest Dachev, and all I changed to make it run on FF1.5 was the installation mechanism. I really need a JS expert to fix it, but eventually I will have a look myself :-)
Most of the code for supporting other controls is in place. You can put them in the toolbox, but if I remember correctly, the designer will only be able to use them if the assembly is in the GAC. There are plenty of bugs too, as I haven't really tested custom controls much.
Info
I'm trying to aspnetedit to run.
I've compiled jscall with mozilla and not firefox
In order to get monodevelop to compile with mozilla, I had to reinstall gecko-sharp and compile it against mozilla, then monodevelop would compile with mozilla.
Is this done right this way?
But when I hit the designer button it says:
The file /content/aspdesigner.xul cannot be found. Please check the location and try again.
Thanks
Did you install the addin?
You need to either install the whole of MonoDevelop, or just the addin ("sudo make install" in Extras/AspNetEdit/chrome).
If you have done this, it could be that MD is using Firefox at runtime. Gecko# can actually run with different versions of Mozilla than the one against which it was compiled. JSCall will not, so would probably segfault, but it isn't loaded until the page loads. Try "export MOZILLA_FIVE_HOME=/usr/lib/mozilla" (or wherever Mozilla is) before you run MonoDevelop from the same terminal.
If neither of these work, could you post the output of that "make install" command?
Info
Hello Micheal,
I compiled jscall-sharp with mozilla
I compiled monodevelop with mozilla
Mozilla is installed in /usr/lib/mozilla
From terminal I point to mozilla: export MOZILLA_FIVE_HOME=/usr/lib/mozilla
From the same terminal: monodevelop
It's still using and complaining about firefox: libgtkembedmoz.so not found
Why doesn't it uses mozilla after the export?
redman@ubuntu:/$ monodevelop
2006-09-12 18:10:31,245 [-1212885312] ERROR MonoDevelop.Core.ILoggingService [(null)] - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for MonoDevelop.Components.HtmlControl.MozillaControl ---> System.TypeInitializationException: An exception was thrown by the type initializer for Gecko.WebControl ---> System.DllNotFoundException: /usr/lib/firefox/libgtkembedmoz.so
in (wrapper managed-to-native) Gecko.WebControl:gtk_moz_embed_get_type ()
in <0x00014> Gecko.WebControl:get_GType ()
in <0x00026> GtkSharp.GeckoSharp.ObjectManager:Initialize ()
in <0x00007> Gecko.WebControl:.cctor ()--- End of inner exception stack trace ---
in <0x00000>
in <0x00012> MonoDevelop.Components.HtmlControl.MozillaControl:.cctor ()--- End of inner exception stack trace ---
DllNotFound
Can you help me with problem I mentioned in the previous message?
I can get it to work with mozilla.
monodevelop won't run without libgtkembedmoz.so from the firefox directory.
jscall-sharp is compiled with mozilla.
monodevelop is also.
The manifest file is installed in /usr/lib/mozilla
exporting MOZILLA_FIVE_HOME or LD_LIBRARY_PATH doesn't help. It keeps looking for firefox!
Thanks
Patrick
Info Previous message
There was an error in my sentence.
I can't get it to work with mozilla
error
I fixed the "/usr/lib/firefox/libgtkembedmoz.so" by changing gecko-sharp.dll.config from /usr/lib/firefox/libgtkembedmoz.so to /usr/lib/mozilla/lkibgtkembedmoz.so
This brings the project page back and clear out the error message
A new problem comes up when I hit the designer button:
The file /content/aspdesigner.xul cannot be found. Please check the location and try again
However, I'm sure that the manifest file is installed in /usr lib/mozilla
See here my install output:
redman@ubuntu:~/monodevelop/monodevelop2/monodevelop/Extras/AspNetEdit$ sudo make install
Making install in chrome
make[1]: Entering directory `/home/redman/monodevelop/monodevelop2/monodevelop/Extras/AspNetEdit/chrome'
make[2]: Entering directory `/home/redman/monodevelop/monodevelop2/monodevelop/Extras/AspNetEdit/chrome'
make[2]: Nothing to be done for `install-exec-am'.
make install-data-hook
make[3]: Entering directory `/home/redman/monodevelop/monodevelop2/monodevelop/Extras/AspNetEdit/chrome'
mkdir -p /usr/lib/pkgconfig/../../lib/monodevelop/AddIns/AspNetEdit; \
cp aspdesigner.jar /usr/lib/pkgconfig/../../lib/monodevelop/AddIns/AspNetEdit/
cp aspdesigner.manifest /usr/lib/mozilla/chrome/
make[3]: Leaving directory `/home/redman/monodevelop/monodevelop2/monodevelop/Extras/AspNetEdit/chrome'
make[2]: Leaving directory `/home/redman/monodevelop/monodevelop2/monodevelop/Extras/AspNetEdit/chrome'
make[1]: Leaving directory `/home/redman/monodevelop/monodevelop2/monodevelop/Extras/AspNetEdit/chrome'
make[1]: Entering directory `/home/redman/monodevelop/monodevelop2/monodevelop/Extras/AspNetEdit'
make[2]: Entering directory `/home/redman/monodevelop/monodevelop2/monodevelop/Extras/AspNetEdit'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/lib/pkgconfig/../../lib/monodevelop/AddIns/AspNetEdit" || mkdir -p -- "/usr/lib/pkgconfig/../../lib/monodevelop/AddIns/AspNetEdit"
/usr/bin/install -c -m 644 '../../build/AddIns/AspNetEdit/AspNetEdit.dll' '/usr/lib/pkgconfig/../../lib/monodevelop/AddIns/AspNetEdit/AspNetEdit.dll'
/usr/bin/install -c -m 644 'AspNetEdit.addin.xml' '/usr/lib/pkgconfig/../../lib/monodevelop/AddIns/AspNetEdit/AspNetEdit.addin.xml'
make[2]: Leaving directory `/home/redman/monodevelop/monodevelop2/monodevelop/Extras/AspNetEdit'
make[1]: Leaving directory `/home/redman/monodevelop/monodevelop2/monodevelop/Extras/AspNetEdit'
Very sorry for the late reply
Very sorry for the late reply -- I had seen your comment but have been very busy and did not know where to begin to fix it. I am surprised that the gecko-sharp.dll.config overrides LD_LIBRARY_DIR like that -- was that a distro packaging decision?
Anyway, it's now something that I can work with :)
What version of Mozilla do you have? If you're using 1.7 it should detect to use "installed_chrome.txt" instead of a .manifest file, so if that's not there something strange is going on. I have not tested it with 1.8, but it is my understanding that .manifest files should work with 1.8 just as they do with Firefox.
Info installed-chrome.txt
Hello Michael,
I'm using Ubuntu Dapper, mozilla 1.7
I found installed-chrome.txt in /var/lib/mozilla/chrome/
Installed-chrome.txt was containing 2 lines of aspdesigner.
I copied the file to /usr/lib/mozilla/chrome and this FIXED the problem.
I don't know how it comes that installed-chrome is not located in the right place.
Appearantly it was detected by monodevelop because it was containing the lines of aspdesigner!
Now when I hit the designer button everything works. I can put controls on the webform! But if I want to return to the source code it says:
The document could not be retrieved from the designer.
Exception occurred: Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Server stack trace:
in <0x0010e> System.Reflection.MonoMethod:Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
in <0x00067> System.Reflection.MonoProperty:GetValue (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture)
in <0x0001a> System.Reflection.PropertyInfo:GetValue (System.Object obj, System.Object[] index)
in <0x0001c> System.ComponentModel.ReflectionPropertyDescriptor:GetValue (System.Object component)
in <0x0005f> System.ComponentModel.ReflectionPropertyDescriptor:ShouldSerializeValue (System.Object component)
in <0x0006e> AspNetEdit.Editor.Persistence.ControlPersister:ProcessAttribute (System.ComponentModel.PropertyDescriptor prop, System.Object o, System.Web.UI.HtmlTextWriter writer, System.String prefix)
in <0x001ad> AspNetEdit.Editor.Persistence.ControlPersister:PersistObject (System.Web.UI.HtmlTextWriter writer, System.Object control, IDesignerHost host, Boolean runAtServer)
in <0x0015e> AspNetEdit.Editor.Persistence.ControlPersister:PersistControl (System.IO.TextWriter sw, System.Web.UI.Control control, IDesignerHost host)
in <0x000d0> AspNetEdit.Editor.Persistence.ControlPersister:PersistControl (System.IO.TextWriter sw, System.Web.UI.Control control)
in <0x00375> AspNetEdit.Editor.ComponentModel.Document:Serialize (System.String designerDocumentFragment)
in <0x0002a> AspNetEdit.Editor.ComponentModel.Document:PersistDocument ()
in <0x00016> AspNetEdit.Editor.ComponentModel.DesignerHost:PersistDocument ()
in <0x0004b> AspNetEdit.Editor.EditorHost:GetDocument ()
in <0x00000>
in (wrapper managed-to-native) System.Runtime.Remoting.RemotingServices:InternalExecute (System.Reflection.MethodBase,object,object[],object[]&)
in <0x00188> System.Runtime.Remoting.RemotingServices:InternalExecuteMessage (System.MarshalByRefObject target, IMethodCallMessage reqMsg)
Exception rethrown at [0]:
---> System.NotImplementedException: The requested feature is not implemented.
in <0x0001d> System.Web.UI.WebControls.TextBox:get_AutoCompleteType ()
in <0x00000>
in (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[])
in <0x0008d> System.Reflection.MonoMethod:Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)--- End of inner exception stack trace ---
in <0x006df> System.Runtime.Remoting.Proxies.RealProxy:PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception exc, System.Object[] out_args)
Thanks for your help!
Patrick
Info Toolbox
Hi again,
The error I'm receiving: The document could not be retrieved from the designer.
Could this be because I used system.web.dll from mono 1.0? instead of 2.0?
How do I remove dll from the toolbox?
Greetz
Patrick
Glad to hear you got it working.
Glad to hear you got it working. I'm surprised that the installed-chrome.txt file location has changed -- I originally developed the code on Dapper, though I'm using Edgy now :)
That particular exception (the NotImplementedException) happens with the TextBox, because the TextBox.AutoCompleteType property from ASP.NET 2.0 has not yet been implemented in Mono. The control serialiser code iterates through all properties, so end up throwing this exception. It happens even if you have 1.0 controls in the toolbox -- the designer ends up using 2.0 assemblies because Monodevelop does.
The property needs to be implemented properly, but I've just committed an inelegant workaround to Monodevelop SVN instead, which should fix it for now. I didn't want to commit a temporary hack, but enough people have complained about this error that I just did it anyway :)
If you want to remove controls, you can edit or delete ~/.config/MonoDevelop/Toolbox.xml. I will add a GUI at some point!
Info Button
Hello,
As you mentioned before, there are controls that causes a NotImplementedException.
For example: a button on the webform causes a
System.NotImplementedException: The requested feature is not implemented.
at System.Web.UI.WebControls.Button.get_OnClientClick ()
But when I look to the mono class status page, I see that the button class is fully implemented. (http://mono.ximian.com/class-status/mono-HEAD-vs-fx-1-1/class-status-System.Web.html)
Would installing mono framework from svn be a solution? Would this fix some of the NotImplementedExceptions?
Kind regards,
Patrick
It would help a bit
I use Mono from SVN, and I don't get that particular exception, so it would probably help. However, there may be more of them lurking around -- MonoDevelop will internally use the 2.0 profile, not the 1.1 profile. I'll have a look at catching all NotImplementedExceptions, and if possible commit a more general workaround to SVN.
Workaround committed
The code should now swallow all NotImplementedExceptions on controls' properties and events.
Info Monodevelop
Thanks for fixing the NotImplementedExceptions!
I can put controls on the desgner and go back to the source code. And I can compile and run it!
Monodevelop will have to get more stable, I think. It crashes sometimes.
There are still bugs but it's certainly not bad for its first release.
Should I report bugs to http://bugzilla.ximian.com/? Or to this website? Or is it to soon for bug reporting?
How many time will you need to get it stable?
I'm very happy that soon I can switch from Visual Studio to Monodevelop.
This program rocks. Thanks for spending so much time in it!
Kind regards,
Patrick
You're welcome to report bugs
You're welcome to report bugs, preferably in http://bugzilla.ximan.com, especially crashers or anything that causes major breakage.
I'll look at minor bug reports or feature requests as well, except if they're for the designer (it's still alpha, and in need of more contributors). My focus is likely to be away from the designer for the forseeable future, because although it's a very attractive feature it requires a lot of work on the Mozilla side, and I think that ASP.NET code completion and other IDE features are probably more generally useful for the same amount of effort.
Info custom controls
Hello,
You say that custom controls should work.
For example: the Anthem Ajax controls that are compatible with mono
http://anthem-dot-net.sourceforge.net/
I add the anthem.dll with references.
I add the dll to the toolbox. The extra controls are then displayed.
When I doubleclick an item it says:
Javascript: Selecting control button1
Javascript: Outbound call to Click() button1
System.IO.FileNotFoundException: Anthem, Version=0.0.0.0, Culture=neutral : Anthem, Version=0.0.0.0, Culture=neutral
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg, System.Exception exc, System.Object[] out_args) [0x00000]
Appearantly it can not find the "anthem.dll".
Is there a solution for this problem?
Other custom controls give the same problem.
Thanx
Are the controls in the GAC?
Are the controls in the GAC? What I said was
"Most of the code for supporting other controls is in place. You can put them in the toolbox, but if I remember correctly, the designer will only be able to use them if the assembly is in the GAC. There are plenty of bugs too, as I haven't really tested custom controls much."
Don't worry, fixing this limitation is on my to-do list.
I've nailed the assembly loading
If you use MonoDevelop from SVN, the Anthem controls will now load properly. You won't be able to save the document though, as I haven't fully implemented custom tag prefixes yet.
Thanks
Thanks for the quick response.
I see that the toolbox works now with the anthem controls.
Indeed, I get a custom tag error when retrieving the document.
Thanks for putting time in it!
Patrick
Is there ASPNetEdit in MonoDevelop 0.12 rmp packages?
I would love to try ASPNetEdit, but I can't see it's on my MD. I'm using Fedora Core 5 and have installed rpm's for fc5 from go-mono site.
MD seems to going quite okey, but I can see nowhere the tools you've mad for web services.
I'll be so happy, if you give me a tip how to do it.
Thanks!
Kate
Sorry, it's not in any distributed build
Sorry, it's not in any distributed build, though it's in the source release for 0.12. If you build MD from source, you can enable the basic ASP.NET support with the "--enable-aspnet" configure option. This code will be built by default with the next release of MD, but if you want I can send you a copy.
The Visual Designer (AspNetEdit) is much more difficult to distribute: it needs a native library, JSCall#, that has to be built against FireFox, so we'd potentially have to distribute a separate version for every release of every distro! If you want to compile it from source, first download jscall-sharp from Mono SVN, build and install it, then build MD with both the "--enable-aspnet" and "--enable-aspnetedit" configure options. If you do this, I recommend using MD from SVN.
Thanks!
Hej,
thanks for very quickly response. I didn't exactly understand what could you send me, but please do it:)
I'll try to install the way you wrote me and if'it failed I write to you again.
Take care
Kate
I've put up a repository
In MD, go to Tools -> AddIn Manager.
From here, first click on the "Repositories" button, and add the http://mjhutchinson.com/files/md/main.mrep repository.
Go back to the AddIn manager, click on the "Install AddIns" button, and you should see the ASP.NET AddIn available for install. Hopefully one day the visual designer can be distributed like this too :)
Get this error message: "The
Get this error message: "The document could not be retrieved from the designer."
Could this be because I used system.web.dll from mono 1.0? instead of 2.0?
How do I remove dll from the toolbox?
Anyone?
Aloeride