Connecting Tech Pros Worldwide Forums | Help | Site Map

Compiler Provider Options

=?Utf-8?B?TUNN?=
Guest
 
Posts: n/a
#1: Aug 20 '08
I am using the compiler: Microsoft.VisualBasic.VBCodeProvider

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

So far I have:

<system.codedom>
<compilers>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5" />
<providerOption name="OptionInfer" value="false" />
<providerOption name="WarnAsError" value="false" />
</compiler>
</compilers>
</system.codedom>


Hongye Sun [MSFT]
Guest
 
Posts: n/a
#2: Aug 21 '08

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 (CompilerVersion, 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@microsoft.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.

Hongye Sun [MSFT]
Guest
 
Posts: n/a
#3: Aug 25 '08

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@microsoft.com.

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



Closed Thread