VS2015: How to hide the 'References' folder in solution explorer? - c++

I have visual studio 2015, and from past experiences there are a few folders that some people generally don't want, excitedly, these (red):
But, I managed to get it down by selecting 'Disable External Dependencies folder' folder option to true, and got this:
But I cannot find any option to disable the leftover virtual folder, how can I disable the 'References' folder?

I don't think disabling the references folder is possible yet. This uservoice suggestion is called "Add option to disable References folder in Solution Explorer tab" and is still open.

this is a default option in visual studio and you can't hide it.
you can set scope to special folder or make a new view of your solution explorer instead of remove or hide a part of solution explorer

I feel yor pain, HATE that view.
You can disable it in the Options dialog (from the Tools menu).
On the right side panel expand the Text Editor section, then expand C/C++ and then click on Advanced. Set the Disable External Dependencies Folder to True and restart Visual Studio.

Related

Microsoft Visual Studio Professional 2013, Where are variables defined and edited?

I'm working on an existing project, the solution contains quite a lot of projects with a lot of dependencies and variables.
I'm struggling to locate any of the variables using the IDE, where will I find these in the IDE?
For example in one of the .vcxproj files there are variables such as:
$(FraenkelPlatformName)
Where would I find this in the IDE ?
Edit:
Edit 2:
Ok, based on the great comments on my post, but no answer posted this is what I need to do:
From the VIEW top line menu, select Property Manager
Select a project from the left "Property Manager" panel and expand the node.
Open a build folder, Debug or Release and double click on buildvars
From Common Properties select User Macros
All the variables are listed here and can be Added or Removed.

Exclude CPP files from build, but preserve in project - VS2015 C++ [duplicate]

I'm in the process of refactoring a project. I've got an entire subfolder which is known to be broken. Is there any declarative way to exclude that folder from the compile temporarily while I test the refactoring thus far?
I realize I could delete the folder, but I'd like to do this through configuration if possible.
You could set the Build Action (in the Properties Window) to None for the files you want excluded. You could also right-click on the folder and choose Exclude from Project.
In VS 2010, right-click on the CPP module, choose Properties.
Then click on Configuration Properties -> General, Exclude from Build = Yes.
"Exclude from Project" is no good, it disappears from the other Configurations as well.
Right click all the files, and select Properties. Now set Action to None. Revert to Compile when you fixed the code :)
Use ExcludeFoldersFromDeployment inside <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> tag, example:
<ExcludeFoldersFromDeployment>FolderToExclude</ExcludeFoldersFromDeployment>
For files, use:
<ExcludeFilesFromDeployment>File1.aspx;File2.aspx</ExcludeFilesFromDeployment>
Select the files that you don't want to have compiled on the Solution Explorer.
Right click and choose Options...
Set the "Build Action" on the files to "None".
That should do the trick for you!
On Visual studio 2010 or later, you can achieve the functionality in two ways.
Right click the file, select 'Exclude From Project'
Right click the file, select 'Properties' --> select 'Configuration Properties' --> select 'General' --> choose 'Yes' from drop down menu for option 'Excluded From Build'
You should just be able to right click on the folder name in your solution explorer, and click "exclude from project".
In a website project type, you can set the files/folders attributes to "hidden" in Explorer to achieve the same effect.
If you have a lot of image files in a folder, so many that compilation is a painfully long task; you can rename the folder in IIS, giving the folder a .exclude extension.
e.g. C:\intetpub\wwwroot\yoursite\images change to C:\intetpub\wwwroot\yoursite\images.exclude
Then when you compile your app, the .exclude folder is excluded from compilation.
This is a method I have found for IIS Website Projects.
Set the "Hidden" attribute for the file/folder which you want to exclude from project, and then refresh the project in Solution Explorer. For example:
1. Open Windows Explorer.
2. Go to the physical folder of your website.
3. Right click the file/folder which you want to exclude, and then select "Properties".
4. Check the "Hidden" attribute.
5. Click the "Refresh" button in the Visual Studio Solution Explorer
Benson Yu
Microsoft Online Community Support
Quoted from: https://forums.asp.net/post/1997766.aspx
I'm quite sure that there should be a "Exclude from build" property on the folder, but I don't have my Visual Studio with me at the moment. At the very least there is such a property on files.
In Rider, right click file in Navigation Bar, click Properties, change Build action to None.
In Visual Studio 2010 you need to right click the project in the Solution Explorer and choose Unload Project

