Add existing project to blank solution in source control - visual-studio-2012

I am trying to put several existing projects in one blank solution. This solution plus existing projects then need to be added to TFS source control.
Is there any way to achieve this? I simply am not able to find out how to get this done. Adding the project to a blank solution is relatively easy. Except it only places references to the existing project, rather than adding the files to the solution.
So when checking-in at sourcecontrol, it does not recognise the projectfiles as they do not get added to the solution, just references.
How can I get this done?

I managed to figure it out.
Add projectfiles of the project to be added to the solutiondirectory.
Add a reference to existing project (the one now in your solution directory).
In Windows Explorer, rightclick on the projectmap you just added and navigate to "Team Foundation Server" --> "Add".
The showing messagebox will describe which files will be added (they should be ONLY projectfiles, no bindirectory or anything).
Then reopen the solution in Visual Studio and the project should appear to be in source control.
Edit: The changes to show up in the pending-changeswindow, you just have to add them manually. They should show as "detected". Select these to be promoted and you should be able to check them in.

Related

Rename Android Studio project causing a bunch of errors and java files missing

Following some links here I tried to rename a project. I went to c:\path\to\AndroidStudioProject and renamed the folder there, then found the .idea file and changed that. Now the project loads but java files are missing! However, on clicking java (in the bar at the top), then com I can see them each with a small red j.
I then looked in module Gradle build where there were 3 files, one with the new name and 2 older ones which stated that they did not belong so I deleted them, copying the compile info into the new one. Naturally on doing a Sync Now I get a bunch of errors.
Why does this have to be such a complex operation? Can anyone assist?
After you rename the folder, open the project in Android Studio. From there, right click something that needs to be renamed (e.g., module, package names, etc.) and use Refactor->Rename from the context menu. Keep doing this until everything that can be refactored is.
You will need to manually change the value of applicationId in the app-level build.gradle. Obviously, things like #string/app_name will also have to be changed manually. I recommend making these manual adjustments from inside Android Studio rather than directly editing the files. That way you'll know immediately if you break something.

Visual Studio 2012- How do you delete a new file?

I have Visual Studio 2012 with TFS. I created a new file (call it "x.h") and before I checked it in I decided I didn't need it.
MSDN makes it sound so simple:
In either Solution Explorer or Source Control Explorer, browse to the folder or file that you want to delete.
Select the items that you want to delete, open their shortcut menu, and choose Delete.
When you are ready, check in your changes.
So I went to Source Control Explorer, right-clicked the file, and chose Delete. It was removed from source control and my pending changes but is still on disk and in the Solution Explorer. When I right-click the file in Solution Explorer, Delete is not an option and Exclude From Project is disabled.
I might have more luck if I check it in first then delete it but that seems very unnecessary. Hopefully I'm just missing something obvious!
How do I delete this new file ("x.h") from my solution?
Yep. It was something obvious.
You can't delete files from the Solution while it is building.
I just tried again and the Delete option magically reappeared. I realized that it has stopped a build since I last tried.
In short, there are three different angles that a user can try to delete a file while a build is occurring and the behavior is different for each.
Undo the file add from Pending Changes -> Nice error messages are given.
Delete the file from Source Control Explorer -> It lets you remove the file as I described in the question but leaves it on disk and in Solution Explorer (same behavior regardless of whether or not a build happening).
Delete the file from Solution Explorer -> It quietly prevents you from shooting yourself in the foot and doesn't explain why.
The right way to do this is to cancel the build (or let it complete), then delete from Source Control AND from Solution Explorer.

visual studio 2010 not opening projects

i just installed visual studio 2010 and it is not opening any projects .I can make projects but i can not add any file in it and also it is not opening recent projects.
I am stuck here , kindly cooperate with me!
OK, sounds like the installaion got munged up.
first obvious questions: do you have any code that has actually been saved?
If "yes," copy that code to an alternate location, and use the simplest solution: use the Windows Control Panel to deinstall the MSVC instance and reinstall. If no code saved, just de-install and reinstall.
That's the obvious answer. You may also check the location for the project files, and the settings Visual Studios uses.
from the toolbar, click "tools".
From the drop-down list select "options"
Within the displayed list, scroll down to "projects and solutions"
expand that list (click on the little "+" box)
3 locations will be displayed.
Make sure you have write permission to all three locations
all the check boxes should be selected. Especially the one marked "save new projects when created"
click "OK" to accept the changes

Visual Studio 2012 not recognizing all pending changes?

I'm working in TFS with my team for project and the problem occurs when I'm trying to make new modeling project for my classes, it doesn't show up in pending changes.
So here is how I go:
First I enter my folder where I keep my classes. I've tried from there many combinations: I've tried first right-clicking on my folder and putting "check-out for edit" and then continued to * (see later); next I've tried clicking on .csproj of my classes so I activate my project when I'll be adding modeling project and then moved to *; last I tried to activate whole solution of our whole projects which is connecting them and then to moved to *.
None of it worked. (I was always having last version)
here is what I did next for all the possibilities:
I went to Architecture -> New diagram (named diagram and left create new project) -> Create (then windows shows up for creating new project in which folder and I always select my folder where I keep my classes).
After when that was done, I went to check to "pending changes" in Team Explorer, because there should be some available since I created already Modeling project. But there was none. Since I couldn't do it like that, the last solution how I made it was by right-clicking to Source-control Explorer on my project and going to Add items to folder and selected my project which was created locally where I wanted it to be created.
But, this last solution was giving me errors while trying to open my modeling project after. I know I should activate first modeling project, so I clicked to .modelproj and while clicking to it, it was giving me this "notice" or rather "warning":
The solution you have opened is under source control but not currently configured for integrated source control in Visual Studio. Would you like to bind this solution to source control now?
--
What am I doing wrong? Why solutions are not integrated by default while creating my project (my friends are doing it automatically, they don't need to right-click in Source Control Explorer to add item to be able to see pending changes)?
I hope I made myself understandable.
It looks like your solution binding is broken. Either click yes on the question to bind your solution to source control, this is information that must be stored in the solution file and while Visual Studio does see that the folder is mapped to source control, it also sees that your solution isn't (did you check the add solution to source control checkbox when you created it?)
Optionally try opening file -> Source Control -> (optionally) Advanced -> Manage Source Control. You can select project in your solution individually and then click the bind button on the toolbar to bind them to sourcecontrol manually.
I had a similar issue and, in my case, the solution was to right click on my project and choose Source Control->Go online. Apparently I must have somehow been switched to the offline mode.
I have successfully checked in files from source control explorer instead of solution explorer in this case. Then after that it has worked again
VIEW > Other Windows > Source Control Explorer
Other way to do it:
File--> Source Control --> Advance --> Change Source Control.
In the window displayed select all the projects you want to bind to the TFS
I had the same issue and solve it by clicking:
File -> Source Control -> Advanced -> Refresh Status
In VS2013+, you can check if your solution is online. In my case, due to VSO service outage, my solutions went offline. I had to open the solution, File > Source Control > Go Online.

How to add an external project to Xcode 4?

I am stuck with an issue of including an project in Xcode 4. I have all the document but it works with Xcode 3 and not Xcode 4.
How to add ZXingWidget.xcodeproj to my project in Xcode 4?
In Xcode 4, you're mostly meant to create a new Workspace to which you can add multiple projects. From the main menu: File > New... > New Workspace...
Once you create your new workspace, drag the Xcode project files into the project navigator of the newly-created workspace. Drop the first one anywhere in the project navigator pane but be careful to note the insertion pointer when you drop the second one. Advice: Drop it beneath the entire first project but with your pointer as close to the left edge of the project navigator panel as you can get. This makes sure you're not inserting a project into another project.
In this way, you get all the benefits of a workspace (automatic dependencies, etc.) without changing the structure of the projects themselves. Then you simply open the workspace rather than the individual projects within it.
Despite that this question had been asked months ago, here is a great resource directly answering it. It worked flawlessly for me (even though I had ARC turned on for the main project I was importing it into).

Resources