Bug 13815 - Make it easier to run different projects in one solution
Summary: Make it easier to run different projects in one solution
Status: RESOLVED ANSWERED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 4.0.10
Hardware: Macintosh Mac OS
: Low enhancement
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-08-07 09:44 UTC by Neal
Modified: 2015-04-21 07:46 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Neal 2013-08-07 09:44:29 UTC
Hello,

I have both my Android and iOS project in a solution.  The drop downs on the left of xam studio for build config and target don't seem to refresh based on the selected project.  I may be working in Android and I'll still see debug/iPhone Simulator in the drop down.  I want to be able to click the run button and it know exactly which project to run and the targets based on what I have selected in the project explorer.
Comment 1 Mikayla Hutchinson [MSFT] 2013-08-09 18:35:58 UTC
The build configuration (the combobox on the left) shows the solution configurations, not project configurations. This is because the build must take into account the configuration mappings for for all the projects you want to build in the configuration, not just the selected project.

The execution target (the combobox on the right) is the execution target for the *startup* project, not the selected project. This is really unavoidable 

Note that the solution configurations may be "simplified" if they can be disambiguated based purely on the available target, so you may not see the "platform" part after the | pipe.

This can get complex - not all solution configurations may include all projects, since the automatic configuration mappings are not great. We're considering ways to improve configuration management but it's not easy.

But I guess what you're really asking for is to do away with the concept of a startup project, and for the start project to be whatever you have selected in the solution pad.

I think we'd need to brainstorm a bunch of different ideas to make it easier to run different projects in one solution.
Comment 2 Neal 2013-08-13 10:15:25 UTC
Michael,

As a solution retains its "startup" project a way to accomplish this may be to allow multiple solutions to be contained in a solution or "workspace" if you want to create something new.  Invent a ".wkspc" file that can contain multiple solutions and allow me to open a workspace and all solutions will be available.  Then as long as I'm focused within a solution the drop downs will reflect the startup project for the focused solution.

I currently open multiple solutions and uncheck the close option so I can have multiple open at a time.  Having the workspace option or some way to open multiple solutions at startup would be nice.  Just like "tab groups" in browsers, have solution groups or the workspace idea.
Comment 3 Mikayla Hutchinson [MSFT] 2013-08-13 10:44:45 UTC
Workspaces already exist :)
Comment 4 Neal 2013-08-13 10:49:29 UTC
I obviously have no idea what a workspace is or does.  Does it do exactly as I described?  Is there documentation on this I can review?
Comment 5 Mikayla Hutchinson [MSFT] 2013-08-22 16:12:34 UTC
There isn't any documentation on workspaces as far as I know, but they're pretty easy to use, just use File->New Workspace and add solutions to it.
Comment 6 Dale King 2014-04-16 14:53:30 UTC
I also find this very frustrating.

For a workspace with multiple solutions it actually does what you want and will run the startup project of whichever solution you currently have "selected". I used to work this way and it was great. The problem with this is that you cannot share a project between solutions. If you have a core PCL library it can't be shared between separate iOS and Android solutions. You have to have them in the same solution to share the project between them.

It is possible to set multiple startup projects (double-click the solution and look under Startup Projects), but that didn't really seem to satisfy this. It just always started the first one.

When you have multiple startup projects that right combo box gets disabled. If you are trying to figure out how to implement this I would start with using that right combo box with multiple startup projects instead of disabling it.

What I end up doing is setting the current one I want to run using "Set As Startup Project" but that has the problem that doing so changes the sln file which then shows up as change in a file in version control and I have to manually know not to check in that change.
Comment 7 Dale King 2014-04-16 15:07:39 UTC
Actually, you can have the same project in multiple solutions in the same workspace, so I might switch back to solution per platform in the same workspace.