No option to add class file to web site in VS2005

A

Alan Silver

Hello,

I have just noticed that when I choose to add a new item in VS2005,
there's no option to add a .cs file to the web site. It doesn't metter
which folder is selected when I click Ctrl-N, there's no option for
adding a class file.

I tried running "devenv /installvstemplates" based on advice I saw in
another forum, but this didn't help.

I know I can just add a text file and change the extension, but I would
be interested to know why this is happening, and how I can fix it.

TIA
 
J

Juan T. Llibre

Try resetting your development settings.

"Tools", "Import and Export Settings", "Reset All Settings".

Save your current settings, if you want to,
and choose "Web Development Settings" as the final choice.
 
B

bruce barker

under program files\microsoft visual studio 8\web\WebNewFileItems

you will find a template file folder for csharp, vb and vjsharp

inside are the template files for each language. somehow you are missing
the c# one (did you skip installing C#).

switching to web application won't help as it uses the same template files.



-- bruce (sqlwork.com)
 
J

Juan T. Llibre

re:
!> did you skip installing C# ?

If the OP can create a C# project, he must have installed C#.

Maybe the project is a VB.NET project ?
No C# class file can be added, if that's the case.

If C# support is installed, and the project is a C# project,
and the template files are in VsInstallDir\web\WebNewFileItems,
he should regain the ability to add C# files by resetting VS's web settings.
 
A

Alan Silver

inside are the template files for each language. somehow you are
missing the c# one

Nope, there is a file called Class.cs right there.
(did you skip installing C#).

Nope, I only use C#, and have done so ever since installing VS2005.

Thanks anyway
 
A

Alan Silver

Juan T. Llibre said:
Try resetting your development settings.

"Tools", "Import and Export Settings", "Reset All Settings".

Save your current settings, if you want to,
and choose "Web Development Settings" as the final choice.

Thanks Juan, but it didn't help. I still don't have the option to add a
class file.

Any other ideas? Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top