visual studio cant see new project from existing code - visual-studio

I cant see this command in file menu. File->New->Project from existing files ...
there isnt it.
how can i customise visual studio to see it ?
thanks for help

I presume you have Visual Studio 2010 professionnal and above...
I see two options to bring back that menu!
Reset your settings
Customize the File menu to add up the missing command (See To add a command to a menu or oolbar.

To make a project from existing source files: if you do not have a project for them yet you need to first make a new project. This will automatically make a ProjectName.CS file; you can simply delete this file in the Solution Explorer. Then right-click on the project folder, and choose "Add...." -> "Existing item", and choose the file or files you already have.

To add an existing project to your solution, right click on the solution in the solution explorer, select Add -> Existing Project....
If this isn't what you are asking, please clarify your question. What exactly are you trying to do?

Related

How to add the currently edited file to project

In Visual Studio 2013, often I am editing a file that is not in the current project, and would like to add this file to the project. Is there an easy way to do that? The only way I've found is via right click on the project, Add/Existing Item (Shift+Alt+A), and then browse to the file I want to add in the dialog. Is there a shortcut I am missing?
This works in Visual Studio 2010:
Right-click on the document tab, select "Copy Full Path".
Project - Add Existing Item - Ctrl+V - Add.

Visual Studio 2010 Toolbox Is Empty

My toolbox is empty.
Obviously, I'm not the first. I read this question and this other question, but that didn't help.
I click here...
I get this window...
With instructions that say: "...Drag an item onto this text, to add it to the toolbox..."
Sounds good; from where do I get such items to drag?
The toolbox is empty because there is no project loaded.
The toolbox is populated with tools/controls according to the type of the current project. The controls are different for MFC than they are for ASP.NET, for example. If you haven't loaded any project, Visual Studio can't populate the toolbox.
Either open an existing project, or go to File -> New Project to create a new one.
Have you tried right-clicking on it and selecting the "Reset Toolbox" option? You can also try to manually add specific tools to it by using the "Choose Items..." option.
A common suggest is also to go into the Visual Studio 2010 Directory and delete all of the .tbd files within the following directory (Related) :
C:\Documents and Settings\Local Settings\Application Data\Microsoft\VisualStudio\10.0"
Although if neither of these options work, you will really want to consider possibly reinstalling / repairing Visual Studio.
Is your project running? I noticed that my toolbox is empty when I am debugging the project. Try stopping debugging.

VS2010 "Add Item" directory change

Is there any way to change the default directory Visual Studio 2010 uses when you add a source file through Add -> New Item?
Add New Item simply adds the item based on which project directory you're currently in or have selected in your Solution Explorer. If you want to change where it gets added then select the target location in the Solution Explorer first.
This behavior is obvious when right-clicking in the Solution Explorer, but it's also the same when using Project -> Add New Item....
Since my comment seems to be the actual answer, I repost:
In the toolbar of Solution Explorer, there's a button "Show all files" (or similar, I'm using the German version). This switches the view to directories, rather than filters. In this view, you can right-click on the desired target folder to add items.
This does not actually change the default directory, but since you have to click somewhere anyway to add an item, this is the easiest approach.
Note that even when only using Visual C++, I'd recommend the Productivity Power Tools extension, which comes with Solution Navigator. In C++, this is not as powerful as with .NET, but it still has several features that are useful in C++ and can fully replace Solution Explorer.
Try going to tools -> options -> Project and Solutions.
I know this post is old... but maybe someone will stumble upon it... like I did today...
I had the same "problem":
I have a dedicated directory for icons.
When I need to add an icon to the resource file, Visual studio takes me to "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE"
To fix the problem, after I "browsed" to the desired folder, I right-clicked the favorites of the "open file" dialog and selected "add current location to Favorites".
Next time you will get this dialog, you simply have to look for the folder in the favorites, and click it.

How to disconnect solution from source control on TFS

I have a solution with solution folder and projects.
Get the whole soure code from TFS in a local folder say c:\mycodes
Then copy the folder c:\mycode to another folder c:\lab
In c:\lab, remove all source control file *.vssscc, *.vspscc, then open the solution in c:\lab again.
Part of the project disconnect from TFS, but part of the projects in this solution still connect to TFS and some *.vssscc, *.vspscc files recreated when open the solution. Then unbind all project from server, those projects still have *.vspscc files auto generated.
I want to a clean copy of the source code with no source control. How to resolve this problem?
In Visual Studio, select the solution in the solution explorer, then go to the File menu. Under the file menu, you'll see a Source Control menu. Under that you'll see Change Source Control.
Select this, and in the dialog box that comes up, choose "unbind."
Your solution is no longer bound.
Delete *.vssscc, *.vspscc, files .
Open .sln file on notepad. Delete the code lines:
Code:
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 1
SccEnterpriseProvider = JKHJ78900-10FA-6457-4535-645676465463}
SccTeamFoundationServer = https://********.visualstudio.com/defaultcollection
SccLocalPath0 = .
EndGlobalSection
In VS-2013 from "Solution Explorer" select any solution. From FILE menu select Source Control->Advance->Change Source control.
In the pop-up window you can finally click unbind button for each project of the solution.
Took me a while to find from answer by #Robaticus. Sorry, can't comment yet.
visual-studio-2013
I often need to take solutions or projects out of TFS source control to send to clients without and source control bindings left behind. I use a utility from CodePlex to acheive the job. PLease refer to my blog post "How to Permanently Remove TFS Source Control Bindings from Visual Studio Solutions (VS2012)" http://camerondwyer.wordpress.com/2012/11/07/how-to-permanently-remove-tfs-source-control-binding-from-visual-studio-solutions-vs2012/
You must also edit the .sln file, because Visual Studio stores TFS Bindings mostly in this file, one line per project.
Err, wait. You'll still use some source control, right ? Even if I'm no fan of TFS, dropping it for no source control would be a poor move.
Visual Studio 2019
Here are the steps to be taken to "How to disconnect solution from source control on TFS".
Step 1)
Step 2)
Step3)
I had to do this, because I wanted to remove all information used by Azure Dev Ops and then post the project on GitHub.

disconnect visual studio solution from sourcesafe?

I'm working on a project for a firm that has their main solution in sourcesafe. The other developers are working like beavers on new stuff, and I'd like to be able to download the source from VSS, then disconnect it. So I can get up to speed on the code without risk of bothering anyone else's code.
Is it possible to do this? Many thanks if so.
-Larry
It's been a while since the scary days of source safe, but i believe this is what you have to do. In Visual Studio, go to File -> Source Safe -> Change Source Control (?). It'll open up a new window and list projects under current solution bound to Source Safe. Select the project you want to remove and click 'Unbind' at the top. It'll remove source safe bindings from the project. If you have to bind again, just click 'Bind' and select the location in the repository to bind to.
From How to Remove Version Control Bindings from Visual Studio Solutions at devx.com:
Close all instances of Visual Studio, and delete all the files in the solution directory that end with .scc.
Edit the solution to remove all traces of the source code controller binding. Remove the section GlobalSection(SourceCodeControl) in the solution file. Also remove the keys named SccProjectName, SccLocalPath, SccAuxPath, and SccProvider.
Why don't you just make a branch?
To unbind the solution/Project from VSS:
In Visual Studio, open Solution Explorer and select a solution or project to unbind.
On the File menu, click Source Control, then Change Source Control.
In the Change Source Control dialog box, click Unbind.
Click OK.

Resources