0

I have a very similar issue to this post here:

Release not working, referencing FW 2.0 dll into FW 4.0 winform

I have a 3.5 version of an app that is using publisher files in the GAC. When I deploy this to my dev server everything works fine however when I converted this application to 4.0 and deploy this to my dev server (still referencing 3.5 assemblies in the GAC) my application seems to be ignoring my policy files.

I have tried just about everything I can think of:

-adding/removing

 <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
    </startup>

-making sure everything references the gac dlls -deploying in both anycpu and x86 versions

This will work if I manually add:

in the config file but that kind of defeats the purpose of my policy doesn't it?

Any suggestions would be appreciated.

Community
  • 1
  • 1
  • sorry this cut out – user3699667 Sep 19 '14 at 21:10
  • .NET 4.0 got a new GAC, now stored in c:\windows\microsoft.net\assembly instead of c:\windows\assembly. It isn't very clear how you deployed your publisher policy files, but getting them in the wrong GAC is an explanation of course. Do keep in mind that it is a weapon of last resort, you should never need them when you moved to 4.0. And doesn't have anything to do with a bindingRedirect. – Hans Passant Sep 19 '14 at 22:56
  • I realize that 4.0 is in a new GAC directory. My app is a 4.0 application but it is still referencing assenblies in the old gac. Since these are 2.0 assemblies, I am guessing that the policy files still need to stick in the 2.0 gac. Is that an incorrect assumption? – user3699667 Sep 22 '14 at 12:55

0 Answers0