Where is the app.config file in VS 2010 - visual-studio-2010

Where is the app.config file located in VS 2010.
I just can't find this. How can I access it ?

Just to improve the precision of Oded's answer, the method for adding a new app.config file to a project is:
Right-click on the project, select Add->New Item..., then select "Application Configuration File" from the list of possible items.

It would be a template in the templates directory of Visual Studio.
To add a new app.config, just righ-click the project, select Add Item and find app.config in the lists.

Related

How do I open a project without a .sln file in Visual Studio?

I was writing this program all in Vim and now I'm thinking of moving to Visual Studio, but since I didn't start in Visual Studio in the first place, there is no .sln file to open from. How should I open such a project in Visual Studio?
If you have a web project (without a .sln), you must do:
Menu File → Open → Web Site...
And choose the folder where the project is.
If a *.csproj file exists, you can build a new solution by Visual Studio at first. Next, you can open this *.csproj file in Visual Studio.
An even simpler way in Visual Studio is to follow this:
Menu File → New → Project from existing code
Choose the source file location and a .csproj and .sln file is created.
The simplest way to do this (assuming this is not a web project, as indicated in another answer) would most likely be to:
Create a new project (of the desired type), which should also create the solution for it to live within.
In the solution explorer, right click and select "Add > Existing item..."
Insert all individual files that belong in this new project.
It's probably also worth noting that it's a good idea to double check the project setting, namespaces, etc. before you get too far with building up your project to avoid potential issues later.

Visual Studio 2010 cannot add existing item in C project

I have the source code and hope to add the file xxx.c to source files of the project created by Visual Studio 2010. However, the source file is still in the original location even if I right click add --->existing item. What is added is actually just a link. What is the simpe way to adding the item (but not a link) to the project?
Copy the source file into the same folder along with your other source/project files using Windows Explorer. Then use Add -> Existing Item.

How to add NHibernate XML schema to Visual Studio?

I'm learning NHibernate and I added <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> to App.config. Visual Studio reported a message:
Could not find schema information for the element 'urn:nhibernate-configuration-2.2:hibernate-configuration'.
I know this is not a problem, but if VS knew the schema, IntelliSense would work. How can I add the schema?
Just include the XSD files in any of your projects or as Solution Items.
Copy the two .xsd from the folder Required_Bins from the NHibernate download to C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas. If you use other version of VS than 2008 (or if you have VS installed elsewhere), change the path accordingly.
For those using nuget, and multiple versions of nHibernate, Source control, et al...
Open up the hbm XML file in your project.
Select the XML menu item and select Schemas in the drop down (or press ALT, X, S)
Click Add
Browse to your Solution and open the packages folder in the root
Find the nHibernate package folder
Select both the XSD files within the lib folder
I tried some of the above ideas with VS2012 and NHibernate 3.3.1.4000 and it did not work, but the following tip given by ArnonA worked for me. It should also be SVN safe, if you work on multiple projects with different versions of nHibernate
Inside VS2012, open up the nHibernate xml file you would like to edit.
Once in the xml file editor, the XML menu should be visible in the main VS menu.
Click on XML->Schemas menu, this should open the "XML Schemas" dialog.
Add the "nhibernate-configuration.xsd" and "nhibernate-mapping.xsd" files and click ok.
Done :)
Just copy the nhibernate.xxx.xsd files into your
%Program Files%\Microsoft Visual Studio %version%\xml\Schemas
folder.
You should add xsd files to the solution. This would prevent issues of missing files if your team needs to download the project from a code repository.

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

I have a web application project made in Visual Studio 2008.
Well, I added a jquery folder and added it to source control and other such things. I forgot to add it to the visual studio project though. How do I add the existing folder now? I've tried just creating a new folder and naming it jquery but it gave me a cryptic error "the directory is already on the disk ... if you want to see this directory then check the Show All Files option in the project file" Yet I looked and saw no such option.
Is the only way around this to rename jquery to jquery2 and then create a new folder via visual studio named jquery and copy all my files into it?
With your project open in Visual Studio, click on your project. Then go to the "Project" menu and select "Show All Files". You should now see any directories or file that are in the directory of the project but not included in the project.
Then, right-click on the folder you want to add, and select "Include in Project" from the context menu.

GUI to include a .prop file in a VS 2010 project?

Visual Studio 2010 has no longer uses .vsprops files and instead uses .props files.
To include a .vsprops file in a Visual Studio 2008 project, one could right-click the project icon in the Solution Explorer panel, choose Properties, go to the Configuration Properties | General section, and modify the Inherited Project Property Sheets property to contain a list of .vsprops paths. One could also modify the Visual Studio 2008 project file directly.
Is there a way in the Visual Studio 2010 GUI to include .props files in a project? The Inherited Project Property Sheets property seems to have been removed. If manual editing of the project file is the only way to include .props files, where can one find documentation on doing it?
I'm not talking about adding a .props file to the list of files in the project, I mean how do I tell the project to use a .props file.
That hasn't changed. Use View > Other Windows > Property Manager. Navigate the tree view there and open the configuration you want to change. Right-click > Add New.
If you don't see this menu option then you can repair the menu with Tools > Customize, Commands tab. Select
"View" and click Add Command. Select "View" in the left listbox, "Property Manager" in the right one. That adds the command back to your View menu.
It is odd that it is missing of course, could have happened when you installed VS2010 and it imported your VS2008 settings. This feature is not flawless, judging from other programmers' questions about it, beware that you might be missing out on other menu items. If you haven't customized anything extensively then Tools > Import and Export Settings, Reset might be a good idea.
You can go to View -> Other Windows -> Property Manager to open up the list of property sheets and so on. This works in both VS 2008 & 2010.
Once you find the Property Manager you will see a list of your projects. right click on the project that you want to add a .props file for and choose "Add Existing Property Sheet". You can also choose to add a new property sheet. I have my property sheet in the same folder as my solution file so that all my projects can use the same property sheet.
These posts didn't quite answer my need to choose the right Boost downloaded binaries library folder. boost_1_61_0_b1 lib32-msvc-14.0 or lib64-msvc-14.0
For some suggestions for this application see
http://boost.2283326.n4.nabble.com/How-to-write-one-property-page-props-to-select-the-right-x86-or-x64-Boost-libraries-folder-automatico-td4686269.html#a4686272

Resources