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 / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

No option to add class file to web site in VS2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan Silver - 18 Oct 2007 12:59 GMT
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

Signature

Alan Silver
(anything added below this line is nothing to do with me)

Juan T. Llibre - 18 Oct 2007 13:26 GMT
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.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> Hello,
>
[quoted text clipped - 7 lines]
>
> TIA
Alan Silver - 18 Oct 2007 21:18 GMT
>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

Signature

Alan Silver
(anything added below this line is nothing to do with me)

bruce barker - 18 Oct 2007 16:45 GMT
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)

> Hello,
>
[quoted text clipped - 10 lines]
>
> TIA
Juan T. Llibre - 18 Oct 2007 17:11 GMT
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.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> under program files\microsoft visual studio 8\web\WebNewFileItems
>
[quoted text clipped - 17 lines]
>>
>> TIA
Peter Bromberg [C# MVP] - 18 Oct 2007 20:38 GMT
This also fixes a slew of other issues such as certain nonresponsive keyboard
keys and so on.
-- Peter
Recursion: see Recursion
site:  http://www.eggheadcafe.com
unBlog:  http://petesbloggerama.blogspot.com
BlogMetaFinder:    http://www.blogmetafinder.com

> re:
> !> did you skip installing C# ?
[quoted text clipped - 33 lines]
> >>
> >> TIA
Alan Silver - 18 Oct 2007 21:16 GMT
<snip>
>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

Signature

Alan Silver
(anything added below this line is nothing to do with me)


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.