Adding reference to System.Data.SqlServerCe causes 1 warning and 2 messages on build - by Brian C. Barnes

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


7
0
Sign in
to vote
ID 293537 Comments
Status Closed Workarounds
Type Bug Repros 7
Opened 8/15/2007 6:59:30 PM
Access Restriction Public

Description

Adding a reference to System.Data.SqlServerCe to a SmartDevice project (WM5 or WM6, .Net2 or .Net3.5) causes the following messages to be output when building:

Consider app.config remapping of assembly "System.Data, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes" from Version "2.0.0.0" [] to Version "3.5.0.0" [c:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.Data.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System, Culture=neutral, PublicKeyToken=969db8053d3322ac, Retargetable=Yes" from Version "2.0.0.0" [] to Version "3.5.0.0" [c:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.dll] to solve conflict and get rid of warning.
C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3247: Found conflicts between different versions of the same dependent assembly.
Sign in to post a comment.
Posted by Microsoft on 8/19/2007 at 11:06 PM
Hi Brian,

The warnings are definitely incorrect:
a. This is a bad experience for you - since you get warnings without doing anything
b. The warnings are sporious - v2.0 and v3.5 of the mentioned assemblies are already unified by CF CLR v3.5

However, it is unlikely that we can fix this for you before VS2008 ships.

So the suggestion from us is to use the app.config redirection - exactly as you have already done.

However, please note the following points:
1. If the app.config is deployed into the device as the app.exe.config, the startup time of your application may be affected since the CLR will attempt to decipher the config file.
2. To avoid #1 and get rid of the build warnings, you can set "Copy to Output" property of the app.config to "Do not copy". Of course you will have to change it back if you require to deploy additional informaiton in the app.config

If you had additional issues or feedback, please feel free to contact us.

Thanks for helping make the VS2008 better,
Partho P. Das,
Visual Studio for Devices
Posted by Brian C. Barnes on 8/16/2007 at 11:08 AM
I've made a workaround by adding an "app.config" file to my project, with the following contents:


<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
    <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">
     <dependentassembly>
        <assemblyidentity culture="neutral" publickeytoken="969db8053d3322ac" name="System.Data" />
        <bindingredirect newVersion="3.5.0.0" oldVersion="2.0.0.0" />
     </dependentassembly>
     <dependentassembly>
        <assemblyidentity culture="neutral" publickeytoken="969db8053d3322ac" name="System" />
        <bindingredirect newVersion="3.5.0.0" oldVersion="2.0.0.0" />
     </dependentassembly>
    </assemblybinding>
</runtime>
</configuration>
Posted by Microsoft on 8/15/2007 at 11:32 PM
Thanks for your feedback. We are sending this bug to the appropriate group within the Visual Studio Product Team for triage and resolution. Thank you, Visual Studio Product Team.
Posted by Brian C. Barnes on 8/15/2007 at 8:05 PM
I've attached a project file to hopefully aid in reproducing the problem.
Posted by Brian C. Barnes on 8/15/2007 at 8:05 PM
I've attached the project file to hopefully aid in reproducing the problem.
Posted by Microsoft on 8/15/2007 at 7:31 PM
Thank you for your feedback. We are currently investigating. If this issue is urgent, please call support directly (see http://support.microsoft.com). Thank you, Visual Studio Product Team.