I have a problem when using Perforce.
I'm using P4V, but don't know the Perforce Server version.
There are often some files in our project that don't need to be version-controlled. And I found a way to exclude folders or files from Perforce by editing the Workspace View.
Using "-//depot/. //Perforce/..." or "-//depot/*.dll //Perforce/*.dll" I could exclude all files or folders in a path. Then the Folder Diff will mark them with "Excluded Folder". The world is clean.
BUT! there are a lot of projects, and each of them has the same folders that we don't need like "bin" "obj", and with WebStorm there are ".idea"s, and with ReSharper there are a lot of folders starts with "_ReSharper", very disgusting.
With the articles here and here, the wildcards (...\*) seem to be put in the middle of path, like "//Perforce/.../bin/...", to let Folder Diff exclude every descendant folder names "bin".
But there is the problem. When I use "Diff Against.." Then the Folder Diff view shows up. All the files are not shown in tree view but in list view. The button "Show files in a tree hierarchy" up there is disabled. And the most important thing is that excluded folders /files in workspace view are lying down there.
When I delete the descendant folder path, it turns normal with tree view and marked "exclude folders"
I have no idea about that. Could anyone tell me what happened there?
Related
I have a git codebase set up in my wamp64 folder, in a folder named songbookdb-deep
When I right click on a folder within songbookdb-deep, I can see the Find in Folder option for searching for code/text within files. However, when I right click on songbookdb-deep, the right click menu doesn't contain that option. The options it has are Open Editors, Folders (greyed out), Timeline, NPM Scripts.
I want to be able to search all of songbookdb-deep, not have to perform multiple searches on individual folders.
Why is the codebase root folder songbookdb-deep not allowing this please?
Thank you
I have a large solution with many .NET 6.0, C# projects. One of them (a Prism module, one of 11) has a couple of odd tree nodes that appear in Solution Explorer. I cannot get rid of them nor figure out why they are there. One corresponds to a disk folder, one does not. They are circled in red below
The obj tree node obviously corresponds to an actual folder on disk. But the same "obj" folder lives underneath most of the projects, yet only shows up for this one module.
I've tried a few things to get rid of it
I cannot delete the folder in the solution explorer.
When I delete the folder on disk, the node disappears for a second but then the folder gets recreated automatically and it reappears.
When I right click on the folder it in the Solution explorer, the only Git option I get for it is to add it to source control which is the opposite of what I want
I have verified that it the folder does not exist in my Git repo so I didn't accidentally check it in.
The Imports tree node makes even less sense There's no folder for it on disk. It seems to refer to items in .NET that my app is using.
I cannot find any entry in the solution's .gitignore file that refers to either "Imports" or "obj" by name (except a line excluding "*.obj"). I see nothing in the raw project file -- which is identical to many others that would explain this any of this. I have gone through it line by line comparing to others.
I am using VS 2022 but I know I saw this with VS2019 as well
Any ideas how to make these things go away...?
Toggle the "Show all files" button.
The button applies to each project separately, so that would explain why you see "obj" folders in some places and not others. For those projects that have "show all files" toggled on, you'll see the files and folders that live under a project on your hard drive but that are not actually part of the project. For those project that have "show all files" toggled off, you won't see such files in the Explorer.
Unfortunately I do not know anything about Prism, but I imagine the same sort of thing is happening for the Imports. Or Imports could be more like References in a C# project and they will just always show.
Is there any way to prevent the contents of .svn subdirectories to show up in Visual Studio Find in Files results?
An alternative would be to make it ignore hidden subdirectories.
According to the documentation for "Find in Files":
The Find and Replace tool does not search directories with the Hidden or System attribute set.
However, this seems to be only partially true. For VS to ignore hidden/system directories, the "Don't show hidden files, folders, and drives" option in Explorer must be set.
If you're like me, that's one of the first things you do on a Windows computer - change that setting to "Show hidden files, etc..." (along with showing extensions - it baffles me that anyone thinks that not showing extensions is a good idea or is less confusing than showing them).
Having files in the .svn metadata show up in search results is one of the very irritating things about using SVN and/or search tools that don't let you easily exclude the directories. Unfortunately, VS's "Find in Files" seems to be one of those irritants unless you're OK with to hiding the directories system-wide along with all other hidden files and directories.
Personally, I can usually get by with 'mentally' filtering those directories from the search results. If it's a particularly bad set of results, and you really, really need the filter, you can flip the setting in Explorer, perform the search , and change the setting back without having to reboot or restart VS or anything. That's a small consolation, but I was half expecting to have to restart VS for the setting change to take effect.
Also, if what you're really searching is the Project or Solution rather than an arbitrary location on the file system, you can tell "Find in Files" to search files in the Project/Solution as hunter suggested. But I assume that's not what you're searching, or you probably wouldn't be having this problem.
I believe you can do the following:
In the Find in Files dialog, click the [...] button next to Look In:
dropdown
In the Choose Search Folders dialog choose the folders you normally wish to search from the Available Folders section. Be sure not to select the .svn folder (mine appears to be only in the root folder, thankfully not in each sub-folder)
Click the > button to add them to the Selected folders.
In the Folder set dialog, give this set of folders a name e.g.
(Trunk)ProjectDatabaseFiles
Click Apply button then OK button
You can now select that set of folders by name in the Look In dropdown of the Find In Files dialog in there-by skipping any .svn files for the search
I have two folders in my library project, folder A and folder B. Folder A will contain all the real files, but Folder B (and a bunch of other folders) need to contain links to the folder A files.
I tried going Add existing item (go to folder A)-> add (down arrow) -> add as link but the add existing item dialog window just closes and nothing happens. It seems I can add links to files outside the library project though. What's going on here?
-Isaac
For some reason Visual Studio seems to silently ignore possible problems with adding file as a link. I just had the same problem and the solution was to:
Check if project folder already contains a file with the name of file being linked, if so delete or rename this resource.
Visual Studio 2010 seems to cache project directory contents, as (1) was not enough to successfully link the file. Restarting VS helps.
Sound like Visual Studio is crashing for some reason. I just tested this in project that has many folders. I had an images folder and I was able to add as link and image to another folder, so it seems it is possible.
It does add the file to the project but does so to the original location, not the new location.
You can see this if you exclude the original file from your VS project (but don't delete the file from disk) - the file will then get add to your project in it's original location
e.g. if you have folder FolderA\index.htm and FolderB, and you want to create a link to index.htm in FolderB. Exclude index.htm from your project (but leave it in FolderA on the disk) so your project just has two empty folders. Right-click on FolderB and click Add Existing Item, select index.htm from FolderA and click Add as Link. The file will be added to your project but under FolderA (where it resides on disk) not within FolderB which is where you told it to add it.
So looks like a VS bug to me.
As has been mentioned, this is a valid scenario if you have multiple "root" websites within one project but you want to share resources between them
In my case (using Visual Studio 2013) I just had to show all files (button on the top of the Solution Explorer), right click on each file/folder and click on "Include on Project".
I have a static site of html and css files. It has folders on my computers. I see an 'add files' option in Source Safe 8 but it only copies files from the root folder.
How can I get Source Safe to copy the whole folder tree structure and their files?
To copy the entire directory tree, create the root folder ("Create Project") in visual source safe. Then from Windows Explorer select all files and folders you want to add to this new project (folder).
It should prompt you for a comment. Enter your note and click ok. That should add all files and folders.
If you only need to add a folder, drag the folder in to it's root in VSS. It will create the folder in VSS.
I think VSS always calls folders "projects".
Yes, drag and drop the folder, check the recursive box at the bottom where you add your comment for the initial check in. This copy all subfolders and files.
I completely agree with the suggestion of using a better option, however if Source Safe is what you use I believe its in the menus as "Create Project" to manually create folders.
Its been a bit since I've used Source Safe, but IIRC, you should be able to just drag and drop a directory into your Source Safe project and the entire tree will be added.
just drag and drop the folder from explorer into the folder in sourcesafe.