Visual Studio project is loaded information - visual-studio-2010

So I am working on a solution with a lot of projects with multiple developers using SVN. There are some projects that are specific for me that I want loaded but for others they might not be relevant.
So my question is, where does Visual Studio store information about a project begin loaded and what is the proper way to commit project/solution settings with out ruining it for others?
An example could be that I just added a new project to the solution and I want to commit these changes, but I don't want to commit whether or not a project is loaded/reloaded (Since other developers have to reload them again).
EDIT: I found the answer here When I unload projects in visual studio, where does VS save this setting?

When you add projects to a solution, they will get loaded when the solution opens.
If using source control, if such a solution is updated and contains new projects, they will get loaded.
One way of dealing with this is to create multiple solutions - solutions that only have relevant projects. These solutions can be part of source control, but don't have to, though if you don't add them to source control you risk having projects in source control that only you have a solution reference to.

Related

Change Bindings on TFS project

I wanted to add a solution to a project, but accidentally added a solution to the wrong Team Project.
Before adding the project, I made a copy locally. I then deleted the project in Source Explorer and ran a checkin. This deleted the code from the local drive.
I then restore the code from the local copy. Opened the solution and removed the bindings from the Change Source Control form.
The issue I have is every time I try to add the solution back to source control, it is automatically added to the first project. Is there a way to pick the project you add a solution to?
You didn’t completely remove TFS Bindings.
There is a tool to remove Source Control Bindings from Visual Studio Solutions and Projects from msdn: http://blogs.msdn.com/b/saveenr/archive/2012/08/11/a-tool-to-remove-source-control-bindings-from-visual-studio-solutions-and-projects.aspx
More ways and more information for you reference: How can I completely remove TFS Bindings

How to find usage of code when projects are NOT added into one solution under visual studio 2010

I have a ASP.NET project that consists of many C# libraries in addition to the web project. The problem (for some reason) is that all projects that make up the web application are NOT added into one solution within a same visual studio. Instead, most projects are separated within individual visual studio. All projects are stored in source control, and shared by other developers.
Thus, the question is that how to find usage of any code, like "Find Usage" via Resharper. Is there any tools or tricks that allows me to do that like Resharper's Find Usage.
Any advice?
It looks like you're in something of a bind. My suggestion would be to simply make your own source control branch, and in that branch, you can create a new SLN file, add all of the projects, replace their binary project references by project references and then call Find Usages. Then, if you need to do any changes on the basis of Find Usage info, simply merge those in without merging PROJ or SLN files.
If these library projects are referenced as DLL files rather than the project references the only way is to open all the one-project solutions and search there by 'text'. There are some tips/tricks, which could simplify navigation a bit.
P.S. The situation you described looks far from convenient. I agree with Dmitri - you might consider to discuss with your team to switch onto referencing projects rather than using binaries. Once you switch each developer will be able to create local either solutions with the projects involved, or maybe you will agree on new common source controlled solutions.

How to open two Solution in one Visual Studio IDE?

I am working on two different solutions, say, Solution1 and Solution2. As these two solutions are dependent upon each other, I have to open two separate Visual Studio while developing.
It is really difficult to switch between these Visual Studio. I can't merge these two solutions into one as Solution1 is being used by other projects and all are part of Source Control.
Just wondering, can I open both solutions in the same Visual Studio IDE? I searched a lot but no luck. Any suggestions on existing VS AddIn or how to develop it would also be helpful.
Visual Studio version - 2012 Ultimate
Source Control - TFS
Create a third Solution C than includes project from both A and B: you can keep C as a local file i.e. you don't check it in version control if this can disturb the team.
Else you can open two instances of Visual Studio and switch at need: VS is smart enough to sense file system changes, but you have to be careful in saving before switching.
Does it have to be within the same IDE instance?
You could right click the VS icon in the task bar, select "Visual Studio 20__", and you will have two seperate instances of VS. You can then open separate solutions in both, without merging the two under one solution.
This will eat up far more resources, however. The previous responses are preferable.
What you are asking is impossible and extremely dysfunctional.
The supported solution would be to add all of the projects from Solution B to Solution A. Then you can open a single solution with all of your work. If you want compartmentalisation within your solution you can use solution folders.
If you can you should have a separate solution for the core components and package them as a nuget package. Both of your other solutions can then take a dependency on that single shared package.
open the solution 1 and right click and add the second solution. When you close the VS next time it will told you once to save the sln file. Do it for saving the settings in sln file.
Now everytime you will open sln1 will show you both project. It will not affect if you only move first project to pen drive or move to another computer. In case of 2nd project missing it will told you that 2nd project not found no more worries.
In case of Source Control - TFS I can't confirm how it work but their is some sollution for github (Which maybe hint anything for TFS).
The same trick can be applied but you don't need to push modified sln so this will not break anyone else's settings. If TFS store the files and code on the file system that you currently working then you can applied same trick to do applied this trick to that TFS project which is stored in your file system.
1.open solution1 in visual studio 2012 .
2.Right click on solution1 ,add existing project option.
3.select the solution2 .
4.Now solution1 and solution2 file are same project.

