Empty Visual Studio Project?

Visual Studio

Visual Studio Problem Overview


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.

Visual Studio Solutions


Solution 1 - Visual Studio

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:

    http://schemas.microsoft.com/developer/msbuild/2003">

There you go. You can create a folder in this project, yet it does not build.

Solution 2 - Visual Studio

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.

Solution 3 - Visual Studio

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.

Solution 4 - Visual Studio

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.

Solution 5 - Visual Studio

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, ...

Show all files in Visual Studio 2013

Solution 6 - Visual Studio

Sounds to me like you want a solution folder!

Solution 7 - Visual Studio

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; enter image description here

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 :
enter image description here

starting coding and creating your Dynamic Generated WPF Application;
follow these steps if more References are needed depending on the code used;

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMichael StumView Question on Stackoverflow
Solution 1 - Visual StudioJeson MartajayaView Answer on Stackoverflow
Solution 2 - Visual StudioMichael BurrView Answer on Stackoverflow
Solution 3 - Visual StudiospinxzView Answer on Stackoverflow
Solution 4 - Visual StudioNightShovelView Answer on Stackoverflow
Solution 5 - Visual StudioNiklas PeterView Answer on Stackoverflow
Solution 6 - Visual StudioPaul CreaseyView Answer on Stackoverflow
Solution 7 - Visual StudioH3sDW11eView Answer on Stackoverflow