添加了对csproj文件的条件引用
<Choose>
<When Condition="'$(Configuration)' == 'Debug With Project References'">
<ItemGroup>
<Reference Include="System.Windows.Forms" />
</ItemGroup>
</When>
</Choose>
现在有错误:
The required attribute include is empty or missing from the element choose
答案 0 :(得分:0)
请勿尝试在<Choose>
内插入<ItemGroup>
标记,然后将其放置在下方:
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<Choose>
<When Condition="'$(Configuration)' == 'Debug With Project References'">
<ItemGroup>
<Reference Include="System.Windows.Forms" />
</ItemGroup>
</When>
</Choose>