I have an existing ASP.NET 4.6 application that I was successfully editing though VS2017.
We recently updated the site to .NET 4.7 and C# 7. The Microsoft.Net.Compilers and CodeDom packages are installed correctly and the website itself works perfectly! My problem is that Visual Studio does not. It doesn't recognize any directives, nor anything
asp.
<%@ Page language="c#" %>
In this case, "Page" is highlighted and the error is "Validation (HTML5): Element 'page' is not supported." The same is true for @Master, @Import, @Control or any other directive in
any other file on the site. I also get the "Unrecognized tag prefix or device filter 'asp' errors by the zillions, even though other tagPrefixes defined in web.config are fine.
I am at a loss as to why it would be trying to interpret <%@ %> as HTML instead of a directive. To reiterate, the web app works fine. I can even open up the pages in
design view without generating an error. I can build the site without any issues. This
only occurs in source view. I have tried everything I can find. VS2017 has been fully updated to 15.2 and repaired. The ReflectedSchemas and other caches have all been cleaned out and rebuilt...
if possible for you then for testing purpose, try to remove the latest update and move to the previous one.
if the issue is solve then we can say that update cause this issue.
so you can temporary work using the older update and when new update get launched then you can try to move to that new update.
it is possible that in new update this issue get resolved.
Regards
Deepak
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
None
0 Points
14 Posts
VS 2017 Does Not Recognize Page Directives After Roslyn Update
Jul 31, 2017 10:57 PM|JoelDKraft|LINK
I have an existing ASP.NET 4.6 application that I was successfully editing though VS2017.
We recently updated the site to .NET 4.7 and C# 7. The Microsoft.Net.Compilers and CodeDom packages are installed correctly and the website itself works perfectly! My problem is that Visual Studio does not. It doesn't recognize any directives, nor anything asp.
In this case, "Page" is highlighted and the error is "Validation (HTML5): Element 'page' is not supported." The same is true for @Master, @Import, @Control or any other directive in any other file on the site. I also get the "Unrecognized tag prefix or device filter 'asp' errors by the zillions, even though other tagPrefixes defined in web.config are fine.
I am at a loss as to why it would be trying to interpret <%@ %> as HTML instead of a directive. To reiterate, the web app works fine. I can even open up the pages in design view without generating an error. I can build the site without any issues. This only occurs in source view. I have tried everything I can find. VS2017 has been fully updated to 15.2 and repaired. The ReflectedSchemas and other caches have all been cleaned out and rebuilt...
Any suggestions?
Contributor
2990 Points
1210 Posts
Re: VS 2017 Does Not Recognize Page Directives After Roslyn Update
Aug 01, 2017 08:10 AM|Deepak Panchal|LINK
Hi JoelDKraft,
if possible for you then for testing purpose, try to remove the latest update and move to the previous one.
if the issue is solve then we can say that update cause this issue.
so you can temporary work using the older update and when new update get launched then you can try to move to that new update.
it is possible that in new update this issue get resolved.
Regards
Deepak
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.