Move files in Visual Studio and AnkhSVN simultaneously

I'm reorganizing my project in visual studio. I have some .cpp/.h files which I want to move into a subdirectory physically. A would like to have the following acts simultaneously:
File moving on file system
SVN working copy database updating (with keeping history)
Visual Studio project file(s) updating
Extra benefits would be nice, like:
Updating of #include directives referring to the file.
Are there any solutions? Best workarounds?
This is the proverbial chicken-and-egg dilemma for software developers:
Do you move/rename your files in Visual Studio first then go back to Windows Explorer and correct all the adds/deletes that should really be renames/moves?
Or do you rename/move your files in Windows Explorer then go clean up all the introduced compilation errors in Visual Studio?
You already have the solution at hand! Without AnkhSVN if you do your file operations in Visual Studio you already get two of your requirements: updating your VS project and file system synchronization. With AnkhSVN installed, though, you also get your 3rd requirement: it makes the necessary SVN synchronizations as well. All you have left to do is a commit.
I found the following description from a cached page in a Google search:
In Windows Explorer, right-click and drag the file from its old
location to its new location, then select "SVN move versioned item"
from the context menu. This will not only move the actual file itself,
but it will also make sure that all the file history stays with it
after you check in your changes. Back in Visual Studio, use the
Solution Explorer in VS2010 to "exclude from project" the
(now-missing) copy of the file in its old location, and then "include
in project" the file in its new location. You may need to refresh the
view in solution explorer and/or make sure you are viewing all the
files by clicking the "Show all Files" icon at the top (next to the
refresh icon) in order to see these files.
After you update the namespace to reflect the new location, I
recommend using a global find and replace before you try to compile to
save yourself a lot of trouble.
Hope this helps.

How to build the project which contains the active file in visual studio?

I am using visual studio 2010. My code is in C++ and my solution contains many projects and each project again contains multiple folders under it. Whenever I change a file it gets automatically selected in solution explorer as I have enabled the option "Track Active Item in Solution Explorer" in Tools->Options->Projects and Solutions->General. But after changing the file I have to manually select the project (this could be cumbersome as I have to scroll up and down due to many files present) and then right click on it and select "build". Is there any other simple way to do this?
You could assign a shortcut to Build.BuildSelection or Build.BuildOnlyProject
Go to Tools menu, then Options=>Environment=>Keyboard and enter Build.BuildSelection or Build.BuildOnlyProject in the Show commands containing search text area. Then assign two free shortcuts. Build.BuildSelection is for building the current file; Build.BuildOnlyProject will build its project.
I use ctrl-shift+b to build all the solution. I hate to use the mouse for those repetitive tasks.

Visual Studio unmanaged C++ smart file explorer

I use Visual Studio to develop unmanaged C++ apps for a living.
Is there an add-on tool (price isnt the issue) that is smart enough to detect folders that I create within my solution folder and add them to the include path (/I)? It would automatically do this for win32, or x64 platform settings, or debug, and release, etc.
It should also be smart enough to remove the include paths if folder is deleted
Arent you frustrated sometimes when you double click a file under solution explorer and Visual Studio says it cant find the file because somebody moved or renamed it? ---> Is there a tool that would periodically scan the files in Solution Explorer and automatically removes or prompts the user to let them know those files are no longer valid?
Like John Lakos once said, I too would pay for an add-on that can automatically add #include into my code by just parsing my project's .h/.cpp files.
When is Visual Studio going to have an Eclipse-like solution explorer that allows user to directly manipuate the files/folders structure directly from within Visual Studio?
You can manipulate files/folders from the IDE! Just click the "show all files" button in the solution explorer (2nd from left, at the top). I just recently found that out.