Reputation: 21
I work on many legacy WebForm projects, and since VS2019 I find I will create several aspx files and populate the HTML, only to find that it has created VB versions. I have been using all versions of VS since 2002 and I have never had this problem before, as it always remembered the previously created items. I have tried deleting any and all VB template folders that I can find but to no avail.
I have VS2019 installed on 5 different machines and they all do this.
Is there any way of either uninstalling/removing VB from the templates, or forcing a default language?
It isn't a show stopper, but it is a real pain - especially when I'm on a deadline!
Upvotes: 1
Views: 254
Reputation: 74700
Do you not just right click the project, choose Add.. Web Form
..and it adds a form of whatever language the project is in?
And does it wreck anything if a VB one is added? Just change the stuff at the top of the aspx file and scrub the codebehind/replace it with c#/rename its extension:
Ctrl-A
, Del
, open some other Page.cs
, copy the 3 lines for namespace, class, maybe Page_Load (maybe usings), paste it in, tweak the class name and close }}}
; intelliformat will tidy it up..
Upvotes: 1