| Author |
Message |
ccollins
Joined: 22 Jun 2005 Posts: 50
|
Posted: Mon Aug 17, 2009 9:18 pm Post subject: Same Engine.dll, different code? |
|
|
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 |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6341 Location: Red Gate Software
|
Posted: Tue Aug 18, 2009 10:37 am Post subject: |
|
|
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. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
ccollins
Joined: 22 Jun 2005 Posts: 50
|
Posted: Tue Aug 18, 2009 6:45 pm Post subject: possible resolution |
|
|
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 |
|
 |
ccollins
Joined: 22 Jun 2005 Posts: 50
|
Posted: Tue Aug 18, 2009 6:47 pm Post subject: Alternate/other applications referencing exe |
|
|
| 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 |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6341 Location: Red Gate Software
|
Posted: Wed Aug 19, 2009 10:18 am Post subject: |
|
|
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. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
|