Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VS 2012 Adding folders and file to project
Message
 
 
General information
Forum:
ASP.NET
Category:
Visual Studio
Environment versions
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01576612
Message ID:
01576621
Views:
25
>>>>>>Hi,
>>>>>>
>>>>>>I added a folder to my project (e.g. Content). Then I manually copies some .css files to this folder (outside of VS). But when I view the project in the VS Solution Explorer I don't see the symbol (to the left of the folder name) indicating that there are files in this folder. And if I click on the Folder name, it won't open (showing the files). Even thought the files inside the folder Content are recognized in .cshtml files.
>>>>>>I realize that I probably should have added the folder and the file - all - from the VS solution explorer. And I can probably delete and restart the entire process. But I am wondering, is there a way to "force" VS to recognize the folders and the files inside them?
>>>>>>TIA
>>>>>
>>>>>You need to add the individual files to the project. Assuming you've manually placed them in the relevant folder as above:
>>>>>
>>>>>Right click on the folder, choose 'Add' , 'Existing Item' and select the files (you can add multiple files in one go)
>>>>
>>>>The problem I see is that I cannot add a folder the way you describe. That is, if I have another folder underneath the Content (e.g. css) and inside this folder file, I cannot add them from the VS. The 'Add Existing Item' only allows for adding files and not folder with files.
>>>
>>>I think that's correct. You need to create the folder structure using VS
>>
>>This is easily done. Thank you for your help.
>
>Bear in mind that you don't have to (necessarily) physically place the files in the VS Folder before adding them. 'Add existing Item' will copy them to the folder if they're not there.

Yes, I realize that. But what I wanted to have - in my VS project - is the following structure:
bootstap\css -> and then files inside this folder
\js -> and then files inside this folder.

So I want to first add a folder bootstrap to my VS project, then add folder css to the folder bootstrap. But when I tried to add/create folder 'bootstrap' VS said something like 'this folder already exists'. Even though neither physical folder of this name exist. No I have (as I see it) a folder 'bootstrap' in my VS project. But I did have the folder 'bootstrap' in the project at one time.
You see what I mean?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform