corehost filters out muxer aguments in standalone mode
Steps to reproduce
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0-rc2-23928"
}
},
"frameworks": {
"netstandardapp1.5": {
"imports": [
"portable-net45+win8",
"dnxcore50"
]
}
}
}
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine(string.Join(",", args));
}
}
}
Build, run exe directly with --depsFile argument
Expected behavior
All arguments get forwarded to managed code
Actual behavior
Muxer known arguments get filtered:
D:\temp\1> D:\temp\1\bin\Debug\netstandardapp1.5\win7-x64\1.exe --depsFile C:\Users\pakrym\.nuget\packages
D:\temp\1> D:\temp\1\bin\Debug\netstandardapp1.5\win7-x64\1.exe --depsFile1 C:\Users\pakrym\.nuget\packages
--depsFile1,C:\Users\pakrym\.nuget\packages
Environment data
dotnet --version output:
1.0.0-beta-002112
What's the scenario here? We can debate what the intention should be, but how is this getting in your way?
I'm not a big fan of introducing behavioral differences between standalone and portable mode. Folks should be easily able to flip the switch.
i'm also curious why no runtimes are listed in pj. We have said that an app is not standalone until RIDs are listed.
It's not getting in my way, it's just corehost bug I noticed. This app was published before we disabled rid inference so it didn't need rids in project.json.
@pakrym, in one thread you want this and in another it is a bug? Just use the muxer then. We'll kill --additionalprobingpath in standalone @davidfowl
@schellap Where do I wan't this?
https://github.com/dotnet/cli/issues/2127#issuecomment-203849540. Here... this bug and that comment don't make sense together.
"Expected" there is running standalone exe part, not passing additionalprobingpath part
@pakrym Is this a real issue for RTM? Can you please elaborate on the impacted scenario?
@pakrym, not sure what you mean the exe is expected but not the additionalorobingpath. How will that exe run if you just did build, without the additionalprobingpath or what is the use of the exe without full publish?
Actually with runtimeconfig.dev.json we can get rid of this arg. Is that what you are getting at?
Moving to RTM, we can clean this up.
This is an artifact of doing xunit before shared fx. This shouldn't block anyone unless they really can't change their argument names to something else.
@piotrpMSFT, this is a problem because the XUnit and dotnet run activation of standalone apps is done with:
standalone.exe --additionalprobingpath C:\ --depsfile standalone.deps.json
These options will be filtered by the standalone.exe. By design, we shouldn't prevent users from choosing command line option names. The above restricts users from choosing depsfile which is a reasonable option name to have.
Unpublished Standalone apps are not True Standalone apps and should be activated by the muxer when doing dotnet run in exec mode.
Moved to core-setup repo (dotnet/core-setup#669).