Problems encountered in compiling Corefx on mac/linux/windows and their solutions

Source: Internet
Author: User
Tags dotnet

This two-day attempt to compile a. NET cross-platform (CORECLR/COREFX/DNX) Corefx (. NET Core Framework) on the Mac/linux/windows three platforms resulted in the compilation of three platforms failing. Later one by one was solved, share it in this blog post.

A

The errors encountered in compiling COREFX on your Mac are as follows:

/git/dotnet/corefx/dir.props (214,5): warning:the Roslyn targets do not Exist-roslyn would not be used for this build, BU T the package should is restored if you build again. [/git/dotnet/corefx/src/dirs.proj]/git/dotnet/corefx/dir.props (214,5): warning:the Roslyn targets do not exist- Roslyn is not being used for this build, and the package should is restored if you build again. [/git/dotnet/corefx/src/microsoft.csharp/src/microsoft.csharp.csproj]/var/folders/c4/lf8cm6lx5178xsswpzfs2f_ C0000gn/t/tmp257bf798c8da46a7baf3954722152b21.exec.cmd:line 3:/git/dotnet/corefx/packages/ Dnx-mono.1.0.0-beta5-11760/bin/dnu:permission denied/git/dotnet/corefx/packages/ Microsoft.dotnet.buildtools.1.0.25-prerelease-00050/lib/packageresolve.targets (31,5): Error msb3073:the Command "" /git/dotnet/corefx/packages/dnx-mono.1.0.0-beta5-11760/bin/dnu "Restore--packages"/git/dotnet/corefx/packages "" /git/dotnet/corefx/src/microsoft.csharp/src/project.json "" exited with code 126. [/git/dotnet/corefx/src/mIcrosoft. Csharp/src/microsoft.csharp.csproj] ... 6 Warning (s) 5 Error (s)

Delete Corefx in Packages folder recompile, the error becomes:

Compile again and go back to the previous error.

The suspicion that the problem was caused by a network problem between the Mac and the NuGet server led to a successful compilation of all the packages required by COREFX from another Linux server.

scp-r [Email protected]:/git/corefx/packages//git/dotnet/corefx
./build.sh    . 1 Warning (s)    0 Error (s) time Elapsed 00:07:33.93build Exit Code = 0

Two

The errors encountered in compiling Corefx on Linux CentOS are as follows:

Restoring MSBuild ...  WARNING:Error:SendFailure (Error writing headers) WARNING:Error:SendFailure (Error writing headers) Warning:the request Timed outWARNING:Error:SendFailure (Error writing headers) Unable to find version ' 14.1.0.0-prerelease ' of the package ' MICR Osoft. Build.Mono.Debug '. Failed to restore MSBuild.

This problem is due to the fact that the root certificate is not installed on Linux and the NuGet server cannot be accessed with HTTPS, and running the following command will solve the problem:

Mozroots--import--sync

Three

The errors encountered in compiling Corefx on Windows are as follows (Visual Studio 2015 is installed on your computer):

Corefx\src\common\src\system\sr.cs (19,67): Error CS0117: ' SR ' does not contain a definition for ' resourcetype ' [COREFX\SR C\microsoft.csharp\src\microsoft.csharp.csproj] ...

This problem is strange, unexpectedly is a time ago compile Corefx when the file generated in the Bin folder, delete the Bin folder in Corefx, recompile, the problem disappears.

"RELATED LINKS"

Build fails on mac/linux/windows

Problems encountered in compiling Corefx on mac/linux/windows and their solutions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.