Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent Visual Studio from creating "Properties" folder?

The default "AssemblyInfo" goes in there, but I dont need it for our directory structure. Every time I delete the "Properties" folder inside my project, it gets recreated on reload. How to prevent that?

like image 674
Xerion Avatar asked Nov 10 '09 21:11

Xerion


People also ask

What is Properties folder in C#?

Properties folder contains a file i.e. launchSettings. json file which contains all the information required to launch the application. It contains the profiles through which the application can be run, each profile is mapped to a commandName, applicationUrl on which application is launched, environmentVariables, etc.

What is difference between solution and project in Visual Studio?

A project is contained within a solution. Despite its name, a solution is not an "answer". It's simply a container for one or more related projects, along with build information, Visual Studio window settings, and any miscellaneous files that aren't associated with a particular project.

How to get project properties in Visual Studio?

You access project properties by right-clicking the project node in Solution Explorer and choosing Properties, or by typing properties into the search box on the menu bar and choosing Properties Window from the results.

How to open property pages in Visual Studio?

To open the Property Pages, choose Project > Properties from the main menu, or right-click on the project node in Solution Explorer and choose Properties. Individual files also have property pages that enable you to set compile and build options for just that file.


2 Answers

First:

Open the solution and make sure you don't have the file "AssemblyInfo.cs" in the Properties folder. If you do move it to the root of the project. Save Solution and close Visual Studio.

Second:

Open the project file (*.csproj) with a text editor like Notepad++ and search and remove these two entries:

<AppDesignerFolder>Properties</AppDesignerFolder>

and

<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>

then save the project file and reopen the Solution in VS. That should do the trick.

Regards, Mike

like image 71
Mike Avatar answered Sep 18 '22 20:09

Mike


Open the project file from the OS side and remove the Properties folder node: <AppDesignerFolder>Properties</AppDesignerFolder>

like image 40
Adam Fyles Avatar answered Sep 19 '22 20:09

Adam Fyles