Visual Studio Bindings - Bound and unbound sc in different solutions

I have a dev team that is split in mentality of using visual studio source control bindings. Half would like the integration and half would not. Is there a way to add a solution only binding setup so each team could use a different solution based on their preferences?
There is no painless solution to this problem. The reason being that Microsoft made the monumentally bad decision to embed source control information into .NET solution and project files.
Let's say Dick wants to use the SCC plugin and Jane doesn't. Dick adds a project to version control via the plugin and information like this will be written to the solution file:
GlobalSection(SourceCodeControl) = preSolution
SccNumberOfProjects = 2
SccLocalPath0 = .
SccProjectUniqueName1 = someApp\\someApp.csproj
SccLocalPath1 = someApp
EndGlobalSection
and some garbage like this will be added to the project(s) files:
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
In addition, some files will be strewn about the project folder tree (MSSCCPRJ.SCC files in the solution and project folders, a *.vssscc in the solution folder, and *.vspscc files in the project folders).
The extra files are not a problem as long as Dick doesn't check them into source control (although the plugin is always going to want to check in those .vssscc and .vspscc files). However, the source control information that gets written to the solution and project files will always be an annoyance for Jane. Whenever she opens the solution, she will be nagged by this message:
and then this one:
Should she choose the option to "Permanently remove source control association bindings", the source control information will be removed from the solution and project files and she will be happy again. However, Dick's SCC plugin won't work anymore and he'll probably rebind the projects to source control and an office riot will ensue.
To sum it up, you can share .NET project between those who use the SCC plugin and those who don't, but one or more parties are going to have to endure some annoyances because Microsoft decided to add source control information to .NET project files (such a bad decision, this wasn't a problem in Visual Studio 6).
I'm not absolutely sure if I got you right. I assume that half of your team wants to use the Visual Studio plugin to access Perforce and the other half doesn't.
This is possible. You have to make sure to never check in the MSSCCPRJ.SCC file created by the plugin. This is the local bindings information and will not work on everybody's workstation.
On the other hand side, the *.vssscc files can and should go into Perforce.
Using the plugin has one big advantage, though: The plugin knows which files to check in and which to omit. Especially when adding new projects, it's a common mistake to forget to check in the newly created files when using the Perforce visual client instead of the plugin.
You have to make sure to never check in the MSSCCPRJ.SCC file created
by the plugin.
I removed *.scc files but Visual Studio prevent me use others Source Controls Plugin's except saved into solution and project files.

Is there a way to have one project build another in Visual Studio?

We are finally getting a source control system in place at work and I've been in charge of setting it up. I've read that it's usually good practice to not include binaries in source control so I haven't. However, we have two all-purpose utility projects (each in their own solution) that generate utility .dll's which are included in almost all of our other projects (all each in their own separate solutions). We add references to the utility dll from our projects.
I would like to have our solutions set up in such a way that if the reference dll isn't built, the solution will build the dll for itself, much in the same way a make file checks for its dependencies and builds them when they're out of date or missing.
I'm new to build processes with VS so try to keep the answers simple. Any links to general build process overview tutorials would be great too. Googleing for VS references returns a bunch of how-to add references links which is not exactly what I want.
Answer: (3 step process) Add a project reference, not a binary reference by right clicking on the solution, and adding an existing project. Then under the project tab, select project dependencies and modify the project so that one project depends on another. Finally, delete any old reference to the binary and re-add the reference using the project tab in the Add references dialog box.
Where I work we typically have project references rather than binary references (as we used to a while ago). When you include a project reference, the dll will build along with the rest of your app.
The only time we go back to binary references is when we are in between Visual Studio releases (e.g. 1 project is in 2010 and everything else is in 2008. The 2010 project will have to use a binary reference for a couple of months until everyone else catches up... Project incompatibility seems to be a Visual Studio limitation that shouldn't exist).
EDIT
To add a project reference right click the solution and click Add and finally "Existing Project." Make sure that the utility projects are also under source control, and make sure that the workspaces are set up correctly or other people will not be able to open up the projects correctly!

Resources