fsprojects / Argu

A declarative CLI argument parser for F#
https://fsprojects.github.io/Argu
MIT License
453 stars 75 forks source link

Seems like Argu not works on Fsi 11.0.0.0 for F# 5.0 (VS preview 16.8.0 Preview 3.2) #156

Closed ingted closed 3 years ago

ingted commented 3 years ago

Description

Same config and same steps, but

for 11.0.0.0 for F# 5.0

Argu.ArguParseException: ERROR: missing argument '--transportmanagerport'.

and for 10.8.0.0 for F# 4.7

Binding session to 'Z:\SharFTrade\mdc\MdcCSApiTest\packages\System.Configuration.ConfigurationManager.4.7.0\lib\net461\System.Configuration.ConfigurationManager.dll'...
val results : ParseResults<Arguments> =
  [WindowSize 15000.0; MajorityNodeCount 1; TransportManagerPort 8080;
 SeedPort (9000,9000); SeedHostnameType (Customize,Auto); HostName "0.0.0.0";
 PersistDB "10.28.112.93"; PersistDBUID "sa"; PersistDBPWD ""]
val portNum : int = 8080

The config for both fsiAnyCpu.exe

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <gcAllowVeryLargeObjects enabled="true" />
    <legacyUnhandledExceptionPolicy enabled="true" />
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
        <bindingRedirect oldVersion="2.0.0.0-5.0.0.0" newVersion="5.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <appSettings>
    <add key="filepath" value="Z:\SharFTrade\mdc\demoPlugIn\bin\Debug\net48\demoPlugIn.exe" />
    <add key="transportmanagerport" value="8080" />
    <add key="seedport" value="9000, 9000" />
    <add key="seedhostnametype" value="customize, auto" />
    <add key="hostname" value="0.0.0.0" />
    <add key="persistdb" value="10.28.112.93" />
    <add key="persistdbuid" value="sa" />
    <add key="persistdbpwd" value="" />
    <add key="windowsize" value="15000.0" />
    <add key="majoritynodecount" value="1" />
  </appSettings>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <gcAllowVeryLargeObjects enabled="true" />
    <legacyUnhandledExceptionPolicy enabled="true" />
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
        <bindingRedirect oldVersion="2.0.0.0-4.7.0.0" newVersion="4.7.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.2.3.0" newVersion="1.2.3.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <appSettings>
    <add key="filepath" value="Z:\SharFTrade\mdc\demoPlugIn\bin\Debug\net48\demoPlugIn.exe" />
    <add key="transportmanagerport" value="8080" />
    <add key="seedport" value="9000, 9000" />
    <add key="seedhostnametype" value="customize, auto" />
    <add key="hostname" value="0.0.0.0" />
    <add key="persistdb" value="10.28.112.93" />
    <add key="persistdbuid" value="sa" />
    <add key="persistdbpwd" value="" />
    <add key="windowsize" value="15000.0" />
    <add key="majoritynodecount" value="1" />
  </appSettings>
</configuration>
ingted commented 3 years ago

Even ref to packages\System.Configuration.ConfigurationManager.5.0.0-preview.8.20407.11\lib\net461\System.Configuration.ConfigurationManager.dll doesn't work...

ingted commented 3 years ago

Wow! Did the VS update and everything is fine now...