locked
Reference not in the targeted framework RRS feed

  • Question

  • I am not sure if I am in the right forum to help me but here is what I have run into.

    I am rewritting a module in VS2010 using Framework 4.0 to use the TFS 2010 API.
    It used to be a VS2003 1.1 framework using VSS.
    Everything is working great until I wanted to include some of my old 1.1 DLL's that
    Interface with my database. I was able to incorporate some of the older 1.1 Dll's but when I
    Reference and import the AppSharedObjects DLL I get this error.

    The referenced assembly "C:\Workspace\TEG.ITS.ToolsMethods\Dev\source\PlugletTFS2010\PlugletTFS2010\bin\Debug\PlugletTFS2010.dll" 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. TestPluglet

    Here are the references for th AppSharedObjects DLL.
    System
    Sysetm.Data
    System.Web
    System.XML

    Is there a way to make this work Or do I have to rewite my other DLL's in the 4.0 framework?

    Tuesday, March 29, 2011 7:20 PM

Answers

  • Hi,

    I believe that by default, vs 2010 is targeting the client profile version of .net 4.0; it is a lightweight subset of the entire framework, meant for client setups. Your reference requires elements that are in the full version of the framework. change it in advanced compiler options of your project.

     

    • Proposed as answer by eryang Friday, April 1, 2011 10:53 AM
    • Marked as answer by eryang Monday, April 11, 2011 6:27 AM
    Thursday, March 31, 2011 9:28 AM

All replies

  • Hi,

     

    All DLL's in your project (or even referenced by it) must be compiled in the same target framework.

    Try looking in all DLL's being referecend in your project.

    Tuesday, March 29, 2011 8:46 PM
  • Thanks Marcus but this is not true. I have a utility DLL written in the 1.1 framework that I am referencing in my 4.0 app and it is working just fine.
    Wednesday, March 30, 2011 9:30 PM
  • Hi,

    I believe that by default, vs 2010 is targeting the client profile version of .net 4.0; it is a lightweight subset of the entire framework, meant for client setups. Your reference requires elements that are in the full version of the framework. change it in advanced compiler options of your project.

     

    • Proposed as answer by eryang Friday, April 1, 2011 10:53 AM
    • Marked as answer by eryang Monday, April 11, 2011 6:27 AM
    Thursday, March 31, 2011 9:28 AM