必需的属性包含为空或元素选择中缺少



添加了对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

不要尝试在 <ItemGroup> 中插入<Choose>标签,将其放在下一个:

  <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>

相关内容

  • 没有找到相关文章

最新更新