How can I add a "C# File (.cs)" option under the Windows context menu : Right-click -> New?

I've tried editing the registry, and creating a new key under HKEY_CLASSES_ROOT\.cs\ShellNew and adding a "NullFile" String value in it, but nothing happens.

migrated from stackoverflow.com Oct 21 '11 at 18:21

This question came from our site for professional and enthusiast programmers.


You need a file (which acts as the template for the future 'new' actions) in the ShellNew directory, typically in C:\Windows\ShellNew - in addition to the registry entry. See the summary in this post.

To be more explicit, your registry entry (in the location you indicated, but key name of 'Filename') points to the template file you drop into ShellNew.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.