I am new to TFS. I have a project of C# win forms. We are maintaining the projects with versions like v2018,v2019...
I have added v2018 project in TFS. It is working fine.
Now I took the v2018 project from TFS and took it out and removed all '*.*scc' extension files and made some changes inside the project and made that project version as v2019. The project is working fine outside.
Now I want to add this v2019 project to TFS as v2019.
But I am unable to add the project to TFS. While I am clicking over the solution and add this to Source control but it is adding only solution file to the TFS.
Why i am unable to add the whole project to the TFS.
Don't know what is the reason.
Under Team Explorer -> Pending Changes -> Excluded Changes you should see something like this:
If you click on that Detected X add(s) you should see a list of all the files that have not been added to source control. Just tick them and then click "Promote"
Related
I began working on an .Net Core solution in VS 2015, which contains an ASP.Net Core project and a couple of .Net Core class libraries. The solution was under TFS source control.
I wanted to include some unit tests. Since .Net Core unit test project templates are not included with VS 2015, I decided to install VS 2017 and upgrade the solution. After upgrading, I was able to add a unit test project and everything compiles and runs normally.
When I first opened the solution after upgrading, though, I initially got an error about the solution being treated as though it was not under source control. Based on Google searches, I went into File -> Source Control -> Advanced -> Change Source Control and clicked "Bind" on each project. The three old projects link right up and show up as "Valid", while the solution file and the new unit test project show up as "Invalid". Unbinding, unloading, reloading, and rebinding the invalid project did not help. I can force the project to bind even though it is invalid (against Visual Studio's warnings), and after some tinkering, I can get the solution to check in, but when I get latest on another machine, the three original projects say "Not Available" and the unit test project is not visible.
Other symptoms: project.json is not found when I try to check in (I have to "undo" or "exclude" to check the solution in) and regardless of what I try, the invalid unit test project's folder shows up in the root folder of the directory tree (at the same level as "src" and "Backup") while the valid projects are in the "src" directory. I am inferring this is because the new solution types allow an .xproj file, while the old solutions required project.json, but I don't know what to do about it...
Any ideas on how to relink this to source control would be appreciated! I did not upgrade TFS server when I upgraded VS, but I don't directly have access to it, so hopefully this is not a requirement...
To fix the invalid binding in VS, you could try to follow below steps:
Click the “invalid” project in Solution Explorer.
Open “File | Source Control | Change Source Control”
Unbind the invalid project.
In Solution Explorer, Unload the project.
In Solution Explorer, Reload the project.
Also clear TFS and VS cache, delete the old workspace, create a new one, get all projects you need from TFS source control. Everything should be back on track.
Sledgehammer approach not normally needed, just Delete the contents from the following folder
C:\Users\<<Your Alias>>\AppData\Local\Microsoft\Team Foundation
Do not delete the rest unless necessary, fix the cause not the symptom.
My issue was that the project name had a period '.' in it. Removed it and the change source control Bind was Valid.
I tried all the solution above and none of them worked for me.
But I found a way to force add project. In Visual Studio :
Go to team explorer
Click on Home
Click on Source Control Explorer
Select the directory and click on "Add Items to Folder" (the icon is a file with a little green + in the top left corner)
Add your project files
... problem solved
i'm trying to use the functionality of the visual studio 2015 to create a project template.
I have a simple wcf-project with my special web.config. To use classes from another project i referenced it.
Those two projects are in the same solution and inherited in source control.
when i create the template and try to add a new project to the same solution, choose my custom template, the solution gets checked out but the files doens't get added to source control.
The source control says, that the binding is invalid. I dont know why.
Does anyone have any suggestions?
Thanks in advance!
Visual studio 2015 - Solution Explorer, Click Show all files,Check new file show in project tree. Right click on file select add to Project. New file need to add .sln (Project solution file) to show in project.
The project template gets added to project tree, but there no "+" sign in front of the file icons. and the solution file is checked out but no changes are made.
I am trying to add Microsoft.CSharp and other system references to a c# class library in vs 2015 community edition bound to tfs. when i add it doesn't persist the path for this particular class library. All the references i add are highlighted in yellow !. The same references and paths I am able to add to other projects but not this current one I am facing an issue with.
I have created a new solution and tried. it still doesn't work.
However I would not want to create a new project file. Any suggestions or workarounds to solve this problem?
Your .csproj files might be "corrupted" somehow. I would create a new project file and then overwrite your existing project file so that it can be checked into TFS.
Create a new project and copy all of your source files into the folder. If you have folders use Visual Studio to re-create them. Use the show hidden button in Solution Explorer to show all the files. Now include the files by right clicking and selecting include in project (you can use Shift to select multiple files). Check your project properties and make sure you copy anything important.
I tried a few things-
I changed from community edition to professional edition 2015. the same problem persisted.
I created a new csproj file and added back the files manually. It got added fine.
However I am pulling the references from a nuget packages folder and updating. if we have the wrong path to the nuget packages, even though we add the references, they were being shown as not referenced.
The nuget packages needed to be correctly mapped or else VS2K15 acts weird.
So bottom line, because my nuget references were incorrect it was throwing these errors. I know This is very weird!!!
I have 2 projects on tfs. One tfs project with the main sln and the other tfs project contains a bunch of sub csproj. I called the one sub csproj into the main project then checked in. After a couple minutes I get a build error on tfs saying that the sub project is missing. I look closely at the path its going to in the log error on tfs and it is clearly not where the project is stored(it is checking within the current tfs project for the file).
Is there a way to config tfs to know where to look for the files or do I have to move the the project to the same tfs project or get the dll and put it into the sln?
i.e.
TFS project A -> Solution1 -> Added Project 1
TFS project B -> Project 1
Project1 in TFS A is on TFS under TFS B
Assuming you are using classic TFS version control (TFVC), the answer is yes. You simply need to setup a proper mapping in your build definition. From Visual Studio, Edit your Build Definition, select the Source Settings tab: there you can add as many mapping you want and the layout for build can be different from the layout in Version Control. This documentation page has all details and option, not that it may use the old term Workspaces instead of Source Settings.
I Implement subversion for first time for test in 2 computers.In a Client Computer I work in a working copy of a project.in this project i add a Devxcomponent (button) in my form and then commit project and send newly version on the server.When I open an updated working copy of project in server ,my project has an error in references Section and show a yellow error in my new dll component.how can i fix this problem?
Try to check if you're not using any third-party dll. If so, it must be commited as well. You can create a folder named dll and add your button dll on it. Commit that folder. When you update in server, just add the reference again to that dll.
Did you miss checking in the dll reference? You must do a svn add on files that you add to your project as references and commit them as well. Also you say you added the Devxcomponent (button) - did that involve adding a new file? You have to add that as well.
Since you are using TortoiseSVN:
Right click on your project -> TortoiseSVN -> Check for Modifications.
Look for non-versioned items. If the file / folder is non-versioned which is needed by your project, right click on it and click Add and then commit.