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>