Find in Entire Solution in Visual Studio 2012 gets quite a lot of result from Temp folder - visual-studio-2012

In Visual Studio 2012, I tried to do some search in:
Find in Files->Entire Solution, then I get quite a lot results from files in
C:\Uses\myusername\AppData\Local\Temp\
. The files take the name like tmpE11.tmp.cs or tmpFBEE.tmp.cpp, the contents are identical to some of the files in my solution.
My guess is that it is caused or auto-generated by some crashes, but why are they reachable by the search? I doubt if I can simply delete them or not.

Maybe this is related to a bug reported, where lots of tmp files created and are then included in the Find Results. If I clear the 'Miscellaneous Files Folder' the search does not include the temporary files.
To display the 'Miscellaneous Files Folder' (see https://msdn.microsoft.com/en-us/library/36bhtx7w.aspx):
List item
On the Tools menu, click Options.
In the Options dialog box, expand the Environment node and select Documents.
Select Show miscellaneous files in Solution Explorer.
Specify the number of documents you want to appear in the folder.
In Visual Studio 2013 you can limit the contents to 0 which effectively prevent inclusion.

Related

I want to compare two projects in Android studio

I have a couple Android Studio projects that are similar, and I want to know exactly where their source files differ. What is an easy way to do that?
Right click file/directory/project/module > click compare with > give the path to compare
EASY WAY TO FIND PATH : ( considering both projects are open in Android Studio)
Switch to project you want to compare > right click file/directory/project/module > copy path > paste it back in select path dialog.
BETTER to copy path first.
Verified : Android Studio 1.5.1
In Android studio 3.4.2 you can do by right click on
Select Android : app → Compare Directories select proper path for your files and done.
In Android Studio Bumblebee : app → Compare With or Ctrl+D :)
I'm highly recommend Compare Directories Plugin for Android Studio 2+.
Allows the fast comparison of two directories or archive files (jar,
zip, war... and also tar/gz) based on file contents. Compared
directories/archives are shown in a tree view to give a better and
easier-to-read overall view of the differences.
Installation:
Open: File > Settings > Plugins
Click on the button “Browse repositories”, find the “Compare Directories” plugin in the available plugins list, right click on it and choose install.
General usage instructions:
Execute the Compare Directories... menu command, select two directories or zip/jar/tar files containing files with the same file names and see the comparison results on the opened Compare Directories panel:
Files and directories are shown depending on the differences in their
contents: identical, different by blanks only, non-significantly
different, different, left-only, right-only.
Compared text file can be then edited within IDEA.
Compared text file differences can be then viewed with the usual IDEA diff window.
Compared class bytecode differences can be also viewed with the usual IDEA diff window.
Files and directories can be copied from one side to the other.
You will find many more details in the plugin page:
https://plugins.jetbrains.com/plugin/113-compare-directories

Only get certain items in TFS Visual Studio

I am using Team Foundation Server, plugged-in to Visual Studio 2012.
We have a wide range of projects and solutions, but rarely need everything on our local machines.
Is there a way using Team Explorer to get latest only on certain solutions in different folders, in bulk, using a single click (or as close as possible)?
Development
Project 1 Get this
Project 2 Ignore this
Project 3 Get this
Framework
Project 1 Ignore this
Project 2 Get this
...in one click.
For this type of thing, I use tf.exe in a command file on my desktop. That way I just have to double-click the .cmd file. It has the added bonus of being a lot quicker than firing up VS.
#ECHO OFF
SET DEVENVPATH2013=C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE
Echo Getting latest files...
REM Navigate to to Solution's mapped folder on local machine, e.g. for me it is D:\Socrates\Development, and issue a get against the relevant TFS folder for the Solution ($/Socrates/DEVELOPMENT)
D:
CD \Socrates\Development
"%DEVENVPATH2013%\tf.exe" get $/Socrates/DEVELOPMENT /recursive
REM Copy the above 3 lines for each separate Solution you want to Get Latest for
Echo Finished.
Echo.
BTW, I'm guessing that you will need to edit the DEVENVPATH to be 11.0 instead of 12.0
So for your example, and assuming your local folder mappings are directly under C drive, you will want something like:
#ECHO OFF
SET DEVENVPATH2012=C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE
Echo Getting latest files...
REM Navigate to to Solution's mapped folder on local machine, e.g. for me it is D:\Socrates\Development, and issue a get against the relevant TFS folder for the Solution ($/Socrates/DEVELOPMENT)
C:
CD \Development\Project1
"%DEVENVPATH2012%\tf.exe" get $/Development/Project1 /recursive
C:
CD \Development\Project3
"%DEVENVPATH2012%\tf.exe" get $/Development/Project3 /recursive
C:
CD \Framework\Project2
"%DEVENVPATH2012%\tf.exe" get $/Framework/Project2 /recursive
Echo Finished.
Echo.
If you setup a workspace that points at the root of the folder structure that you b have listed and in the workspace cloak the folders that you do not want you can simply get latest on the workspace in a single command in the UI and it gets what you want.
https://msdn.microsoft.com/en-us/library/gg490753.aspx
There's two things you can do
Get a portion of the directory structure by opening Source Control Explorer, right clicking a node in the folder tree and selecting "Get Latest Version" from the context menu. This will get the selected folder and all sub-folders.
Open a Visual Studio solution directly from source control. Double click the SLN file in Source Control Explorer. Visual Studio will get all the items referenced by the solution and its projects. You can then get latest on just the solution items by right clicking the top of the solution tree in Solution Explorer and selecting "Get Latest Version (Recursive)" from the context menu.

Visual Studio 2012 "Find in Files" searches far beyond the solution when "Entire Solution" is specified

While performing Find and Replace operations in Visual Studio 2012; using the Find in Files/Replace in Files dialog window, setting the "Look in" scope to "Entire Solution", and using Regular Expressions on all file types, Visual Studio is busy searching the WHOLE HARD DRIVE! Some of my searches take a very long time and when I look at the Visual Studio Status Bar, it shows the currently searched directory/file is something well outside of the solution folders - sometimes it is even searching the C:\Windows\System32 directory or similarly irrelevant locations.
Has anyone else seen this behavior? More importantly, does anyone have a solution to fix it, so my search and replace operations stick to the solution files and don't waste time searching the other million files on the computer?
I've not had it searching the whole drive, but I have had it return matches from files outside my project (this in VS 2010). In my case deleting the .suo file appeared to fix this issue.
My suspicion is that the files being searched are files I stepped into during a debugging session (or more accurately stepped out of my code into the calling code). Somehow these files are remembered and included in searches.
This wouldn't explain a full drive search, but could explain my "out of solution" results
I was having a similar problem with Visual Studio 2013 with Update 4 installed - in my case I was getting search results from files that had been in the Miscellaneous Files 'Project', even after removing them from Miscellaneous Files.
Deleting the .suo file from the solution directory solved the problem; however, doing so causes VS to forget which files you had open in the solution (and probably some other things).
Still occurring in Visual Studio Enterprise 2017, Version 15.8.6.
Deleting the .suo file (found in .\.vs\YourSolutionName\v15\) and rebuilding the solution fixed the issue.
I suspect it's known directory/targeted directory to search was being cached there because the Find Results would show up very quickly. Indicative of it not searching the "whole hard drive", or even my whole mapped workspace "Local Folder". Typically if I am performing a search on even a more parent branch in source control, it will take close to a minute.
For me the solution was to move the file .sln into the solution directory.

Change "Visual Studio 2010" folder location

I would like to change the "Visual Studio 2010" folders location to my Dropbox folder, so it gets synced every time I make a change. I have searched on the internet, but haven't found a solution yet.
Is it possible to change the "Visual Studio 2010" folders location from within Visual Studio 2010, specifically Visual C# Express 2010?
If you want to relocate everything in the Visual Studio 2010 folder, it takes a couple steps:
In Visual Studio, go to Tools > Options > Projects and Settings > General. Set the three locations as desired.
In Registry Editor, navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0. Set the remaining locations that still reference Documents\Visual Studio 2010 as desired.
Tools > Options > Projects and Solutions > General > "Projects location" setting. Change the others too if you routinely create templates.
As stated by the other answers, some of the paths are configurable (settings, default projects location, and the user template locations) and can be set under Tools->Options. However, it is important to note that the actual registry value that determines the root path is at HKCU\Software\Microsoft\VisualStudio\12.0\VisualStudioLocation, and that this value is only taken into account if HKCU\Software\Microsoft\VisualStudio\12.0\MyDocumentsLocation is set correctly.
To change these registry keys properly:
Make sure Visual Studio is not running.
Open the registry editor and first make sure that HKCU\Software\Microsoft\VisualStudio\12.0\MyDocumentsLocation is set to your actual My Documents location (this is very important, otherwise some of the other paths in the registry will take on default values on the next open/close cycle) and does not have a trailing slash. If this registry value is not there, you must add it.
Change the HKCU\Software\Microsoft\VisualStudio\12.0\VisualStudioLocation to whatever path you'd like the files to be stored at.
(Optional, but recommended) Search for more references to the old path in the registry under both 12.0 and 12.0_Config and update them accordingly.
Note that if you ever change the location of My Documents in Windows, several of the paths (including VisualStudioLocation, which most of the others are based on) will revert to their defaults, and you'll have to follow the steps above again.
(Modify the Visual Studio version number as applicable -- 12.0 is for VS2013, 11.0 for VS2012, etc.)
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\NewProjectDialog\MRUSettingsVenusProjectLocationEntries
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\NewProjectDialog\MRUSettingsLocalProjectLocationEntries
if above solution doesnt work try this ones.
From Tools Option> projects and Solution as show down
In case someone come across this question these days, in VS2017 Community there is a "Location" node under Tools-> Options-> Projects and Solutions-> Locations. The fields are no longer under "General".

What sort of resharper specific files does resharper generate in your vs.net project?

What sort of resharper specific files does resharper generate in your vs.net project?
(BTW, did you guys get the full version or just the C# version?)
The "_Resharper.[Solution Name]" folder stores the Resharper specific cache. You can go to Resahrper > Options dialog and select "Store caches in: system TEMP folder" so that your solution folder is not cluttered.
I personally prefer to use the TEMP folder so that the cache does not accidentally get added to the version control. Also, in case you want to clean the cache you can use the "Clear Caches" button on the Resharper Options dialog.
Couple of different things:
A folder called "_ReSharper.[Solution Name]" which then contains a collection of files and folder beneath that
A file called "[Solution Name].[ReSharper Version].resharper.user"
Both are created in the root of solution next to the .sln file. You can delete them if necessary and ReSharper will just recreate them on next load. Keep them out of your source control management system - they serve no purpose under verison control.

Resources