Skip to content

Razor Language Service does not appear to work with cshtml files in fsproj project #5085

Closed
@TheJayMann

Description

@TheJayMann

I have noticed for a while now that when attempting to use Giraffe.Razor to make views for a Giraffe web application, the cshtml files themselves have no intellisense or formatting outside of basic html. After playing around a bit with adding ProjectCapability elements directly to the fsproj, I noticed if I add CSharp as a project capability and reopening the project in Visual Studio (as adding this capability tends to crash Visual Studio the moment a cshtml file is open, or immediately if one is already open), the cshtml file now gets basic razor formatting in addition to the html formatting, but no csharp intellisense, and all fs files only get basic fsharp formatting with no intellisense.

I would like to request that somehow Razor Language Service could somehow be made to work for this situation. Having the design time editor treat the files as simply html files with no knowledge of how the razor or csharp bits work makes the use of Razor templates nearly worthless to me.

Metadata

Metadata

Assignees

Labels

area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-razor-pages

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions