How to add an existing folder to a Visual Studio 2010 Express project?

I am trying to add a folder and some files to it in a Visual Studio 2010 Express VB.NET project. I read the answers to questions on this topic here and here . They both say "select a folder, right-click, and then select" Add to Project ".

But when I right-click in this way, the "Add to project" option does not appear. Does anyone know why this is so, and what can I do about it, or, alternatively, another way to add a folder to a project?

+4
source share
5 answers

Yes, it works great. Click "Show all files." You will see ghostly images of all files that are not included in your solution. Right-click the folder you want, then select Include in Project. It goes without problems and is displayed in the Solution Explorer menu.

+2
source

I found this: Visual Studio - adding an existing folder

Instead, you can click the "Show all files" button at the top of the solution browser, then right-click on the folder you want to add and click "Include in Project". Pretty trivial. Its amazing how long you can use the product and don’t know about all its functions.

+1
source

Click File.
There you can add a new or existing project.
After you have added a new or existing project, you can right-click and add the projects to the solution explorer.
Therefore, there is absolutely no need to show hidden Fiji, etc.

+1
source

I understand your problem because I also use VB.Net 10 Express, and also used pukka versions. You, as you know, DO NOT have the right to add a click to the project object, but there is a way to add an existing form / class / folder, etc. Into the project, but you should be ready to dive into the .vbproj file.

Here is an example of the one I added to one of my projects. First of all EXIT VB.NET

Now copy the .sln, .suo, .vbproj, .vbproj.user files somewhere else, or just write them as a backup if you manage to screw it all up!

Then open the .vbproj file with an editor. You can use notepad or text panel, but I use and recommend scite. In any case, everything you use should be a simple text editor. Forgive me for saying the obvious, but DO NOT use Word, WordPad, etc.

In the file, find the section that starts

<itemgroup> 

You can tell if you have the correct fact that the records say

 <Compile Include= 

Other groups say the link includes or imports, and you do not want them. In this section, add the code needed to get your folder and files in the project. Here is an example:

 <Compile Include="SuperPro Extras\FGeophysicalReport.designer.vb"> <DependentUpon>FGeophysicalReport.vb</DependentUpon> </Compile> <Compile Include="SuperPro Extras\FGeophysicalReport.vb"> <SubType>Form</SubType> </Compile> 

Please note that your FOLDER is added at the beginning of the file names. For each of the vb files, you should add the name of the constructor file and the name of the code file (as indicated above).

Finally, you need to include the resx file. You will find another ItemGroup that contains embedded resource files. The resx file is added to this group in the same way.

 <EmbeddedResource Include="SuperPro Extras\FGeophysicalReport.resx"> <DependentUpon>FGeophysicalReport.vb</DependentUpon> </EmbeddedResource> 

Notice the folder \ file name in the first line, and then the WITHOUT link and folder name.

I know that this is a long time after the question was asked this way, it may not be useful to you, but I hope this helps someone else. I think I will develop a utility for this. I have one for build / file numbers, so that would be a useful addition.

+1
source

I wanted to add a little more understanding, as some of the directions were clearly not clear given the same level of knowledge of Visual Studio. Here is a brief description of how I accomplished this task (using VS2013).

  • The drag and drop folder that you want to include in the Resources folder ( ie %path%\"Project Name"\"Project Name"\Resources\ ) In this example, I wanted to add a folder structure named AppData strong>.
  • In Solution Explorer, on the top panel, click Show all files , then click Refresh .
  • Find your folder (mine: AppData) in the Resources section, then right-click> Include in Project .

Images for guidance:

+1
source

Source: https://habr.com/ru/post/1390395/


All Articles