Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There are a few things you need to pay attention to,</p> <ol> <li><p>In your question, please provide enough details. You don't even paste the error message, which makes it hard to join the discussion.</p></li> <li><p>Learn how MSBuild translates a project to C# command line.</p></li> </ol> <p>That latter is difficult to achieve, but if you enable verbose logging of MSBuild, you will see tons on log entries that show you what is under the hood.</p> <p>About the reference to <code>mscorlib</code>, in most cases it is implicit. There is no <code>&lt;Reference Include="mscorlib"&gt;</code> normally, and no <code>&lt;NoStdLib&gt;True&lt;/NoStdLib&gt;</code>. In this way, MSBuild will call C# compiler with /nostdlib-.</p> <p>For certain project types (.NET CF projects typically), VS adds <code>&lt;NoStdLib&gt;True&lt;/NoStdLib&gt;</code> to project file, and also <code>&lt;Reference Include="mscorlib"&gt;</code> to the corresponding platform's <code>mscorlib.dll</code>. A sample file can be found <a href="https://github.com/lextm/sharpsnmplib/blob/master/SharpSnmpLib/sharpsnmplib.cf35.csproj" rel="nofollow">here</a>. In this way, MSBuild calls C# compiler with /nostdlib+.</p> <p>Thus, if you experience any compilation issue related to mscorlib, please check your project file, as well as MSBuild verbose logging. That should let you easily know what is wrong. </p> <p>Updated: <a href="http://www.lextm.com/2013/08/how-to-resolve-mscorlib-related-issues-in-visual-studiomsbuild/" rel="nofollow">http://www.lextm.com/2013/08/how-to-resolve-mscorlib-related-issues-in-visual-studiomsbuild/</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload