I have a ASP.NET website written by someone a while ago, I don't think they used VS to build their sites but unfortunately am not sure what they did use.
I open as website and build .. no errors.
As soon as I open up any of the pages or classes the intellisense moans about nearly everything, starting with
Error 25 Statement cannot appear outside of a method body/multiline lambda.
on the using statements but literally errors on everyline. But still builds fine.
Any ideas how I can resolve this? I can still build the site but if I make any real errors I can't tell where they have come from and also I have no intellisense.
Edit-- an example if I open one of the simplest files on the site.
public partial class About : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
Master.bodyClass = "about";
Error 26 Syntax error. PATH\about.aspx 1 PATH\ 1
Error 27 Syntax error. PATH\about.aspx 1 PATH\ 1
Error 28 Syntax error. PATH\about.aspx 1 PATH\ 1
Error 29 'Class' statement must end with a matching 'End Class'. PATH\about.aspx 1 PATH\ 1
Error 30 Declaration expected. PATH\about.aspx 1 PATH\ 1
Error 31 Bracketed identifier is missing closing ']'. PATH\about.aspx 1 PATH\ 1
Error 33 End of statement expected. PATH\about.aspx 1 PATH\ 1
Error 34 Syntax error. PATH\about.aspx 1 PATH\ 1
<%@ Page MasterPageFile="~/master.master" CodeFile="index.aspx.cs" Inherits="About" %>
Visual Studio thinks that your ASPX files are VB.Net rather than C#.
Change the default language in Web.config (