Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

fix #2333 by adding a --framework switch #2363

Merged
merged 1 commit into from Jul 30, 2015
Merged

Conversation

analogrelay
Copy link
Contributor

@davidfowl
Copy link
Member

This has tooling impact /cc @BillHiebert @barrytang . How do we choose the .NET Framework from VS?

auto frameworkName = GetOptionValue(argc, argv, _X("--framework"));
if (frameworkName)
{
SetEnvironmentVariable(_X("DNX_FRAMEWORK"), frameworkName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, default C++ formatting in VS is tabs. That explains why it looked fine in VS :P

Fixing

@@ -176,7 +177,7 @@ void ExpandArgument(const dnx::char_t* value, std::vector<const dnx::char_t*>& e

bool ExpandCommandLineArguments(size_t nArgc, dnx::char_t** ppszArgv, size_t& nExpandedArgc, dnx::char_t**& ppszExpandedArgv)
{
size_t pivot_parameter_idx = FindAppBaseOrNonHostOption(nArgc, ppszArgv);
size_t pivot_parameter_idx = FindOption(nArgc, ppszArgv, _X("--appbase"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto? Looks like we want to use auto whenever possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to change this because it was already there but I had the same thought. I can just try it and see if it works :P

@analogrelay analogrelay merged commit e093baf into dev Jul 30, 2015
@BillHiebert
Copy link
Contributor

Yes we will need tooling support for this. Opened 1206194

What happens if the user specifies the core clr framework but is running on desktop (or vice versa)? I guess the tooling needs to restrict the framework choices to current DNX being run.

@sayedihashimi

@analogrelay
Copy link
Contributor Author

The setting is only ever processed by Desktop CLR variants since they are the only DNXes that support multiple frameworks. I believe that specifying it to a CoreCLR variant is an error, but I will confirm.

@analogrelay analogrelay deleted the anurse/2333-pick-framework branch August 3, 2015 18:32
@@ -70,6 +70,9 @@ public static Task<int> ExecuteAsync(string[] args, FrameworkName targetFramewor
CommandOptionType.MultipleValue);
var optionDebug = app.Option("--debug", "Waits for the debugger to attach before beginning execution.",
CommandOptionType.NoValue);
#if DNX451
var optionFramework = app.Option("--framework <FRAMEWORK_ID>", "Set the framework version to use when running (i.e. dnx451, dnx452, dnx46, ...)", CommandOptionType.SingleValue);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should also not be displayed on Mono.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants