Monday, May 26, 2014

Porting an MVC4 App from VisualStudio to MonoDevelop

I recently created a demo shopping cart application using VisualStudio Express 2013 and MVC4. This meant spending some time in Windows.  But, I was quite impressed with MVC4. This is a vast improvement over the old viewstate based web apps. Plus, there is asset bundling support. This was worth the time spent using Windows.

When I was done, I wanted to log back into my Linux machine and port my project to Mono. The first thing I did was upgrade to Mono 3 and MonoDevelop 5. And then I set about porting my demo. MonoDevelop only has MVC3 templates, so first, I had to find an MVC4 template, Now I was ready to get started.

With most IDE's, you can just drop files into a folder and forge ahead. But MonoDevelop uses the VisualStudio project structure that mirrors the file system. So I  fired up MD, loaded my template, renamed it, and deleted all of the boilerplate. Then I visited each project folder, right clicked, selected Add Files from Folder, and dragged in all of the source from my original project.  This worked for everything except the Model.

Since Linux doesn't support MSSQL, I decided to use MySQL, with NHibernate for my ORM. I prefer a database first design process, so the first thing I did was update the sql script that creates my database and stored procs. Then I copied in the domain objects created by EntityFramework, changing the properties to virtual. The real work was creating the xml bindings -  but I actually prefer doing it manually, it is much easier to update than the tedious VisualStudio process of deleting and rerunning the wizard. Plus, you have much more control over the final product.

Thas is it. You can see the result at And compare the projects on github. The original VS project is at, and the MonoDevelop project is at


  1. Excellent post!!! The future of .net application development is on positive note. It offers huge career prospects for talented professionals all over the world. Training on .net technology will ensure good salary package. Best DOT NET Training institute in Chennai | DOT NET Training

    1. IEEE Final Year Project centers make amazing deep learning final year projects ideas for final year students Final Year Projects for CSE to training and develop their deep learning experience and talents.

      IEEE Final Year projects Project Centers in India are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation.

      corporate training in chennai corporate training in chennai

      corporate training companies in india corporate training companies in india

      corporate training companies in chennai corporate training companies in chennai

      I have read your blog its very attractive and impressive. I like it your blog. Digital Marketing Company in Chennai Project Centers in Chennai

  2. It was really a wonderful article and I was really impressed by reading this blog. Your technical information is very useful for me. Thanks for sharing your ideas.

    Hacking Course in Chennai

  3. Hi Admin,
    Excellent blog and its totally loaded with valid posts on Java and .Net technology. Consider including RSS feed in your blog, so aspirants like me can follow your blog easily. Dot Net Training

  4. Much thanks to you a cluster for offering this to every one of us you really acknowledge what you are discussing! Bookmarked. If you don't mind likewise look for guidance from my site =). We could have a hyperlink change contract between us! FtiOS Android

  5. I truly welcome the sort of points you post here. A debt of gratitude is in order for sharing us an incredible data that is really useful. Great day! Tinyumbrella Mac

  6. I was surfing net and luckily ran over this site and discovered extremely fascinating stuff here. Its truly amusing to peruse. I delighted in a ton. A debt of gratitude is in order for sharing this magnificent data. NessTool Download

  7. Awesome information! I as of late ran over your online journal and have been perusing along. I thought I would leave my first remark. I don't recognize what to say with the exception of that I have. Mojo Installer

  8. Your post is really awesome. Your blog is really helpful for me to develop my skills in a right way. Thanks for sharing this unique information with us.
    - Learn Digital Academy


  9. Tutu Helper is the one of the best ios,android App store to get the tons of free app

    and game. Here the latest version of TutuApp of free.
    Tutu Helper Apk
    Tutu App
    TutuApp Apk iOS

  10. cartoon hd is the best app to watch movies tv like cartoon online Cartoon HD Apk

    download noow stream App also so watch now
    Offroad Outlaws mod Apk
    Marvel Future Fight Mod APK

  11. Awesome blog. I enjoyed reading your articles.
    tutu app
    tutuapp download

  12. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. The angular js programming language is very popular which are most widely used.

    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery