views:

47

answers:

0

Hi All,

A colleague of mine has a little problem with his dev env (Win 7 + VS 2010):

We have a class librairy project which reference .net 2.0, if we build it with "Debug" and open it with Reflector, we can see "Target Runtime : 2.0..." if we build it with "Release" configuration, we can see "Target Runtime : v4.0" (and if we use it in our test server we have message error like "This assembly is built by a runtime newer than")

In the project properties I can see ".net framework 2.0" .In my .csproj, I have

<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>

Do you have any idea?

EDIT

here is the beginning of my .csproj

<Project ToolsVersion="2.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{E7122A64-C206-47EB-A511-763FF9C9D560}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>ControlSkin3</RootNamespace>
    <AssemblyName>ControlSkin3</AssemblyName>
    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <Nonshipping>true</Nonshipping>
    <SccProjectName>SAK</SccProjectName>
    <SccLocalPath>SAK</SccLocalPath>
    <SccAuxPath>SAK</SccAuxPath>
    <CodeAnalysisCulture>en-en</CodeAnalysisCulture>
    <TargetCulture>en-en</TargetCulture>
    <SccProvider>SAK</SccProvider>
    <TargetFrameworkProfile />
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
  </PropertyGroup>