For a task that has to analyze an assembly using reflection (in this case
a task to export the hbm.xml or the Sql from an assembly with Plain Old .NET Objects
using NHibernate.Attributes)
one has to be able to load and unload the assembly dynamically (without that, it is
impossible to "build" two times the solution , because the first build will "block" the
assembly with the annotated Plain Old .NET Objects)
So, first I tried with loading the assembly using the Reflection Only Context but it turned out that the code inside of the NHibernate.Mapping.Attributes.HbmSerializer uses the
constructors of the attributes, which can not be called, to examine custom attributes loaded in the reflection-only context, use the CustomAttributeData class.
Well... I wasn't going to recode the HbmSerializer to make it work with the new .NET 2.0 API (not for now) so I have only one option left... create a new AppDomain an make the analysis there... but doing that is proving to be harder than I originally thought
This blog will be about... Software Engineering... Object Oriented Analysis... Database Development, etc
I believe that imagination is stronger than knowledge -- myth is more potent than history -- dreams are more powerful than facts -- hope always triumphs over experience -- laughter is the cure for grief -- love is stronger than death.
Friday, April 14, 2006
Dynamically Loading Assembly for MSBuild Task
Subscribe to:
Post Comments (Atom)
Requirements Analysis: Negative Space
A while ago, I was part of a team working on a crucial project. We were confident, relying heavily on our detailed plans and clear-cut requi...
-
In Java, first we had servlets , and each one of them answered to request made to a particular url ( or an url matching a particular express...
-
Today I was thinking about the way I build UIs ( List then Edit ) and the way most people I know build UIs ( Edit then List ) and the relati...
-
That seems like a very simple question: "When will feature "X" be finished?", specially if do not have a lot of experie...
No comments:
Post a Comment