[antlr-interest] .NET Antlr3.Runtime Public Key Changed?

Sam Harwell sharwell at pixelminegames.com
Thu Aug 20 12:54:20 PDT 2009


You'll need to reference both runtimes. I don't *think* there is a
namespace conflict but if there is, here's how you have to resolve it:

* Sign the assembly that references both ST 3.2 (my build) and the
CSharp runtime (Johannes' build). That's the only way to get it to
side-by-side load types that would normally conflict.

You can't use redirects because my build(s) use a different public API
than the CSharp runtime. Rather than port the CSharp target to C# 3, I
started completely over with the Java code so I could move it back to
the BSD 3-clause license instead of the 4-clause one that the
CSharp/CSharp2 targets come with.

The public keys are different because I sign my assemblies with a
private in-house key.

Also note that the assembly version numbers for the latest ST beta from
me are goofed. I need to make those consistent for the next build.

Sam

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Brian J.
Sayatovic
Sent: Thursday, August 20, 2009 2:41 PM
To: 'Gavin Lambert'; antlr-interest at antlr.org
Subject: Re: [antlr-interest] .NET Antlr3.Runtime Public Key Changed?

Well, I tried a few things.

I tried letting both exist in their natural state, but one overwrites
the
other at build-time in the 'bin' folder.

Then I tried renaming one, the other and even both, but the .NET runtime
complained that the names didn't match their manifest.

Then I tried the assembly binding redirection, but the public key thing
thwarted me.

So now I seem to be left with compiling my own copy of NHibernate, or
dumping StringTemplate for something else (e.g. Velocity).

Regards,
Brian.

-----Original Message-----
From: Gavin Lambert [mailto:antlr at mirality.co.nz] 
Sent: Thursday, August 20, 2009 3:38 PM
To: Brian J. Sayatovic; antlr-interest at antlr.org
Subject: Re: [antlr-interest] .NET Antlr3.Runtime Public Key Changed?

At 04:47 21/08/2009, Brian J. Sayatovic wrote:
>I'm trying to use NHibernate 2.1 and StringTemplate 
>3.1.  NHibernate depends upon Antlr3.Runtime for its HQL query 
>language.  NHibernate 2.1 depends upon Antlr3.Runtime version 
>3.1.0.39271 public key 3a9cab8f8d22bfb7.  meanwhile, 
>StringTemplate 3.1 also depends upon Antlr3.Runtime, but version 
>3.1.3.6002 public key eb42632606e9261f.
>
>I've tried using assembly binding redirection in my application 
>configuration, but because the public keys are different, it will 
>never work.

If I recall correctly, the fact that they have different public 
keys should mean that it's possible to include both of them at the 
same time -- .NET will treat them as distinct and the types won't 
be compatible though.

If you rename one of the files, and ensure that NHibernate 
references one and your app references the other, then it should 
just work, I think.  (If your app needs to reference both then it 
introduces an ambiguity problem; I think there is a way to resolve 
that but I don't remember what it is offhand.)


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address


More information about the antlr-interest mailing list