I'm trying to set a different Icon for each build configuration of my C# project (using VS 2010 pro). One config is for a different customer, thus that config should use a different icon.
I'm not sure why this doesn't work in the csproj file:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
...blah...
<ApplicationIcon>ImagesRegularIcon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Customer|AnyCPU' ">
...blah...
<ApplicationIcon>ImagesCustomerIcon.ico</ApplicationIcon>
</PropertyGroup>
It doesn't work. Not really sure if I'm on the right track.
One frustrating thing... if I set the icon in Visual Studio with in the Properties->Application tab, it creates this in the csproj file:
<PropertyGroup>
<ApplicationIcon>Imagesfoo.ico</ApplicationIcon>
</PropertyGroup>
Why does the icon specified in this anonymous PropertyGroup get obeyed, but the one in my conditional PropertyGroup get ignored?
I appreciate any help with this one.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…