Visual Studio 2022 Community cintrols greyed out

John Simon 1 Reputation point
2022-08-27T18:18:33.347+00:00

I installed Visual Studio 2022 Community a few weeks ago and was off to a decent start. Then I went to add a button to my form and the button object is greyed out. I cant drag it to my form. In fact all ibject in the toolbox are greyed out

My questions are:

1). Why are they all greyed out?
2). And more importantly how do I fix it?

I am only writing apps to practice different methods and to get comfortable with the IDE.
I thought that was what the Community version was for?

What am I missing?

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,252 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,602 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Albert Kallal 4,651 Reputation points
    2022-08-27T23:55:30.987+00:00

    I can copy and paste buttons on an existing form, just not add then in a new project.

    Ok, so it DOES work for a existing project you have. But in a 100% DIFFERENT project, then you are finding things work different!

    This VERY much suggests that you creating a different kind of project, and thus you get/see a different experience.

    One of the challenges with visual Studio? Well, it is a BEYOND amazing system, but that beyond amazing comes with a price! You can create windows software. You can create a command line text only project (console).

    So, Visual Studio is the MOST amazing Swiss Army knife - it can do almost ANYTHING!!!

    You can create phone applications.
    You can create .net core applications.
    You can create asp.net .net framework (MVC)
    You can create asp.net framework web forms (Webforms).
    You can create add-ins for Office.

    And more!!!

    So, it can be quite a challenge to pick and create the correct kind of project here.

    To be fair, vs2019, and now 2022? They done a fantastic job of when you hit new project, you are now entering the lobby of choices - about as many as there are flavors of ice cream!! - it is truly amazing!!!

    Note:
    I have not installed vs2022 as of yet (dragging my feet - I have some concerns about some of my x32 bit software, and vs2022 is the FIRST version that is x64 bits.). I will soon, but vs2019 vs 2022 should not really feel much different.

    So, file->new project.

    I suggest then you use the filter (drop downs) on the right side.

    For my taste today, that means I will choose Visual Basic, Windows, Web.

    You now should see this:

    235493-image.png

    As I noted, a bloatload of choices - VERY easy to pick/choose the wrong one!!!

    So, from above, next

    Note that the defaults should be ok, but take VERY close attention to the .net frame work you choose here.

    So, this:

    235470-image.png

    Now then this:

    235476-image.png

    Now, I have circled some options. So, I in general don't develop with https, and set that up on the actual web server at deploy time.

    Also, in above, I did not want a site with logons. Do feel free to select this item if you goal is a web site with logons, but for this testing - and trying? I suggest you turn off both https, and choose no logons ("No authentication").

    You can also choose a empty web site - but it rather bare bones, and that assumes you are quite up to speed in setting up things like bootstrap, jquery, and a main menu bar (master page) etc. That can be a lot of work, so working template as I show above is about the best choice.

    But, you could choose the "empty" site if you looking to JUST try + test a web page.

    Ok, so with above, we hit create, and we now have this:

    A simple site with a few pages, a master page (with menu bar), like this:

    235512-image.png

    So, we can open one of the existing pages, or create our own new page.

    Lets add a new page to the project - like always, then right click on the top project, and choose add -> new item.

    Like this: (right click where the arrow I put), so then this:

    235483-image.png

    So, now we get a list of choices of what to add to the project like this:

    235369-image.png

    The default name of WebForm1 is just fine.

    And now we have this:

    (I will drag a button from tool box to the form).

    235420-image.png

    so, try creating a new project, follow above. This should result in a working project, and one with web forms that you can drag + drop controls from the toolbox to the web form.

    Regards,
    Albert D. Kallal (Access MVP 2003-2017)
    Edmonton, Alberta Canada

    0 comments No comments

  2. John Simon 1 Reputation point
    2022-08-28T14:40:26.137+00:00

    First off I would like to clarify. When I open an existing ptiject all the tools in the toolbox are greyed out. If I want to add a button I have to cooy/paste an existing button (or other control).

    VS 2022 does not give the option for .net 4.8. Only .net 6.0.

    I have approximated your instructions and regradless what I choose all contols in the toolbox are greyed out.

    I am uninstalling this software now. If it doesnt work, why have it installed?

    Thank you for trying.