Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / November 2005

Tip: Looking for answers? Try searching our database.

VS2005 treats C# .cs files as vb?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason - 11 Nov 2005 02:35 GMT
I'm doing a test project of our C# Web solution from VS2003 to VS2005 using
the final RTM.  All of our code is C#.

After the solution upgrade runs, I try to build and get about 50 errors I
need to fix.  Fine, no big deal.

However, when I click on one of the source files (an aspx.cs for example)
the IDE reports about 150 additional errors on just that file - mostly syntax
errors.  All of the code has wavy underlining.

I think the IDE is interpretting my C# code as VB.NET.  The default language
in machine.config is C#.  I've set the default text editor in tools-->options
for .cs files to be C#.

These syntax errors do not show up during a build, only when I go to edit
the file.  When I compile the output window clearly shows the C# compiler
being used.  I did not even install VB.NET when I installed VS2005.

Is there a way to turn off the syntax checking during edit, or at least
force it to use the right language?  This is very frustrating.
Mikhail Arkhipov (Microsoft) - 11 Nov 2005 05:08 GMT
On 11/10/05 18:35, in article
64D3DEDE-56E9-48B0-8FF7-195A7213C874@microsoft.com, "Jason"

> I'm doing a test project of our C# Web solution from VS2003 to VS2005 using
> the final RTM.  All of our code is C#.
[quoted text clipped - 16 lines]
> Is there a way to turn off the syntax checking during edit, or at least
> force it to use the right language?  This is very frustrating.

VS IDE does not pick up language from machine.config. You have to specify
language explicitly in the page directive. Sorry about this limitation.

Thanks
Mikhail Arkhipov (Microsoft)
-- This post is provided 'AS IS' with no warranties and confers no rights

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.