Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there a way to force using a dll version?
    text
    copied!<p>Is there a way to force the usage of a specific dll version? from the app.config?</p> <p>(backstory) We are using SQL Compact 3.5, and cannot for business reasons (yea, I know) move to SQL Compact 3.5 SP1 for the moment. We have the System.Data.SqlServerCe and all the unmanaged dlls in our build directory, but if SP1 is installed, the app loads up and uses the SP1 managed dll (and by extension, I assume the unmanaged ones too).</p> <p>The version number of the pre-sp1 dll is 3.5.0.0, the sp1 version is 3.5.1.0</p> <p>I've set the reference to the System.Data.SqlServerCe to CopyLocal = true and Specific Version = true, but it still uses the SP1 version, even when the pre-sp1 version is in our build directory (assume its using the one from the GAC). I've tried adding the reference from the GAC, as well as manually going into the file system and referencing the dll directly.</p> <p>(just to make it clear, clients are installing the service pack for other software that needs it, but we need to still run the pre-sp1 version even when the service pack is installed)</p> <p>Is there any way to force .net to use the one we have in our build directory?</p> <p><strong>UPDATE:</strong></p> <p>I put an override in the app config like <a href="https://stackoverflow.com/questions/267693/how-can-i-force-net-to-use-a-local-copy-of-an-assembly-thats-in-the-gac">this question</a>, but running the assembly binding log viewer gives me this:</p> <pre><code>LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Projects\ConsoleApplication11\bin\Debug\ConsoleApplication11.exe.Config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG: Redirect found in application configuration file: 3.5.0.0 redirected to 3.5.0.0. LOG: Publisher policy file is found at C:\Windows\assembly\GAC_MSIL\policy.3.5.System.Data.SqlServerCe\3.5.0.0__89845dcd8080cc91\publisher.config. LOG: Publisher policy file redirect is found: 3.5.0.0 redirected to 3.5.1.0. LOG: ProcessorArchitecture is locked to MSIL. LOG: Post-policy reference: System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL LOG: Found assembly by looking in the GAC. LOG: Binding succeeds. Returns assembly from C:\Windows\assembly\GAC_MSIL\System.Data.SqlServerCe\3.5.1.0__89845dcd8080cc91\System.Data.SqlServerCe.dll. LOG: Assembly is loaded in default load context. </code></pre> <p>It looks like the config for the 3.5.1 assembly in the GAC is overriding it. Any way of forcing the issue from my app.config?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload