Hello Folks,
Another problem in MsBuild and MyApp.csproj file.
MyApp.csproj fragment:
<Choose><When Condition=" '$(MyFalseCondition)' == 'True' "> <!-- false condition!!! --><ItemGroup><ProjectReference Include="MyDll.csproj"><Project>{16263b86-4c23-48f3-a174-1b6d8cf0c391}</Project><Name>MyDll</Name><Private>False</Private> <!-- still affect deployment --></ProjectReference></ItemGroup></When><When Condition=" '$(MyTrueCondition)' == 'True' "><ItemGroup><Reference Include="MyDll"><SpecificVersion>False</SpecificVersion><HintPath>MyDll.dll</HintPath><Private>False</Private></Reference></ItemGroup></When></Choose>
MsBuild 4.0 (from Framework folder) runs with params:
MsBuid.exe /p:MyFalseCondition=False;MyTrueCondition=True /t:Publish MyApp.csproj
Build not failed - MyDll.dll sucseffully build or are available in WorkingFolder, MyApp.csproj also build withot errors.
But on deployment MyDll.dll are marked as Prerequisite(Auto) instead of expected Include(Auto) and couse an error about signing.
As far as I known this are coused by <Private>False</Private>, but from <When Condition=" '$(MyFalseCondition)' == 'True' "> branch.
The same <Private>False</Private> in "True" branch should not couse such problem.
Any idea about how to suppress picking up wrong elments on deployment?
Used on the XP Mode VM with host system Win 7 Pro SP 1, installed Framework 4.0 and Studio 2010 Ent.
Sincerely, Highly skilled coding monkey.