none
How do i add a project to my main project

    Question

  • Hello

    As you can see on this image: https://gyazo.com/1d07761129badbb327afe18dc28471a6

    I added a project called "WinApis.cs" And i didnt remember how i did it. So as you

    can see on the image, How do i add one more file? Can you write it as a 

    step by step?`plz

    Regards jens

    Monday, December 28, 2015 3:49 PM

Answers

  • According to shown title, you probably have mistakenly selected the root solution node “Solution … (1 project)”. This will add the items to solution. Since you want to add the items to project, not to solution, then select the project node, which is immediately bellow the “Solution … (1 project)” node.

    If you still cannot find “Code File”, perhaps you are using a different version of Visual Studio. Then show some details.

    Monday, December 28, 2015 5:23 PM

All replies

  • In order to add a new .cs file:

    1. Right-click the project node (which is child of your Solution). A menu will be displayed.
    2. Click “Add”.
    3. Then click “New Item…”. A dialog will be displayed.
    4. Select and expand “Visual C# Items” from left-side tree.
    5. Then select “Code”, which is child of “Visual C# Items”.
    6. In the central area, select “Code File”.
    7. Then type the name of your new file in the textbox.
    8. Press “Add”.
    Monday, December 28, 2015 4:28 PM
  • Hello 

    When i click "New item.." Its show this; https://gyazo.com/71b7406465b2f86f95b09a506574118b

    There is no "Visual C# Items"

    Regards Jens


    Monday, December 28, 2015 4:46 PM
  • According to shown title, you probably have mistakenly selected the root solution node “Solution … (1 project)”. This will add the items to solution. Since you want to add the items to project, not to solution, then select the project node, which is immediately bellow the “Solution … (1 project)” node.

    If you still cannot find “Code File”, perhaps you are using a different version of Visual Studio. Then show some details.

    Monday, December 28, 2015 5:23 PM