2

If I write an asp.net mvc 3 application, using .net 4 classes. Maybe some f# codes, also. Will I be able to host it on linux(mono)?

2 Answers 2

1

You can always try to use MOMA, because it's never really recommended to run apps that you developed for .Net on Windows directly through Mono, it might not give the exact expected results. Make sure that you checked for compatibility using MOMA before doing anything.

More about MOMA

Sign up to request clarification or add additional context in comments.

Comments

0

As long as you use the latest version of mono it works pretty well. Note that depending on the linux distribution you are using you may need to build mono from source rather than using a packaged version.

However, you need to make sure you test everything on mono during development. While pretty much everything in .net 4 is possible in mono, linux and windows are very different platforms, so there will always be some things that need to be handled differently. Also, there are a few things where .net and mono have slightly different implementations. For example setting a value in a dictionary while iterating over that dictionary will work in .net but cause an exception in mono - it's trivial to work around, but not the sort of thing you want to be tracking down in a hosted app if you don't have a good mono development environment set up.

2 Comments

So if I run unit tests on mono, will that gurantee that my code works if they all pass?
Assuming you have the right tests, yes. I have TeamCity set up on a linux vm, which works quite well for that. You'll also want to have the site set up for manual testing though - you are unlikely to have 100% test coverage on views.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.