Windows Phone Deployment Error - "Deployment optimization failed due to an invalid assembly"

来源:互联网 发布:联合国全球贸易数据库 编辑:程序博客网 时间:2024/06/02 16:35

my solution structure is below:

   -UI Project (ARM) 

      - reference to http://www.nuget.org/packages/microsoft.bcl.compression (so need to target ARM or x86 only, no AnyCPU)

   -PCL Project (AnyCpu)

solution build is OK but got below error when deploy app to device:

    "Deployment optimization failed due to an invalid assembly"

After checked a sample project with same project structure, I found there was one line highlighted below redundant in my UI project .csproj file, remove that line then fixed!


 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>Bin\ARM\Debug</OutputPath>
    <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>

    <TargetPlatform>ARM</TargetPlatform>

  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>Bin\ARM\Release</OutputPath>
    <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
    <NoStdLib>true</NoStdLib>
    <NoConfig>true</NoConfig>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>

    <TargetPlatform>ARM</TargetPlatform>
  </PropertyGroup>
  <ItemGroup>



0 0
原创粉丝点击