There seems to be an issue with the Razor Pages (2.1.0-preview1-007211) and IntelliSense in Visual Studio 2017 (15.4.0 preview 2.0) with the filenames containing dashes.
In order to reproduce:
- Create a new razor page e.g. razorpagetest.cshtml
In the code add
@{ ViewData["Title"] = "Test123"; }
Save and close the file
- Rename
razorpagetest.cshtml
torazor-pagetest.cshtml
- Save and close the file
- Reopen the file and you will see errors on the errors list (although it builds OK)
Has anyone experienced this issues? Are there any workarounds?