CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2008
    Posts
    10

    Assembly redirection in .NET

    Hello,
    I m creating a C# .NET Project in which i m trying to load third party Assemblies which are installed in GAC.

    But in some machines I m getting an error stating "Unable to Load assembly of specified version 7.0.351.0".

    when i tried to do an assembly redirection it didn't work it still shows the same error.

    Note:
    7.0.351.0 - Is the version with which it is compiled.

    12.0.0.0 - Assembly present in the Target machine

    Properties of Reference
    Specific Version -> False

    Aliases -> global

    Copy Local -> False



    This is my sample application configuration file
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <runtime>

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" >

    <dependentAssembly>

    <assemblyIdentity

    name="Act.Framework"

    publicKeyToken="ebf6b2ff4d0a08aa" />

    <bindingRedirect oldVersion="7.0.351.0"

    newVersion="12.0.0.0" />


    </dependentAssembly>

    </assemblyBinding>

    </runtime>

    </configuration>

    I have not placed the assemblies in application path, I just want it to redirect to the version present in the GAC(12.0.0.0).

    How do I Proceed with this?

    Thanks in Advance.

  2. #2
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: Assembly redirection in .NET

    Check the culture of the assembly and the architecture, it can matter. Also, try to use FUSLOGVW.exe to see more detailed error message (it is part of VS or SDK).
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured