[Mono-bugs] [Bug 445903] GetField() API fails on Mono 2.0
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Nov 20 10:10:40 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=445903
User mhabersack at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=445903#c9
--- Comment #9 from Marek Habersack <mhabersack at novell.com> 2008-11-20 08:10:39 MST ---
(In reply to comment #8 from Anil Kumar)
> thanks, the code written in comment #7 works when i build and run my code on
> Mono 2.0.
>
> But our requirement is : I should build the code on Mono 1.2 and run on Mono
> 2.0. Sorry that it was not clear in my earlier comments.
>
This is a strange requirement, but I suppose you have good reasons for that.
> So when i build the code written in comment #7 on Mono 1.2 platform, then it
> fails because HttpRuntimeSection' does not exist in the namespace
> `System.Web.Configuration' error comes.
>
> So in order to build it on Mono 1.2 and run on Mono 2.0 , if i use the code
> which i wrote in comment #5 (using GetProperty()) , is it okay ? I am asking
> this to Mono people because this API is implemented in Mono code-base.
Well, as Rodrigo said previously - you are dealing with internal implementation
details. The configuration system is _totally_ different between 1.1 and 2.0+,
so it will _not_ work on the 2.0 runtime. The only option you have, if you
insist on compiling with mcs and running under 2.0 runtime, is to check the
runtime version during program execution and branch to 2.0-specific code using
reflection and accessing 2.0 implementation internals. But, I'm sorry to say
that, this is totally unsupported and there is no warranty it will work in the
future.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list