VS2013: Team Explorer, new team project, solutions view showing unversioned solutions - visual-studio-2013

I added a new team project, and placed the solution under source control. The source control correctly picks out all the projects, and The 'Source Control Explorer' view is correct.
However the Team Explorer View, (the 'Home' of the project), under solutions has picked up 3 solutions which where all in the same folder or sub-folder that was originally selected for the 'new team project'.
1 of the solutions is the correct solution, the same one I put under source control. 2 other solutions are showing up in that view and I don't want them to be displayed, They are in a 'backup' folder, and would like to keep them in that folder, but I do not want them showing up in the Team Explorer view.

You can change this by mapping a different workspace that excludes those folders. The team explorer is showing you every solution in your current workspace.

Related

Visual Studio, Copy files to project directory problem

I have Visual Studio community 2017. coming from eclipse it was just enough to copy file to project directory and hit refresh then files were appearing in project explorer.
In VS, however when I copy some i.e. *.cpp or *.h in windows explorer to project directory, in VS solution explorer I can not see them. switching to folder view I see but can not include them into project.
via drag&drop to solution explorer (project view) I see them but are not part of project and in folder view and actual directory there is nothing.
what is going on with VS? How can I manually copy paste some files into project while they become part of project?
I will note that there's nothing "going on" with Visual Studio in the sense that something is actually wrong with it, it's just that adding files to your project just requires you to actually add them to your solution. Essentially, it allows you to add miscellaneous files to your folders without automatically including them in your build project (for example, if you're working with some test images/files).
To add files/folders to your project you simply right click on your project in the Solution Explorer and then go to Add > Existing Item.... Then, it's just a matter of selecting one (or Ctrl + A/Shift Clicking to select all/multiple files) and then it will add them to your solution.
In the solution explorer pane, click on the show all files button,
it will reveal all files including your pasted file,
Right click on your file and select "include in project".

How to move an existing VS project between solutions?

How do I move an existing project (the project's own files, other files which the project depends on, settings (including Additional Include Directories) and all) from one solution to
a new solution which doesn't yet exist
an existing solution?
I am using Visual Studio Community 2015.
I do not want to hack .sln files; I want VS to do it properly. .sln files contain IDs which I don't understand.
Each project should retain its present project-name.
I have several projects I would like to move, each of which has dependencies which are not part of the project itself, so an easy method would be nice.
I see Visual Studio move project to a different folder but it doesn't answer my question.
No item in the Project menu is relevant (that's where I'd have thought the relevant item would be, if there were one), or any other toolbar menu, or the menu that pops up when I click mouse button 2 on the project's entry in the Solution Explorer...
Here's how I now do it --- thanks to a comment by HansPassant.
Creating a new solution
If the new solution doesn't yet exist, create it as follows:
In Visual Studio, File>New>Project
In the New Project form,
a. In the upper-left pane, choose Installed>Other Project Types>Visual Studio Solutions
b. In Name: enter the new solution's name sln
c. In Location: enter the parent directory of the new solution's directory
d. Then OK the form.
Moving an existing project, which is already in one solution, to another solution
I think of a project as being part of a solution (rather than projects being separate from solutions). Therefore, in my solutions, a project's directory is a subdirectory of that for the solution which contains the project.
Cut the project's directory proj and paste it into the new solution's directory sln
In Visual Studio, load sln (if not already loaded)
In the Solution Explorer,
a. Click mouse button 2 on the line Solution 'sln'
b. In the pop-up menu, select Add>Existing Project
c. Navigate to sln\ proj and select proj.vcxproj
d. Click Open
How come I didn't see this before? Two things. One was that I expected the function to be on a pop-up made by clicking mouse button 2 on the Solution Explorer entry for the project. The other was I had never before created a solution as such --- only ever created a project, choosing an existing solution or "Create new solution" as the case may be. Not good UI, IMO, to hid the "create solution" functionality under "New Project". Once the new solution exists, Hans's method makes the rest of the task easy.

Creating an installer for Visual Studio 2010 solutions (one or more projects)

I ran into some troubles when creating an installer for my Visual Studio 2010 solution (which has multiple projects) so I thought I'd make a quick guide to how I got it working...
Here is how I did it:
Create a new Visual Studio Installer project which is located under
Installed Templates/Other Project Types/Setup and Deployment/Visual Studio Installer.
Make sure you add it to you current solution, you can do this by right clicking on the solution name in the solution explorer and clicking Add>New Project
From there select Setup Wizard, give it a name and click OK
A wizard will open, click Next
then select Create a setup for a Windows application
then click Next again. Select all of the groups you want to include, namely: Content Files, Source Files, Primary Output
Then click Finish
In the solution explorer you will see a bunch of buttons find the one that's tool tip says File System Editor and click it. You will see three folders in the file system editor, the only one we really care about is the Application Folder. That folder is where your projects build output should be.
To add files to it if they are not already there right click > Add > File...
Note: You cannot add entire folders (which sucks) and the folder structure in the Application Folder should be identical to that in your projects build.
You should create each folder and then add the files to it.
If you have multiple projects you should set the build directory to the same folder under the release build settings. To do this, open your solution, and for each project, right click/Properties go to the Compile tab, set it's configuration to Releaseand its Build output path to some folder (same for each project) (If you have an XNA project make sure its Content Build/Configuration is also set to Release).
Now select Release from the drop down menu on the tool bar (it most likely says Debug now)
Right click on your solution on the solution explorer and click Build Solution
Now all of your solutions built files will appear in the folder you chose in the compile tab. All of these files are what needs to be added to the Setup Projects Application Folder (in the same structure)
Customise the installer: click on the project name in the solution explorer and look through it's properties, change what you want (i.e Author, Manufacturer, Title - these make a difference to the installers output directory and text)
Build the installer project (same way as mentioned above) and you are done.
Feel free to comment with questions

Visual Studio Hide selected files

In the solution explorer I have a large number of .dlls that I would rather not have shown in the Solution Explorer - just to tidy up the display and allow me to focus on the files I need to.
Q) Is there a way to hide selected files from displaying in the Solution Explorer?
First delete the references of the dlls that you want to move.
Create a new folder in your project and put all those dlls into that new folder (from Windows explorer). Then by right clicking on them in VS, select Include In Project to be sure that they are included. (If they are included successfully, Exclude From Project should be written when you right click.)
Then if you add them as reference (by right clicking References>Add) again from that new folder, you should be able to use these dlls now without any problems.
Now you can minimize the new folder to tidy up the display.

Why is TFS ignoring a project in my solution?

I have multiple projects in our solution that is in our TFS 2010 repository. I've added about 5 new projects to this solution in recent days.
I have found that for one of the projects, that the project file itself will not check-in to TFS. All of the artifacts contained in this project are working fine; they are checked in and I can see them in the Team Explorer. But I cannot see the project file in Team Explorer, nor is their an icon next to the project in Solution Explorer that would indicate its checked in status.
Also, clicking on any of the TFS related option in the context menu in Visual Studio results in those options being applied to the file contained in the project, not the actual project itself.
Can this be remedied or do I have to create an entirely new project and add all of the artifacts from the old project back into it?
Your project doesn't have appropriate Source Control Bindings! With the solution open, you'll need to go to File -> Source Control -> Change Source Control to view the bindings for your projects. The failing one probably will show an "Unknown" or not binded status. You can then use that dialog to correct the binding and check in the project file.
Appended Alternate Solution -
Navigate to the Team Explorer -> Source Control and manually add the files using the "Add Items to Folder" menu item.
You can try following steps
1 Unbind the project in "Change Source Control" dialog
2 Refresh project to update source control status
3 Right click the project and click Add the Project to source Control in solution explorer
I was faced with the same issue but the solution is slightly different than those mentioned so far. My project's contents were checked in but the project itself was not. The project's bindings were valid.
In the Team explorer's Source Code Explorer, the project files were greyed out. After a get-latest, TFS opened the Merge Conflicts screen where I could choose to keep the local copy.
After this, the project was part of TFS.

Resources