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!
Related
Add-Migration generates new files but doesn't include them into TFS source control - they are invisible for Check-in operation and are shown without lock sign on Solution Explorer.
Is there the way to solve it?
P.S. This all happens in project Sdk="Microsoft.NET.Sdk" style. The question can be asked in more wide form: is there a way to "pick up" new files (created without Visual Studio) and include them to TFS automatically?
Have you added the project/solution to source control? You need to add the solution to source control first, after that the new generated files will be detected automatically within the workspace.
Tested on my side and cannot reproduce this issue. Could you provide a sample project for further troubleshooting if that still not work?
I would like to create three separate ASP.NET MVC solutions, all pointing to the same Model project. How do I keep changes made from one solution update the others?
Ex, is there is way in Visual Studio to "Add new project from Source Control" like you can with a whole solution?
So you are hoping to have 3 solutions that share a common project.
You can achieve this in 2 ways.
NuGet
Have the project in it's own solution and create a NuGet package of the output, your other solutions can then consume the NuGet Package.
Shared Project
A shared project is easy to do, just ensure that your shared project is available in the same workspace as your solutions.Do a get latest, You can then just right click on the solution and choose add existing project.
Any changes you make will need to be checked back into source control, these changes will then appear in each 'copy' of the project in each of the different solutions.
The shared project works fine, but you may have to make some considerations when you come to building the solutions, the main one being that if you only make a change to the shared project would you want all of the solutions that consume it to be built on check-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 TFS server and I often work from two places. I'd like to have a folder that I just keep my random PSDs, mockups, etc in. Maybe even text file notes, or whatever.
The problem is, when I "Check in" a project, it only includes files that are included in the solution. Is there a simple way to have a folder always included?
For instance right now I just have a "mockups" folder in the root of my Team Project (above any individual project folders), but it's not part of any project or solution (I don't really want to publish a few megs of PSD files every time I publish my project).
You can create a Solution folder in your Solution and add the files as an existing file.
(or what is a solution folder)
Do have the psd and mockups something to do with your code?
If not I wouldn't recommend to add the files to the solution.
I would use the Windows Explorer AddIn from TFS Power Tools.
With it you have the ability to checkin/add/checkout files without Visual Studio, you only need to map a folder to your source control.
You can choose on the pending changes window whether you want to have all files checked in from your workspace or from your solution.
See How to show pending changes only for the currently opened solution in Visual Studio 2010 (TFS) and not the complete list of all changes? for a screenshot.
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.