Strong Name Assemblies in Mapping

11 views
Skip to first unread message

Junoti

unread,
Mar 3, 2010, 10:50:37 AM3/3/10
to Castle Project Users
Hello,
I've searched and searched and searched, but can't figure out a way to
get ActiveRecord to output strong named assemblies in the HBM mapping
files. Our assemblies are located in the GAC, and we are running into
issues with the mapping files.

Can anyone shed some light?

Thanks!

Mauricio Scheffer

unread,
Mar 3, 2010, 7:25:25 PM3/3/10
to Castle Project Users
AFAIK ActiveRecord does not create assemblies for any mappings. It
just generates the mappings in memory and then feeds it to
NHibernate's Configuration.

Maybe you're having problems with the proxies? What's the concrete
error you're seeing?

Alex Henderson

unread,
Mar 3, 2010, 8:24:18 PM3/3/10
to castle-pro...@googlegroups.com
I may be barking up the wrong tree here, but perhaps he's suggesting that the mappings generated by ActiveRecord are not using fully qualified type names - so GAC types aren't being resolved correctly by NHibernate?

if that's the case, is this something that might be resolved by just adding qualifyAssembly entries in the your application config for the GAC'd assemblies?

http://msdn.microsoft.com/en-us/library/cd71chf0.aspx

Cheers,

 - Alex

--
You received this message because you are subscribed to the Google Groups "Castle Project Users" group.
To post to this group, send email to castle-pro...@googlegroups.com.
To unsubscribe from this group, send email to castle-project-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.


Mauricio Scheffer

unread,
Mar 3, 2010, 10:29:41 PM3/3/10
to Castle Project Users
Ahhh, now I get it. Yes, qualifyAssembly should do the trick, see
http://nhforge.org/blogs/nhibernate/archive/2008/11/27/nh-with-multiple-assembly-versions-in-gac.aspx
Does NH even support fully qualified type names for entities (don't
know why it wouldn't, just wondering)? If it does we could introduce a
new method similar to MakeTypeName (
http://github.com/castleproject/Castle.ActiveRecord/blob/master/src/Castle.ActiveRecord/Framework/Internal/Visitors/XmlGenerationVisitor.cs#L1369
) but returning the FQTN.

> > castle-project-u...@googlegroups.com<castle-project-users%2Bun subs...@googlegroups.com>

Junoti

unread,
Mar 3, 2010, 11:53:34 PM3/3/10
to Castle Project Users
Mauricio/Alex,
Thank you very much for your help. The qualifyAssembly attribute did
the trick. I did start to go down the route of creating a patch and
adding another method for MakeTypeName that outputted the FQTN based
on configuration, but being that I've never really worked with SVN,
and having never contributed to OSS before, I was a little gun shy.

Thanks again!

Reply all
Reply to author
Forward
0 new messages