Visual Studio 2010: Where are the Project Sub Folders - visual-studio-2010

I am really new to visual studio (2010 professional) and she is not being nice at all.
In my solutions explorer (for an empty project) I see these 4 folders (or filters!), where are they physically located?
I created a header file under the "Header Files" folder but I got the classic "cannot open include file..."!
Even if I create a folder it does not show up physically!
What do I do? Please help!
Avishek

Related

Visual Studio not showing .github folder

I just pulled from a repository with a .github (Github Actions) folder. The folder is visible in Windows Explorer, but not in Visual Studio 2022 (c# console application solution). Why is that and how to see it in Visual Studio?
Update:
This is how it looks in Visual Studio, noet that Show All Files is enabled, yet the .github folder is not visible:
The solution view shows the projects in the opened solution and their content but not additional folders in the solution folder.
You can use the folder view to view all folders and files in a certain folder. However, this will lose some features until you again select a solution from that view.
I have the same issue when using VS 2022. Even when I have Show All Files toggled, I can't see any of the files at the .sln folder level.
My work around is to just go to the folder or file itself and open in VS.

Building a Folder in Visual Studio

I'm working in Visual Studio 2017. I wanted to open a folder of files, so I clicked File -----> Open ------> Folder and selected the folder containing all my files.
When I view the Solution Explorer, I can see all of my programming files. However, I am unable to build my project and run it. Is there any way to build and run a folder in Visual Studio? I've tried selecting the .cpp file that I wanted to build specifically, but there's still no build/debug option.
In fact, under the Debug menu, the F5 Start option is grayed out. Any solutions?
I think you have to create a Visual Studio project first, and then add those files to the project. What you are doing right now is just using VS as an editor and viewer.

Visual Studio EnvDTE - Open project folder in file explorer

When you right click a project in visual studio, there is an option "Open folder in File Explorer". How can the same be done from the automation model (EnvDTE) of visual studio? I thought I could use Project.FullName but that didn't work for our auto generated project files that have the .vcxproj file in a different folder than the actual .cpp files.
You can use
Project.Properties.Item("FullPath").Value
to get the correct path.

Place a custom template in VS 2010 New File dialog

I'm trying to create a Visual Studio template that should appear in the New File dialog of Visual Studio 2010. No solution or project needs to be opened in order for my template to appear.
So far I know how to place my template in the Add New Item dialog, but can't find info on how to place it in New File dialog.
How can this be achieved?
Solved this by making my WiX installer put my template (a .mysql file) in a subfolder of my vsix extension folder (which goes a couple of levels below C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions) and then modifyied my .pkgdef file to add an entry to the Windows Registry that will specify that same dir as the TemplatesDir for this template:
[$RootKey$\Projects\{A2FE77E1-B743-11D0-AE1A-00A0C90FFFC3}\AddItemTemplates\TemplateDirs\{79a115c1-b133-4891-9e7b-242509dad272}\/1]
#="#105"
"Package"="{79a115c1-b133-4891-9e7b-242509dad272}"
"TemplatesDir"="$PackageFolder$\\Templates"
"SortPriority"=dword:00000020

Empty Visual Studio Project?

Is there a way to have an empty Project in Visual Studio 2008 or 2010? I do not mean an empty solution, I mean an empty project in a solution. Basically I have a solution with multiple projects, and I want to add a project to track some static files that are part of the solution but not of any specific project. Adding them as solution files doesn't work because solution folders are not mapped to file system folders and I want to manage hierarchy from Visual Studio.
At the moment I create an empty Visual C# project which works, but I just wonder if there is a "more empty" project.
I was misled by the C++ "Empty Project" or "Makefile Project". I cant create new folder there.
Here are three steps to add an empty C# project:
1) Create the project. (Add > New Project > Visual C# > Windows > Empty Project)
2) Exclude it from build. (Build > Configuration Manager, uncheck Build on both Debug and Release configuration)
3) Replace its csproj content with the following 3 liners:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
There you go. You can create a folder in this project, yet it does not build.
The Visual C++ project types has an "Empty Project" in the "General" category.
It comes up with several empty folders ("Header Files", "Resource Files", "Source Files") that are just 'filters' (they aren't on the file system). You can just remove them.
It also has all the properties of a C++ project available, so don't put C/C++ files in there unless you want them built (or you exclude them from the build).
Other than that, it's pretty empty.
Probably even closer to an "empty project" is a "Makefile Project" which is also located in the "General" category of the Visual C++ project templates. It also creates the 3 filter folders, along with a readme.txt file that you can delete. It has the advantage that unless you specifically give it commands to run during the build, it won't do a damn thing.
For Visual Studio 2015 up this can now be done with so-called Shared Projects. This is simply an empty project type that holds source files for use within another project, see here.
I found an "Empty Project" under the "Windows" category in both C# and Visual Basic, in Visual Studio 2012. I'm unsure if these are present with Visual Studio 2008 or 2010.
It seems to only create an App.Config file, which can easily be deleted.
I think the C++ empty project does support folders. At least in VS 2013 you just have to click on "Show all files" in the Solution Explorer. Then it will not show these virtual folders (filters) anymore, but real folders in the file system and then you can also create new folders, ...
Sounds to me like you want a solution folder!
Microsoft Visual Studio 2019 Community
Microsoft Visual Studio 2017 Community
Microsoft Visual Studio 2015 Community
for creating in WPF an Empty Project,
go File > New Project
then Templates > Visual Basic > Windows > Classic Desktop
use this reference to find Empty Project for other Languages;
now to work with this Empty Project, References must to be Add to the Project;
in Solution Explorer, right-click References then Add Reference...
select these references: PresentationCore, PresentationFramework, System.Windows, WindowBase;then click OK;
now you Solution Explorer should look like this :
starting coding and creating your Dynamic Generated WPF Application;
follow these steps if more References are needed depending on the code used;

Resources