Compiler Provider Options

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?TUNN?=

    Compiler Provider Options

    I am using the compiler: Microsoft.Visua lBasic.VBCodePr ovider

    What are the different options I can specify using <providerOption >?

    So far I have:

    <system.codedom >
    <compilers>
    <compiler language="vb;vb s;visualbasic;v bscript" extension=".vb"
    warningLevel="4 " type="Microsoft .VisualBasic.VB CodeProvider, System,
    Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b77a5c561934e08 9">
    <providerOpti on name="CompilerV ersion" value="v3.5" />
    <providerOpti on name="OptionInf er" value="false" />
    <providerOpti on name="WarnAsErr or" value="false" />
    </compiler>
    </compilers>
    </system.codedom>

  • Hongye Sun [MSFT]

    #2
    RE: Compiler Provider Options

    Hi MMC,

    As far as I know, VBCodeProvider only has three provider options:
    CompilerVersion , OptionInfer and WarnAsError, which you have already listed.

    What the VBCodeProvider does is:
    1. It will check the CompilerVersion to determine to use which compiler
    (3.5 or 2.0).
    2. It will check WarnAsError. If this option is set to true, the provider
    will set compiler option "/warnaserror+" to the compiler. If the option is
    false, it will set compiler option "/warnaserror-".
    3. It will check OptionInfer. If this option is set to true, the provider
    will set compiler option "/optioninfer+" to the compiler. If the option is
    false, it will set compiler option "/optioninfer-".
    For detail of VB compiler options, please refer to
    http://msdn.microsoft.com/en-us/library/c03639ab.aspx.
    Note: Since C# compiler doesn't support "/optioninfer", so it only has
    CompilerVersion and WarnAsError provider options.

    For the detail of provider options, please refer to
    http://msdn.microsoft.com/en-us/library/bb397730.aspx.
    As it said, CodeDOM code provider implementers can process custom options
    by providing a constructor that takes a providerOptions parameter of type
    IDictionary<(Of <(TKey, TValue>)>). The provider options are treated as a
    key and value dictionary in the provider. And in the VBCodeProvider, it
    uses the three keys (CompilerVersio n, OptionInfer and WarnAsError).

    Hope it helps.
    If you have any other questions or concerns, please do not hesitate to
    contact us. It is always our pleasure to be of assistance. Have a nice day.

    Regards,
    Hongye Sun (hongyes@online .microsoft.com, remove 'online.')
    Microsoft Online Community Support

    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    msdnmg@microsof t.com.

    =============== =============== =============== =====
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/en-us/subs...#notifications.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://support.microsoft.com/select/...tance&ln=en-us.
    =============== =============== =============== =====
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Comment

    • Hongye Sun [MSFT]

      #3
      RE: Compiler Provider Options

      Hi MMC,

      I am interested in this issue. Would you mind letting me know if the last
      reply answered your question? If you need further assistance, feel free to
      let me know. I will be more than happy to be of assistance.

      Have a great day!

      Regards,
      Hongye Sun (hongyes@online .microsoft.com, remove 'online.')
      Microsoft Online Community Support

      Delighting our customers is our #1 priority. We welcome your comments and
      suggestions about how we can improve the support we provide to you. Please
      feel free to let my manager know what you think of the level of service
      provided. You can send feedback directly to my manager at:
      msdnmg@microsof t.com.

      This posting is provided "AS IS" with no warranties, and confers no rights.



      Comment

      Working...