No VC/inc folder in my MSVS 2013 directory - add

I'm trying to add FLTK to MSVS 2013 and I'm copying the .lib files into vc/inc but I cannot find the folder anywhere. Under the Visual Studio 2013 folder all I have is
ArchitectureExplorer, Backup Files, Code Snippets,
Projects, Settings, StartPages, Templates, Visualizers
What am I missing here? I'm sure its something stupid.

Not exactly sure what you mean by holder. Start VS, select Tools/Options/Projects & Solutions/VC++ directories.
On the right pane, select Include files from the top right box and add your FLTK include directory in the listbox below.
Then select Library files from the top right box and add your FLTK library directory to the listbox below.
That's basically it - there is no need to copy files anywhere.

Related

How to hide generated dart files in Android Studio

Is it possible to hide generated dart files in Android Studio especially *.g.dart files?
In Project panel, under Options there is a File Nesting Option. I added .chopper.dart; .freezed.dart; .g.dart to .dart parent. This will group related files under the main file.
In Settings panel, open Editor section, and select File Types. Now look for Ignore files and folders field at the bottom. Just include *.g.dart there and you're good to go!

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

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.

Add existing xaml files to visual studio 2012

I want to add a folder containing xaml and cs files plus other directories to a different project on VS. For some reason when I drag the folder from windows explorer to the project where I will like to place that directory visual studio will not let me. Because of that I am manually adding each file and every time I encounter a directory I have to create it. Maybe it is because I am using team foundation server.
Anyways I am adding the files manually so I click on the folder that I want to add the files on visual studio then click on add existing files. Then I select the xaml and code behind file:
when I click add the files get added but visual studio does not recognize that Bytes.xaml.cs is the code behind!
Do I have to manually add a window then copy and paste the contents of the file?
Edit your .csproj file to add a "DependentUpon" element below your "Compile" element for the .xaml.cs file so that it will appear "inside" the .xaml file not simply below it.:
<Compile Include="BytesDisplay\SubControls\Bytes.xaml.cs">
<DependentUpon>Bytes.xaml</DependentUpon>
</Compile>
To easily edit the .csproj file:
Right-click the project and select "Unload Project"
Right-click the project node again and select "Edit [projectname].csproj"
Edit the XML, then close the file
Right-click the project node again and select "Reload Project"
If you drag-and-drop the .xaml file from Windows Explorer into the Solution Explorer window, it will automatically add the .xaml with the code-behind .cs file.
thanks for the write-up. If you edit the xaml and .cs files class declaration to match without class collisions - then when you add the .xaml file it will pick up the .xaml.cs automatically if it is on the same folder. (vs 2013)

Add an already existing directory to a directory in Solution Explorer

I want to add an already existing directory to a directory in Solution Explorer, but whenever I right-click on the directory and select Add => Existing Item, I can only add individual files, but not directories.
How do I add an already existing directory to a directory inside a Project inside Solution Explorer?
Click the 'Show all files' button at the top of the Solution Explorer and right click the folder desired and select 'include in project'.
Drag and drop the folder from Windows Explorer onto your Visual Studio solution window :)
Source here
or simply copy & paste into solution explorer.
VS 2012 seems to distinguish between 'Solution Folders', which are only folders containing either other solution folders, or containing project folders. The drag-and-drop works (with my settings) only for the project folders, and no for the solution folders.
If I add a new solution folder, nothing happens on the machine. If I drag-and-drop a machine folder to the main Solution, it refuses to accept it. If I drag-and-drop the folder to a Solution Folder, I get an error message saying this cannot be done.
Some other answers are missing an important point: if the folder is not in a project in the solution it is impossible to add the folder
This is the solution:
1) Add a new folder to the sln - it does not care that the folder already exists on the disk because this a virtual folder in the sln
2) Add the file to the folder using "add existing files"
When dealing with a solution level folder that has been removed for some reason, and now needs to be added back, open the .sln file in a text editor like notepad++.
Find your "FolderName" in the section that looks like this...
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NewFolder1", "NewFolder1", "{73ED84FC-F250-4CCC-B267-34CEB67F2883}"
EndProject
Delete from "Project" to "EndProject" ONLY for the specific Project/Folder you're having trouble with.
You may get a message in VS2012 that says your solution has been modified by an external source. Choose the option to "Discard" your changes for the external changes. Lastly, add your solution level folder, and add your project(s) to that folder as existing items, drag/drop them, or copy and paste them, according to your preference.
For those who had a hunch it could be done but weren't able to do it, NOTE: Drag Folder or Files ONTO the name of the Project Name in Solution Explorer in the least
Expand the "Project" item in the menu bar and select "Show All Files". Then locate the folder you wish to add in the Solution Explorer (folders that are not currently included will be light grey with a dotted outline instead of the usual solid icon) right click the desired folder and select "Include in project"
Once finished select "Show All Files" from the Project menu again to return to the regular view.
(This is very similar to Radenko Zec's answer, but does not require the "Show All Files" button to already be present in a toolbar. I would just leave this as a response to his answer, but I don't currently have the reputation to leave comments.)

Configure a Visual C++ 2010 project to use include folder as in Linux

I'm porting a Linux C project in Visual Studio 2010.
I have the following folder project structure under linux:
ProjectName->Src->Source C files
ProjectName->Header->Source H files related to C
How should I configure Visual Studio 2010 to recreate the same structure without compile errors ?
How to create the include folder and tell to the the compiler that is an include folder.
I cannot even add include files (existing elements) in a simple folder. They simply don't appear as I add it.
On the C/C++ configuration tab is the Additional Include Directories option. Set it to the following:
$(ProjectDir)/Header
That should do it. Don't forget to do it for all your configs (debug, release, etc).
Oh, and regarding adding new header files, when you open the Add.. option to add a new file, pay close attention to the BOTTOM of the dialog. it will tell you where it will be placed, and you can change it there.

Resources