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

  • Home
  • SEARCH
  • 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 4557946
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:34:48+00:00 2026-05-21T17:34:48+00:00

I am creating my type in FSX and passing those types into the Razor

  • 0

I am creating my type in FSX and passing those types into the Razor templating engine with the open source RazorEngine project.

Hosting Razor outside of ASP.NET requires compiling the Razor templates. If I pass a model created in FSX into the template, will System.CodeDom be able to have access to that type created by FSI? The basic error that I get is “The type or namespace name ‘FSI_0004’ could not be found”.

  • 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-21T17:34:48+00:00Added an answer on May 21, 2026 at 5:34 pm

    Code that’s compiled using System.CodeDom cannot generally have access to the code loaded in F# Interactive – the CodeDom essentially writes the C#/F# source code to disk and then invokes the command line compiler on the code (and the command line compiler cannot reference code loaded in F# Interactive).

    There may be a way to get it working though – You could use the F# CodeDom provider from PowerPack. You could modify it to generate the source code (as it currently does) and then send the generated code to F# Interactive (instead of invoking command line compiler). This way, the code compiled on-the-fly could see F# Interactive code.

    There are some issues that need to be resolved

    • Is it possible to provide your own CodeDom provider to RazorEngine?
    • The F# CodeDom provider may not correctly handle code generated by Razor (so you may need to fix/workaround a few things in the F# CodeDom provider). You may also need to modify it to generate code that works nicely with F# interactive (e.g. remove top-level namespaces)
    • What instance of F# Interactive do you want to use? (And how to get standard input, so that you can send your code there)
    • Do you need to load the compiled assembly and pass it back to Razor? I’m not sure if this can be done with F# Interactive.

    These all depend on your scenario – but I guess that it may be possible to get what you want (possibly with some workarounds).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking into creating type-safe generic controls. This is targeting the (reduced) generics
I'm creating a Connect Four-type game in Xcode for a class project and am
When creating a type to serialize/de-serialize into xml, what do I use in place
I'm creating some object types dynamically using type function. Ex return type('DynamicType', (object,), dict)
I have run into an issue when creating a object type in Oracle 10g
I am creating a type converter for use in a in-house library that should
I am currently creating a type of classifieds website, and when the user enters
I'm creating a utility type application with a main and flipside view, and an
I'm creating a notepad type of application which has the tab functionality. I have
I'm hoping there is a better way to the following. I'm creating a jigsaw-type

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.