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

前端之家收集整理的这篇文章主要介绍了c# – 如何从visual studio 2013中禁用mscorlib.dll?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图在visual studio 2013中使用自定义标准库,似乎无法弄明白.使用/ nostdlib在命令行上编译没有问题,尽管我希望能够在IDE中利用intellisense.除了我的自定义corelib之外,我已经删除了所有引用,并且由于有两个mscorlib变体,我遇到了相互矛盾的代码错误.

VS文档说:

To set this compiler option in the Visual Studio development environment

  1. Open the Properties page for the project.

  2. Click the Build properties page.

  3. Click the Advanced button.

  4. Modify the Do not reference mscorlib.dll property.

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

解决方法

这是一个老问题,但实际上 – 当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>
原文链接:https://www.f2er.com/csharp/244780.html

猜你在找的C#相关文章