When I added a whole solution in TFS, it didn't add one dll, I then have to add it manually.
Is there something that prevents it from doing so ?
How did you add the solution? The Add Items button will exclude a number of items through the filters you see in the dialog. There are two tabs there : Included & Excluded. When adding things to source control this way, you'll need to check the excluded tab for anything caught by the filter like 3rd party libraries.
If you used Add Solution to Source Control, I'm not entirely sure. If the dlls were in a project or a solution folder they should have been added. Again, if you give more details (step by step) I can help a little more.
Considering only 1 DLL was rejected out of several, it sounds like a TFS bug. I know don't be shocked... there are actually a few of these.
For example, I have text files get removed from my solution when I use "undo checkout". Unfortunately that problem is unpredictable, so no fix yet.
TIP: Always diff your solutions and projects before you check them in.
As Ryan said when adding to the repository certain filers are applied, e.g. you have to explicitly add dlls to the repos. See this
The problem is that you have binded the project to IIS. And IIS block access to some DLLs.
If you using Visual Studio 2012 and you can't add the files to TFS just exclude a file, add to repository, include file and check in.
Related
As in subject:
Go to "Find Changeset" option.
Find a changeset.
Double-click on changeset to open Changeset Details window.
It gives a list of all files that have been checked in within given changeset.
Why I cannot apply a label on those files from that level where I have them all in one place? Especially, that very often they are part of different solutions and projects, so normally I would have to create a label for one file and then search and add one by one to the existing one.
It is so inefficient!
Is it some bug or lack of functionality? If the second - it is hard to believe MS guys forgot about such handy function.
How do you deal guys with such situation?
EDIT - to clarify my reasoning:
If I use jessehouwing's method - yes, it works and it's simple.
But then when I search in the future for that label and want to see what code was included, it gives me a list of all solutions - even those totally unrelated (IWP and PDPRO are the unwanted ones):
If I use it my way - it gives me that:
I think it looks cleaner and gives directly the information of what solutions and files underneath where included at the time when I put stuff into Production environment and applied corresponding PROD label.
The feature you're looking for doesn't exist. generally a single file or group of files at a label doesn't make a lot of sense. While it's possible to "scope" labels in TFVC, it's only possible through the commandline.
generally you'd create a label at the repo or branch level at the specified changeset. That will include all files, including the ones you just checked in. Creatign such label is relatively easy from the source control explorer, though you need to copy the changeset number:
It's unclear to me why you'd only want the changed files to be included in the label, maybe you can elaborate a little more on that requirement.
Update: What you desire isn't possible from inside VS and isn't simple from the commandline either. I suppose that with a bit of Powershell Magic against the TFS Client Object Model you can do this from the commandline and it should also be possible to build this as a Visual Studio Extension (or maybe suggest it to the author of the TFS Source Control Explorer Extensions.
Is it possible to add an existing project to a solution in "read-only" mode?
I got access to a big bunch of internal projects, from which I just need some functions for another solution. Since I'm new to the original solution I'd like to make sure I don't accidentally change any of the existing files and check them into the TFS.
The easiest way to do so, would be some sort of "Add existing project (read only)"-Function.
Is there any way to do so? Or are there any other ways to ensure I'm not accidentally changing any of the existing files?
I'm using MS Visual Studio 2013 Professional.
Copy the source controled version to a seperate folder, and then reference that one from you Solution. your not working with source controlled code then , so you can't break it!
I am using Visual Studio Online. I have projects which have common code that I use across a number of different solutions in different TFS projects and I also have some files which are linked from other TFS projects in some of them. In order to be able to access them all, I've changed the Workspace config so that I have just mapped $/ to a particular folder.
The problem is that I just checked in a change in one project and noticed that it also checked in a change in a completely unrelated one that wasn't part of the solution at all! How can I configure things to be able to access everything that I need to without cross-checking-in files from unrelated projects (and without having to manually exclude/include files in every check in)!?
EDIT: I've noticed that this doesn't seem to have happened again on my last couple of check ins when I also had items from other projects checked out. Wondering what caused it.
You should look at a NuGet solution for this. If you are using VSO you can use the new MyGet integration with an automated build process. If you create an automated build for the shared project output that is packaged in a NuGet package you can create a NuGet repository ion MyGet to provide it to your other solutions.
Once you have that, if you then change the shared code and check in, the build and package will kick off and deploy your new version of the package. Your other solutions will then prompt you to update automatically. You don't even need to check in the dependent assemblies as you can use NuGet Package Restore to make sure your local and build server get the right versions.
It sounds like a lot of work but once you get up to speed it only takes a few hours of investment to configure for anything you want to share or deploy in this way.
In the Pending Changes section of Team Explorer, in the Included Changes section there is a drop down. If it's set to "Show All" you'll see changes pending for all your solutions. If it's set to "Show Solution Changes" you'll just see changes pending for the current solution. (My guess is that it was set to "Show All" when you checked in your changes and that's why you got changes from other solutions checked in.)
I have a core project and several sub projects. I link to files in the core project for the sub ones. I righted clicked my csproj and said existing file > add > link. Here is how my project looks:
Here is a picture of my Windows Explorer:
When I check in, I receive this error:
Could not find file C:\Users\joe_a84\Documents\JMASoftware\QuickBooks\Main\Source\Platform Support\NOP\Source\Versions\nop265\Nop265\Module\QuickBooksSettings.cs
The file does not exist there because it is linked. How can I tell TFS that it's a linked file?
There is the following question which states that symbolic links are not supported in TFS 2008 or TFS 2010. Symbolic links in TFS 2010 Source Control?
However, I did find the following ancient blog post which seems to show how to do it for TFS 2005: http://blogs.msdn.com/b/ericlee/archive/2006/07/20/sharing-files-in-team-foundation-server.aspx
That said I would highly recommend that you simply don't do this.
If you really need to share a file between projects then you should be using the branching functionality built into TFS. Typically you don't want just a single code file due to namespace and assembly generation concerns. It is much cleaner, and certainly easier to maintain, by having a separate project for those artifacts that are passed around. This way you either branch the entire assembly project; or just refer to it in it's normal place.
This is a local file level linking by another project. There is only one file at a specific subfolder. Other projects can link to the file via this approach. The problem with this approach is that from TFS viewpoint, you cannot tell if a file is shared by other projects. A good practice will be to keep such files in separate folder with name like Common or Shared etc.
People who have been using File linking across branches in Source Control would have to change their approach quite differently.
Linking between files in TFS is pretty simple. You just open the "Add existing item" dialog and search for the file you want to link in your local workspace. If you would click "Add" now Visual Studio would create a copy of the file in your projects directory. What you do instead is to choose the other option (you have a little drop down menu on the button) and add the item as a link. Thats it.
I faced the same problem. I just did undo on the file which was showing this error in the TFS Pending Changes window and checked-in. This undo did not remove the link that was added in the project. Make sure you do not undo the project file.
I have a solution. I select get the latest, it does not....
I have a folder that has 3rd party dlls. These are not gotten. Instead I have to go into my source control browser and get the latest. Programmers forget to do this and their code breaks.
How can I get the latest directly from the solution?
The source control interface in the solution explorer is very poor. I'd recommend using the source control view instead.
The reason that tfs doesn't get all the files when you get latest on the solution explorer is that it only considers files in the solution. If you use the source control view instead, you will get all the files with no messing about.
The other option is to add all the files to your solution. Right click in the solution explorer and add existing file. In the file browser, choose the file and then click the arrow at the right end of the open button to drop down a menu - choose add as link so that the solution references the file where it is rather than taking a copy of it.
You can use "Get Specific Version" and specify "Latest". Also specify to overwrite files that haven't changed.
Perhaps you could add the DLLs directly to the solution in their own solution folder. Then Visual Studio would know about them and pick them up with the rest of the solution.