Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

c# razor generator compile error with NancyFx project in VS2017 #2919

Open
kyle30542 opened this issue Aug 3, 2018 · 0 comments
Open

c# razor generator compile error with NancyFx project in VS2017 #2919

kyle30542 opened this issue Aug 3, 2018 · 0 comments

Comments

@kyle30542
Copy link

Background: I am using Vs2017 creating a c# mvc program with NancyFX based on .NET 4.6 . The website works fine but I want to use razor generator to precompile views (.cshtml) I install razor generator and generated .cs for all views.

When compile I got tons of errors saying: "The name 'Href' does not exist in the current context" in all generated.cs files.

Steps to Reproduce

  1. Setup simple Nancy.Hosting.Aspnet website in VS2017 community.
  2. Install VS extension "Razor Generator"
  3. Install nuget "razorGenerator.mvc"
  4. modify to return simple view page - home.cshtml.

@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase

<title>Good</title> ****

without this line "" all good. With this line got following error:

Error | CS0103 | The name 'Href' does not exist in the current context

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant