"Unused" folder with Visual Studio Express? - visual-studio

Is there a way to have a folder for unused stuff with Visual Studio Express?
This folder will be listed, but ignored by builder and other IDE components.

The IDE ignores any file not part of a project in the solution. You can add the folder under the project if you want. Just make sure anything that is in it, don't select "Include in Project" in the context menu (or select "Exclude from Project" as necessary).
For the IDE to ignore files by default, you will have to copy/paste them into the folder manually. If you use the "Add" context menu, it automatically includes it into the project.
In order to see all files/folders regardless whether they are in the project or not, select "Show All Files" in the Solution Explorer. (In fact, I would suggest this is the default via Tools > Options > Projects and Solutions > VC++ Project Settings > Solution Explorer Mode > Show All Files.)

Related

Visual Studio, Copy files to project directory problem

I have Visual Studio community 2017. coming from eclipse it was just enough to copy file to project directory and hit refresh then files were appearing in project explorer.
In VS, however when I copy some i.e. *.cpp or *.h in windows explorer to project directory, in VS solution explorer I can not see them. switching to folder view I see but can not include them into project.
via drag&drop to solution explorer (project view) I see them but are not part of project and in folder view and actual directory there is nothing.
what is going on with VS? How can I manually copy paste some files into project while they become part of project?
I will note that there's nothing "going on" with Visual Studio in the sense that something is actually wrong with it, it's just that adding files to your project just requires you to actually add them to your solution. Essentially, it allows you to add miscellaneous files to your folders without automatically including them in your build project (for example, if you're working with some test images/files).
To add files/folders to your project you simply right click on your project in the Solution Explorer and then go to Add > Existing Item.... Then, it's just a matter of selecting one (or Ctrl + A/Shift Clicking to select all/multiple files) and then it will add them to your solution.
In the solution explorer pane, click on the show all files button,
it will reveal all files including your pasted file,
Right click on your file and select "include in project".

Why does Visual Studio not know that my source is in TFS?

Every now and then when I add a new project to my solution Visual Studio does not register properly that the project is under source control in TFS.
Intially, all seems well. I check in and the project shows up in TFS. My workspace is a Server Workspace.
Next time when I change a source file in this project and try to save it, Visual Studio does not automatically check it out for me, but in stead warns me that the file is read-only.
When I open the Source Control Explorer, my files are there. When I right-click on the project in Solution Explorer and choose "Add to Source Control" I get the warning that the project already is in Source Control. The solution is on-line , therefore this question is different from Visual Studio isn't tracking changes, or checking out files from source control as I edit them.
This happens in VS2013 and VS2015.
How do I tell VS that the project is in TFS?
The solution is to add a few lines to your csproj-file:
Right-click on your project in the Solution Explorwe and choose "Unload Project"
Right-click on your project and choose "Edit xxxx.csproj"
Add the following lines in the first PropertyGroup. I tend to put then after the FileAlignment tag
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
Save the file
Close the file
Right-click on the project and choose "Reload Project"

Creating an installer for Visual Studio 2010 solutions (one or more projects)

I ran into some troubles when creating an installer for my Visual Studio 2010 solution (which has multiple projects) so I thought I'd make a quick guide to how I got it working...
Here is how I did it:
Create a new Visual Studio Installer project which is located under
Installed Templates/Other Project Types/Setup and Deployment/Visual Studio Installer.
Make sure you add it to you current solution, you can do this by right clicking on the solution name in the solution explorer and clicking Add>New Project
From there select Setup Wizard, give it a name and click OK
A wizard will open, click Next
then select Create a setup for a Windows application
then click Next again. Select all of the groups you want to include, namely: Content Files, Source Files, Primary Output
Then click Finish
In the solution explorer you will see a bunch of buttons find the one that's tool tip says File System Editor and click it. You will see three folders in the file system editor, the only one we really care about is the Application Folder. That folder is where your projects build output should be.
To add files to it if they are not already there right click > Add > File...
Note: You cannot add entire folders (which sucks) and the folder structure in the Application Folder should be identical to that in your projects build.
You should create each folder and then add the files to it.
If you have multiple projects you should set the build directory to the same folder under the release build settings. To do this, open your solution, and for each project, right click/Properties go to the Compile tab, set it's configuration to Releaseand its Build output path to some folder (same for each project) (If you have an XNA project make sure its Content Build/Configuration is also set to Release).
Now select Release from the drop down menu on the tool bar (it most likely says Debug now)
Right click on your solution on the solution explorer and click Build Solution
Now all of your solutions built files will appear in the folder you chose in the compile tab. All of these files are what needs to be added to the Setup Projects Application Folder (in the same structure)
Customise the installer: click on the project name in the solution explorer and look through it's properties, change what you want (i.e Author, Manufacturer, Title - these make a difference to the installers output directory and text)
Build the installer project (same way as mentioned above) and you are done.
Feel free to comment with questions

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