I am trying to run a .NET 4.0 Console application that references a sister library project (Bar.dll) which itself references System.Web.Extensions in VS2010 B2. I am currently only interested in getting access to System.Web.Scripting.JavaScriptSerializer
.
Both projects have references to System.Web.Extensions (using the one listed under ".NET" in the App References dialog), but when I try to compile/run the application, the compiler barks:
C:\Windows\Microsoft.NET\Framework\v4.0.21006\Microsoft.Common.targets(1291,9): warning MSB3253: The referenced assembly "Bar.dll" could not be resolved because it has a dependency on "System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client".
Seriously? What's going on? Why won't the compiler link with the assembly?
currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". ^^^^^^^^^^^^^^
You're targeting the Client Profile, which doesn't include the Web assemblies. Go into Project > Properties > Application and change Target Framework to ".NET Framework 4".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With