Bug #59252 Dependency on System.Web could not be resolved
Submitted: 2 Jan 2011 16:49 Modified: 17 Mar 2011 17:24
Reporter: Louis Breda van Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.3.5 OS:Microsoft Windows (WIndows7 64bit)
Assigned to: CPU Architecture:Any
Tags: dependency, PublicKeyToken, System.Web

[2 Jan 2011 16:49] Louis Breda van
Description:
Hello,

When using Visual Studio 2010 vb.net in combination with 64 bit MySQL 5.5.8 (and earlier I think), I sometimes met unexpected errors.

Looking into the Visual Studio compiler warnings I did notice the following error, which might be related to vague (.net inteface sometimes not responding) problems I have now and than.

Warning	1	The referenced assembly "MySql.Web, Version=6.3.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, 
processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.	TheFirstProj

Probably the microsoft warning is clear engough to point to the problem direction.

Sincerely,

Louis 

How to repeat:
I expect the problem to occur with many Visual Studio <> .net-connector <> MySQL server combinations.

My impession from an internet query based on the PublicKeyToken is that the problem *might be* new in connector version 6.3.5
[3 Jan 2011 8:43] Tonci Grgin
Hey Louis. I do not know when will I have time to check on this, sorry.
From the first look, think it's just that some (wrong) version numbers were hard-coded...
[15 Feb 2011 16:19] Richard Deeming
The warning means you're referencing MySql.Web from a project which is targeting the client profile. The MySql.Web assembly depends on the System.Web assembly, which is not part of the client profile.

If you need the reference to MySql.Web, change the project to target the full .NET Framework 4 profile. If you don't need the reference, then you can remove it.
[15 Feb 2011 19:03] Louis Breda van
Richard,

I just read your comment. Thanks, however I do not understand it, so could you please explain a bit more.

I just created a new .net4.0 project, not doing any thing special IMHO / as far as I know.

The warning means you're referencing MySql.Web from a project which is targeting the client profile
>> chinese to me; Could be that I did install MySQL.net of course
>> I do not understand

The MySql.Web assembly depends on the System.Web assembly;
>> OK

which is not part of the client profile 
>> should I install something???

If you need the reference to MySql.Web
>> what is it??

change the project to target the full .NET Framework 4 profile
>> I did not set any thing! So I am probably using the defaults
>> what is wrong with that?  What should I do ?
>> is it not strange that you have errors with the default settings / installation? 

. If you don't need the reference, then you can remove it.
>> Where ?

Bottum line, if it is a setting problem, then the "wrong" setting is probably applied during default installation. 

If the default installation does forget to install something, that is not OK

Also if are relatively simple simple thinks like that, it is still a problem to be fixed in the installer :> (I suppose)

Be aware the whole story is still "chinese" to me  
Just noticing an error :<

Sincerely,

Louis
[16 Feb 2011 14:12] Richard Deeming
The client profile is a subset of the full framework optimized for client applications. [1] 

Several project templates target the client profile by default. You can see which version and profile you are targeting from the project properties page: [2]
VB: Click the Compile tab and then click Advanced Compile Options;
C#: The Target Framework list is on the Application tab of the Project Designer

MySql.Web is an assembly which provides ASP.NET membership providers that work with MySql instead of MS SQL. [3]  If you don't know what it is, you almost certainly don't need the reference! :)

In Visual Studio, open Solution Explorer, expand your project, and expand the "References" folder. Find the entry for "MySql.Web", right-click it and select "Remove".

[1] http://msdn.microsoft.com/en-us/library/cc656912.aspx
[2] http://msdn.microsoft.com/en-us/library/bb398202.aspx
[3] http://dev.mysql.com/doc/refman/5.5/en/connector-net-programming-asp-provider.html
[16 Feb 2011 16:31] Louis Breda van
Richard,

Thanks! I will investigate later :)

Louis
[18 Mar 2011 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".