如何从visual studio 2013中禁用mscorlib.dll?

use*_*018 6 c# msbuild visual-studio

我试图在visual studio 2013中使用自定义标准库,似乎无法弄明白.使用/ nostdlib在命令行上编译没有问题,尽管我希望能够在IDE中利用intellisense.除了我的自定义corelib之外,我已经删除了所有引用,并且由于有两个mscorlib变体,我遇到了相互矛盾的代码错误.

VS文档说:

在Visual Studio开发环境中设置此编译器选项

  1. 打开项目的" 属性"页面.

  2. 单击" 构建属性"页面.

  3. 单击" 高级"按钮.

  4. 修改不要引用mscorlib.dll属性.

虽然情况似乎并非如此,因为此选项不存在.有谁知道如何在vs2013中禁用mscorlib.dll?

Yel*_*ife 7

这是一个老问题,但实际上 - 当UI选项消失(或移动)并且文档仍然存在误导性时,您仍然可以通过<NoStdLib>True</NoStdLib>在高级设置中找到的其他选项附近添加到.csproj中来复制效果:

<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    ...
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <NoStdLib>True</NoStdLib>
    <TargetFrameworkProfile />
  </PropertyGroup>
...
</Project>
Run Code Online (Sandbox Code Playgroud)