I have a Visual Studio 2010 solution with several projects.
One of the projects is set as the default project, but I want to change that by default.
I know that I can right click the project I want to be the startup project and select "Set as StartUp project", but this setting will be stored in the user's files (.slo and .user files).
As a company policy, we don't check these files in the source control system, therefore when another user opens the solution it will have a different project as the startup object.
Is there another way to set these values? Something like a setting on the .sln or .proj files?
Thanks
From Arian Kulp's site, the way to change the default startup project for a solution is to edit the .sln file. You'll see some Project and EndProject lines. The first Project listed will be the default startup project, so just move the one you want to the top.
Follow these steps:
Choose the name of the project which you want to set default startup project
Click to the Project on toolbar and then click Set as startup project
Related
When I change a web application project's Start Action (such as Current Page, Specific Page, Don't open a page, etc.) and save, Visual Studio doesn't store this selection in a file that is likely to get checked in to source control such as csproj or sln. Likewise, if I go to solution properties and select several multiple startup projects and save, this selection is not stored in such a file either. Is there a way I can store this info in files that will get checked in to source control rather than user settings files?
These configurations are stored in the Solution User Options (.suo) file and they are not meant to be stored in source control, Microsoft Documentations:
The solution user options (.suo) file contains per-user solution
options. This file should not be checked in to source code control.
Startup Project, is a per user settings... a tester may want to set the test project for his startup while the developer wants the web project. The developer does not want his personal settings overwritten, every time he gets the latest version.
But, you can choose a default Startup Project, which would be used when there is no .suo file... to do this:
Open your solution file (.sln) in a text editor, you would see a list of your projects on top of this file, between Project & EndProject tags.
The first project in this list would become your default startup project, so you can reorder the project list and save your .sln file in source control.
Now if you delete your .suo file and reopen your solution in Visual Studio, the first project from the list becomes your startup project... and Visual Studio would create a new .suo file for you. I found this information on this stackoverflow post.
I am using microsoft visual basic to create a VB6 application. Application is basically a usercontrol. I have a form in the applicaton.
What i need to do is as we do in Visual Studio 2008 add a new project in the same solution and set the project as a startup project ?
In VB6 You can have Project Groups (similar to solutions in Visual Studio .NET)
Project Groups contain usually two or more VB6 projects and have the extension .vbg
To create a project group open up one project, Click File>Add Project and add a second project. When you click on save you will be prompted to save the Project Group File.
To specify one project as the startup project right click on the project and select Set as Start Up
Once you've added the new project, right click on it, an go to properties, where you'll have a form as shown below;
As you can see in the image, you've got the Start up option, where you can just drop it down and choose form to start up.
For setting a PROJECT as start up, you can simply Right-click on the corresponding form select Set as Start Up from the context menu.
Visual Basic displays the startup project's name in bold type in the Project window.
Some of my projects have behavior based on the settings of the startup project. I.e. copy the resource to some other directory etc.
How can I get the reference to the startup project (the path to the folder would be also enough) on buildig of a project inside VS 2010?
Regards,
Andrey
Go to TOOLS
Select OPTIONS
Then Start UP
Also check that Detect when file is changed outside of environment.
You need to start every new project from a blank project. If a current project is open, there should be an option to close it before creating or opening another project. It's important not to mix up files from different projects.
I have a solution with 10+ projects (VS2010 SP1). I have the following configurations defined in the solution:
Debug
Debug-QA
Release-UAT
Release-Production
This allows me to easily setup specific settings for each deployment scenario. However, for some reason I can't get things setup as I'd like. Please see this screenshot:
Notice the highlighted projects/configurations. I am unable to create a "Debug-QA" configuration for these projects (by selecting <New> in the cell for that particular project). When I try to add a new "Debug-QA" configuration to the DataUtility project, for instance, Visual Studio yells at me:
This configuration could not be created because a solution configuration of the same name already exists.
I know it does! I'm trying to add the configuration to the project! What am I missing here? I want all projects to have all 5 configuration. I have the same problem when trying to match up (create) platforms (for instance, adding an "Any CPU" platform to the DataUtility project).
Make sure you're using the drop down list from the grid (not the one at the top of the dialog), and do not check the "Create new solution configurations" checkbox when adding your new project configuration.
Here's a workaround if already checked the Create new solution configurations checkbox:
Open Explorer and navigate to the location of the solution for the project that is missing platforms.
Move the solution .sln file to a temorary location where Visual Studio won't locate it.
Open the .csproj file for the project that is missing platforms.
Click the Solutions Platform dropdown.
Click Configuration Manager...
In the table, Click the dropdown in the Platform column for the project and select , to add a new platform.
Click OK.
Repeat adding new platforms as needed.
Save the project.
Return the previously moved solution file back to where it was.
Reopen the combined project solution.
source: https://developercommunity.visualstudio.com/content/problem/972/adding-a-platform-when-one-with-the-same-name-alre.html
The above solution didn't quite work, but I did find a solution on a forum that worked. Described below is to set the builds to x64 for each project that was set to "Any CPU", but the steps would also work for x86.
Open the main solution. Unload each project with a conflict (not
remove).
Leave the solution open.
In Explorer, navigate to the
project folders and open the csproj file in Visual Studio.
In this
screwed up project, navigate to Build->Configuration Manager.
If
needed, "Add New" and set it to x64 and save.
Right-click the
project and set the build architecture to the new x64.
Save this,
but when you close the project in VS, do not save to the solution.
That's unnecessary.
Repeat for each project with a misaligned architecture.
Finally, in the original solution with all the offending projects,
reload each project.
Open the Build->Configuration Manager for the solution. Then, one by
one, reset "Any CPU" to the desired platform, in my case x64.
Save the changes for the solution and rebuild all. You should be OK,
now.
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