Last post Jan 28, 2014 04:30 PM by PatriceSc
Jan 09, 2014 12:34 PM|preinsko|LINK
I am using Visual Studio 2010 on a window 7 and Server 2008 and I am editing html pages that are not part of a solution or project. For over a year I have had the same problem when I load a .html page for editing the whole page has squiggly lines and errors.
There are two specific errors.
unrecognized tag prefix or device filter 'vslawNet' //this is a custom namespace class I can deal with this error. unrecognized tag prefix or device filter 'asp' this is the one that is all over the page not a single .NET control is immune.
Because these pages are not part of a Visual Studio Solution we use the following page declarations. <%@ Page Language="C#" Debug="false" Src="~/components/service/viewSubscriptions.cs" autoeventwireup="True" Inherits="vslAdmin.ViewSubscriptions" %>
This particular page uses a code behind as indicated by the Src attribute of the Page element. There are no errors in the code behind; but intellisense doesn't work at all.
The pages have been in production for many years (12) and were original created in Visual Studio 6 and have been edited in various versions of Visual Studio with no problem until now. In fact the previous version 2008 (I think) was the version I used to
fix all the bad html. So it seems ridiculous that this version of Visual Studio would suddenly not recognize .net controls. I have looked at the editor options until I am blue in the face with nothing pointing to the problem. Understand that intellisense
doesn't work either and it used to in the earlier versions of Visual Studio (.net not 6). I am not a big fan of intellisense; but at times it is handy to have when I forget a property method signature. Of course when I turn off validation; by deselecting
show errors then I don't even see the normal html errors. I read somewhere that the build configuration might be the culprit; but the setting they referred to does not apply to Web pages.
Is there a add-on that is supposed to be installed? Which seems a little stupid since .NET is the main platform; but I need to ask the question. I would like to convert the web site to a Visual Studio solution (assuming that will solve the problem); but I
don't have the resources for a project of that magnitude. I have three web sites with hundreds of complex pages and I am the only .NET developer in the company so you see the problem.
I have tried using Visual Studio Express and while it doesn't have the validation errors it also doesn't provide intellisense for asp elements or code behind objects.
Thanks in advance for any answer you may provide.
Jan 09, 2014 05:54 PM|markfitzme|LINK
There could very will be an error such as an imbalanced tag, binary character, etc.. that is in the file that is throwing off the editor. Also, since it has a .html ending, VS would not automatically parse it as a .aspx page. The editor in VS 2010 is different
than previous versions so that could be part of it. The lone .html page is not being treated as a .aspx page and the editor may not be using any of the features for editing a .aspx page. There may be some setting within VS 2010 that would enable this though
I have no knowledge of one, and do not have VS 2010 installed currently.
Jan 09, 2014 06:34 PM|preinsko|LINK
Excuse me the page is .aspx I don't understand where you got the idea is it .htm. We have been able to create .aspx and .cs code behind pages since the before Visual Studio supported .NET. Your answer is not accepted.
Jan 10, 2014 04:44 AM|Tear09|LINK
We have been able to create .aspx and .cs code behind pages since the before Visual Studio supported .NET.
What do you mean before VS support .net?
Jan 13, 2014 02:41 AM|Starain chen - MSFT|LINK
Could you reproduce this scene in a new project?
If so, please share this new project to us.
About share the file in the SkyDrive, please refer to:
Jan 13, 2014 01:51 PM|preinsko|LINK
No the problem does not come up when the web page is part of a Visual Studio project it only occurs when the .aspx pages are not in a project. These web sites are over 10 years old and were built and maintained using only the .Net framework (beginnning
with 1.x to current 4.x). My company could not afford to purchase VS in 2001 so for 10 years we never used VS. We recently merged with another company and now use VS; but web sites are too complex to convert to VS project that easily.
Last Friday I began the task of converting one of our web sites to VS Project and I decided to do a test. I loaded one file from the project as a stand alone without loading the solution and I loaded it's corresponding non VS page. When both pages are
loaded VS recognizes the .Net html elements and actuall suports intellesense; but it has no idea about the custom classes. BTW I did not have the solution file loaded. Is it possible that just by building a project in VS something changed in the configuration?
I think the page declaration has something to do with it. If a .aspx page is part of a VS Project/Solution than the code behind page is referenced as CodeBehind="<pagename.cs>". If the .aspx page is not part of a VS project/solution you reference the code
behind as Src="<pagename>". However, if a single .aspx has inline server code instead of code behind the VS doesn't recognize the custom classes.
The problem is in suport for non VS projects. We were assured that Visual Studio would not be required to build .NET sites, all that was necessary they told us in 2001 was .NET Framework. So is this still true or not?
Thanks in advance,
Jan 13, 2014 02:02 PM|preinsko|LINK
Visual Studio .NET was released in 2002 and .NET Framework Beta was first relased in 2000 (unless you count NGWS). Those of us who were studying and learning .NET were using other editors, I was using Visual Studio 6 (1998). Most likely you were not around
in 2000-2002 when .NET was in it's infancy.
Jan 28, 2014 08:04 AM|Puneeth-MSFT|LINK
Please try out the below things and let me know the behavior.
Specifically checking for HTML: open the VS project , under Tools->Options->Text Editor-> HTML make sure Auto list members and parameter information are checked?
As you said the issue occurs only when .aspx is NOT part of Solution, check if there is any reference in any other files
Did you try running VS in admin mode?
Try running VS in safe mode to rule our the third party dependency issues by running "devenv.exe /SafeMode" in run command
Try restoring VS default setting and try to open VS in admin mode
Try devenv.exe /resetuserdata from visual studio command prompt
If above options doesn't work then we need to have a sample to reproduce this.
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Jan 28, 2014 11:12 AM|Puneeth-MSFT|LINK
Also, could you please let us know the exact version of VS2010 ?
Go to, VS->Help->About Microsoft Visual Studio and use Copy Info to get the details.
Jan 28, 2014 04:30 PM|PatriceSc|LINK
What if you create a test web site with a test page ? Does it have the same problem ? If yes, it would point to a VS issue.
If not you could perhaps copy a page, simplify it as much as you can (but still have issues) and then post this so that others can look at a short exact sample showing the issue and perhaps finding the exact culprit (could it be this custom namespace stuff