This question already has answers here:
How can I always block checkin of a specific file in TFS
(8 answers)
Closed 9 years ago.
In my solution folder in visual studio 2012 adds folder "packages" sometimes. And this folder strongly want to check in TFS.
Please help me to disable this feature.
Updated after the comment below:
That's a folder for Nuget packages. Folder gets added to the solution whenever you add the first Nuget package to any of your projects in the solution.
2 things you need to do:
1) Right click on the folder in solution explorer and say Exclude from Project.
2) Then go to Source Control Explorer and right click on the packages folder and say delete. The Pending Change column should say "add" like the image below. It will be removed from source control once you do that but will stay in your local directory. Any changes you make after that in nugget packages will be done locally.
Related
This question already has answers here:
Is there a way to automatically include content files into asp.net project file?
(9 answers)
Closed 3 years ago.
My visual studio 2017 does not detect when git adds new files to the folder for some reason...
I don't want to manually add the file every time one gets creagted
You might find your answer here:
Is there a way to automatically include content files into asp.net project file?
Or, if you don't want to fiddle with that, the top answer here offers a faster way of manually adding files:
How can I automatically add existing items to a Visual Studio project?
This question already has answers here:
Force TFS to detect changes
(8 answers)
Closed 6 years ago.
Im Working with Visual Studio 2015 with an ASP.NET Web Application, with Umbraco and uSync installed. It's not essential what uSync and Umbraco are, but when I start the project and create a Template in Umbraco, uSync writes "export"-files to a specific folder in the project path.
Now Visual Studio doesn't list the new, changed or deleted files under pending changes, so i can't check-in my changes.
Is there a way to tell Visual Studio to always track created, removed or changed files in specific folders of the project?
Yeah, i could always manually include the files to the project, but this could cause errors when I miss a file or when someone works with this solution and doesn't know he has to include them manually.
There are also other files that I don't need to check in so I need a solution to specify, which folders Visual Studio should track and not something how to track everything going on in the whole project path.
You just need to create a local workspace and not a server Workspace.
Then all files edited outside your solution get detected:
Picture: Pending Changes with detected adds
Then i include the detected adds, so they are under Included Changes. Now i can check-in all the changed files, but at this time they are in source control but not included to the project. So I add the lines like described at this link:
http://www.mattburkedev.com/automatically-include-all-files-in-folder-in-visual-studio/
Then I unload the Project and Reload it. The files are now included.
So next time I add files in Umbraco: just add detected adds in Pending Changes and reload project, everything done.
Well, no. That's the nature of a Web Application project type. But if for instance you used a Website project instead, all files in the main folder would automatically be part of your project.
In Visual Studio 2013 Pro, is there a way to have a README.md for the root solution? We have a rather large solution and I'm trying to create a main README.md that can give an intro of each of the projects and a link to their READMEs.
I know this was asked a few months ago, but in case people find this question as I did, I'm giving my answer. You can right-click the solution, click Add, New Item..., and then create a text file called README.md. It will create the file in a folder called "Solutions Items" in the Solution Explorer, but that folder would not be created in your project file structure. So it is like a logical folder only.
Also, it seems that if you clone or fork a project that already has a README.md file for the solution, VS2013 does not automatically display it in the Solution Explorer. You have to include it there through Add, Existing Item....
I searched already on stackoverflow and on the internet but I couldn't find a similar specific question.
When i have to rename a already checked-in (tfs) project in my visual studio (2010-2013) solution, I always use a procedure similar to this one here in the accepted question:
stackoverflow.com/questions/2043618/proper-way-to-rename-solution-and-directories-in-visual-studio
Here is the important snippet from there (thanks to author):
Close Visual Studio.
Create a backup of your .sln file (you can always roll back).
Imagine you want to rename directory "Project1" to "Project2".
If not using source control, rename the folder from "Project1" to "Project2" using Windows Explorer.
If using source control, rename the folder from "Project1" to "Project2" using the functions supplied by source control. This
preserves the history of the file. For example, with TortoiseSVN,
right click on the file, select TortoiseSVN .. Rename.
In the .sln file, edit all instances of "Project1" to be "Project2".
Restart Visual Studio, and everything will work as before, but with the project in a different directory.
..and there i always do step 6:
Step 6.: In the .sln file, edit all instances of "Project1" to be "Project2".
By observing the .sln file i could see that until step 6 (so in my case of using the tfs i did steps 1,2,3 and 5) there are still occurrences of the old project name in the .sln file:
Project("{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") = "Project2",
"Project1\Project2.csproj", "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
and:
SccProjectUniqueName92 = Project1\Project2.csproj
SccProjectName92 = Project1
SccLocalPath92 = Project1
Until now i had no problems with that approach. But as i could see a colleague of me is skipping step 6 and there are still occurrences of the old project name in the .sln file.
Now i wonder if step 6 is really needed/required?
I am keeping using step 6 just for more cleanness! But whats your opinion on this?
Could the old project name occurrences in the .sln file (if skipping step 6) even some time lead to functional problems with tfs/vs etc.?
Or is it only for the purpose of a cleaner/clearer code better to do carry out step 6?
If you are renaming a project within a solution, that is under source control, really all you need to do is to rename the project in Visual Studio and then submit the changes to the project file and the solution file, back into source control.
Visual Studio and TFS should handle all of the changes for you, VS will rename the project and update the references in the SLN file.
TFS will handle the rename and will maintain the history line.
The only time it should get complicated is if you are moving projects and solutions within source control, when you are carrying out this sort of task then the list above is a fair description of what needs to be done, but after step 4 i would just open the solution remove the project that can no longer be found and add in the newly renamed project, this would then automatically handle the sln file changes. now obviously this would orphan your history on the project if it was under source control, but you would make the project name change through TFS before reopening the solution.
if you want to manually change the sln file then a find and replace operation is the simplest way to update the file.
Coming Back to your question.
You really should ensure the sln file is correct as this tells VS where to download the files from and what projects actually make up the solution, by not updating the sln file correctly you, or other users of TFS may not get the correct files downloaded and you may have issues opening your solution.
An example of fall out from not having these files in line can be found in this question Why missing <SccProjectName> in project file cause "The project file is not bound to source control"
This question already has answers here:
How to prevent VS 2008 from publishing .svn folders as part of publish process?
(3 answers)
Closed 2 years ago.
Does anyone know how to prevent VS copying the .svn folders associated with subversion when publishing a web project?
I'm using Tortoise SVN and Ankh svn VS plugin.
Thanks
I must say I've never had this problem, when you hit publish - do you check the option to only copy the files needed for running the application? (there's a third option which copies everything from the project folder which isn't very useful)
(uncheck hidden on the .svn folder and then check Show all files in VS and they will show up, but as you don't see them to begin with they shouldn't for some weird reason be a part of the project anyway)
Right-click the .svn folders and hit "Exclude from Project".
I seem to have fixed the problem but I don't know why it worked.
I simply deleted the .svn folder from the bin folder and it now it ignores all .svn folders.
Weird.