问题
How to compile .NET SDK from source? When I run build.sh, I get a message that the package is being downloaded (I don't understand why, since the goal is to compile). I get a 404 error while downloading and then this:
dotnet_install: Error: Could not find/download: `.NET Core Runtime` with version = 1.0.5
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
回答1:
When I run build.sh, I get a message that the package is being downloaded (I don't understand why, since the goal is to compile)
That's normal. You are trying to compile the SDK, which is itself written in C#. You need a C# compiler (such as the one included in the .NET SDK) to compile the SDK itself.
That's not too different from a C/C++ compiler (such as gcc) requiring a C/C++ compiler to build.
I guess the biggest difference is that the required compiler is downloaded automatically instead of failing and asking the user to install the compiler manually.
dotnet_install: Error: Could not find/download: `.NET Core Runtime` with version = 1.0.5 dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
That's definitely a bug in the SDK build system. I see that you have reported it here: https://github.com/dotnet/sdk/issues/14966. This needs to be fixed by the SDK developers.
来源:https://stackoverflow.com/questions/65264982/how-to-build-net-sdk-from-source