Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6018759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:19:16+00:00 2026-05-23T03:19:16+00:00

I tried searching a bit and didn’t find an answer. Does the Razor View

  • 0

I tried searching a bit and didn’t find an answer. Does the Razor View Engine work in Mono?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:19:17+00:00Added an answer on May 23, 2026 at 3:19 am

    Yes, it does. I have it working with mono on Linux.

    You need mono 2.10.2+ from the stable sources from
    http://ftp.novell.com/pub/mono/sources-stable/
    http://download.mono-project.com/sources/mono/

    Then, you need to localcopy these assemblies into your app’s bin directory (you take them from Visual Studio on Windows):

    System.Web.Mvc.dll
    System.Web.Razor.dll
    System.Web.WebPages.dll
    System.Web.WebPages.Deployment.dll
    System.Web.WebPages.Razor.dll

    Then, you might have to get rid of the following errors you might have made like this:

    Error: Storage scopes cannot be created when _AppStart is executing.
    Cause: Microsoft.Web.Infrastructure.dll was localcopied to the bin
    directory.
    Resolution: Delete Microsoft.Web.Infrastructure.dll and use the mono
    version
    .

    Error: Invalid IL code in System.Web.Handlers.ScriptModule:.ctor ():
    method body is empty.
    Cause: System.Web.Extensions.dll somehow gets localcopied to the bin
    directory.
    Resolution: Delete System.Web.Extensions.dll and use the mono version.

    Error: The classes in the module cannot be loaded. Description: HTTP
    500. Error processing request.
    Cause: System.Web.WebPages.Administration.dll was localcopied to the bin
    directory.
    Resolution: Delete System.Web.WebPages.Administration.dll and unreference it

    Error: Could not load type
    ‘System.Web.WebPages.Razor.RazorBuildProvider’ from assembly
    ‘System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral,
    PublicKeyToken=31bf3856ad364e35’. Description: HTTP 500. Error
    processing request.
    Cause: System.Web.Razor.dll is corrupt or missing (or x64 instead of x32 or vice-versa) …
    Resolution: Get an uncorrupted version of System.Web.Razor.dll and
    localcopy to the bin directory

    Edit
    As of mono 2.12 / MonoDevelop 2.8, all of this is not necessary anymore.

    Note that on 2.10 (Ubuntu 11.10), one needs to localcopy System.Web.DynamicData.dll as well, or else you get an error that only occurs on App_Start (if you don’t do that, you get a YSOD the first time you call a page, but ONLY the first time, because only then App_Start is called.).

    Note
    for mono 3.0+ with ASP.NET MVC4:
    There is a “bug” in the install script.
    Or rather an incompleteness.

    mod-mono, fastcgi-mono-server4 and xsp4 won’t work correctly.
    For example: fastcgi-mono-server4 gives you this debug output:

    [error] 3384#0: *101 upstream sent unexpected FastCGI record: 3 while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost:8000"
    

    This is, because after the installation of mono3, it uses framework 4.5, but xsp, fastcgi-mono-server4 and mod-mono are not in the 4.5 GAC, only the 4.0 gac.
    To fix this, use this bash script:

    #!/bin/bash
    
    # Your mono directory
    #PREFIX=/usr
    PREFIX=/opt/mono/3.0.3
    
    
    FILES=('mod-mono-server4'
           'fastcgi-mono-server4'
           'xsp4')
    
    cd $PREFIX/lib/mono/4.0
    
    for file in "${FILES[@]}"
    do
       cp "$file.exe" ../4.5
    done
    
    
    cd $PREFIX/bin
    
    for file in "${FILES[@]}"
    do
      sed -ie 's|mono/4.0|mono/4.5|g' $file
    done
    

    And if you use it via FastCGI (e.g. nginx), you also need this fix for TransmitFile for the chuncked_encoding bug
    Why do I have unwanted extra bytes at the beginning of image? (fixed in mono 3.2.3)

    PS:
    You can get the .debs for 3.x from here:
    https://www.meebey.net/posts/mono_3.0_preview_debian_ubuntu_packages/
    or compile them yourselfs from github
    Installing Mono 3.x in Ubuntu/Debian
    or like this from the stable sources
    http://ubuntuforums.org/showthread.php?t=1591370

    2015

    You can now use the Xamarin provided packages

    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
    echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
    sudo apt-get update
    

    If you need the vary latest features, you can also fetch the CI packages (nightly builds, so to say), if you need the latest (or almost latest) version

    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
    echo "deb http://jenkins.mono-project.com/repo/debian sid main" | sudo tee /etc/apt/sources.list.d/mono-jenkins.list
    sudo apt-get update
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried searching around, but I couldn't find anything that would help me out.
I tried searching here for a similar solution but didn't see one so I
Ive tried searching for hours now and cannot find out why my code (aka,
Ok, I have tried searching around for this answer, but with no luck. I
Ok, so I tried searching around first but I didn't exactly know how to
I've tried searching around for answers to this but I'm still a bit lost.
I've tried searching... a lot for the answer, but as I'm not too sure
I tried searching here , but it couldn't help me much .. I want
I've tried searching but couldn't come up with a defined way on how to
I've tried searching through search engines,MSDN,etc. but can't anything. Sorry if this has been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.