Red Gate forums :: View topic - Same Engine.dll, different code?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK Previous Versions
SQL Comparison SDK Previous Versions forum

Same Engine.dll, different code?

Search in SQL Comparison SDK Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
ccollins



Joined: 22 Jun 2005
Posts: 50

PostPosted: Mon Aug 17, 2009 9:18 pm    Post subject: Same Engine.dll, different code? Reply with quote

In a C# .Net solution, how do you add the same reference name to the same project, but different file?


File \BUILD\LOGS\Build1987000_Release.log:
c:\LCSDEV\clr\exe\win32\RedGate.SQLDataCompare.Engine.dll: warning CS1701: Assuming assembly reference 'RedGate.SQLCompare.Engine, Version=7.1.0.182, Culture=neutral, PublicKeyToken=7f465a1c156d4d57' matches 'RedGate.SQLCompare.Engine, Version=8.0.0.309, Culture=neutral, PublicKeyToken=7f465a1c156d4d57', you may need to supply runtime policy
c:\LCSDEV\clr\exe\win32\RedGate.SQLDataCompare.Engine.dll: warning CS1701: Assuming assembly reference 'RedGate.Shared.Utils, Version=7.1.0.39, Culture=neutral, PublicKeyToken=7f465a1c156d4d57' matches 'RedGate.Shared.Utils, Version=7.3.0.25, Culture=neutral, PublicKeyToken=7f465a1c156d4d57', you may need to supply runtime policy
c:\LCSDEV\clr\exe\win32\RedGate.SQLDataCompare.Engine.dll: warning CS1701: Assuming assembly reference 'RedGate.Shared.SQL, Version=7.1.0.39, Culture=neutral, PublicKeyToken=7f465a1c156d4d57' matches 'RedGate.Shared.SQL, Version=7.3.0.25, Culture=neutral, PublicKeyToken=7f465a1c156d4d57', you may need to supply runtime policy
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6581

PostPosted: Tue Aug 18, 2009 10:37 am    Post subject: Reply with quote

Hi Clifton,

I have never been able to update a reference without right-clicking references and adding the reference in again. The VS Project stores the assembly's full name when you add a reference, so you's probably need to tinker with the project by writing an add-in or some bit of code to manually manipulate the .csproj file.

I suppose solution number 2 would be to use some build tool like MSBUILD or NANT to do the build for you, skipping the csproj file entirely and scripting all of the files and references to be compiled.
Back to top
View user's profile Send private message
ccollins



Joined: 22 Jun 2005
Posts: 50

PostPosted: Tue Aug 18, 2009 6:45 pm    Post subject: possible resolution Reply with quote

Using the highest dll versioned file from folders, SQL Compare and SQL Data Compare, copy to a common location for your solution.

Reference the files from the common location for your solution.

Alter the application's app.config, adding the following:

<runtime>
<!-- BEGIN RedGate SQL Compare 8 SDK redirects -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="RedGate.Licensing.Client" publicKeyToken="7F465A1C156D4D57" culture="neutral"/>
<bindingRedirect oldVersion="2.7.0.3" newVersion="2.7.0.6"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="RedGate.SQLCompare.Engine" publicKeyToken="7F465A1C156D4D57" culture="neutral"/>
<bindingRedirect oldVersion="7.1.0.182" newVersion="8.0.0.309"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="RedGate.Shared.Utils" publicKeyToken="7F465A1C156D4D57" culture="neutral"/>
<bindingRedirect oldVersion="7.1.0.39" newVersion="7.3.0.25"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EnvDTE" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="RedGate.Shared.SQL" publicKeyToken="7F465A1C156D4D57" culture="neutral"/>
<bindingRedirect oldVersion="7.1.0.39" newVersion="7.3.0.25"/>
</dependentAssembly>
</assemblyBinding>
<!-- END RedGate SQL Compare 8 SDK redirects -->
</runtime>
Back to top
View user's profile Send private message
ccollins



Joined: 22 Jun 2005
Posts: 50

PostPosted: Tue Aug 18, 2009 6:47 pm    Post subject: Alternate/other applications referencing exe Reply with quote

If you have an other / alternate application that uses the solution, (either dll or exe), for methods, then the other application will require the entries in it's app.config.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6581

PostPosted: Wed Aug 19, 2009 10:18 am    Post subject: Reply with quote

That's a good tip. You have to use care with binding redirection though, because if functions are changed or depricated in the new version, then the applicaiton compiled against the older version will not work correctly.

API versions 7 and 8 are pretty similar in terms of the functions provided, so you can probably get away with this in the short-term.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group