简体   繁体   English

asp.net core为什么把源码转成汇编?

[英]Asp.net core why the source code is converted to assembly?

我想了解一些事情,如果asp.net core 是一个开源框架,为什么我无法在visual studio 上读取函数的定义和源代码并将其编译为程序集,为什么它不仅仅是一个项目,我们可以看到所有代码并了解背后的内容

Because the fact that .NET Core is fully open sourced does nothing to do with the other fact that C# is compiled into Common Intermediate Language (CIL) and executed by the Core Common Language Runtime (CoreCLR).因为 .NET Core 是完全开源的这一事实与 C# 被编译为 公共中间语言(CIL)并由核心公共语言运行时(CoreCLR) 执行的另一个事实无关。

That is, C# is a compiled language .也就是说,C# 是一种编译语言 With .NET Native, C# is also compiled into machine code (assembler) instead of intermediate language .使用 .NET Native,C# 也被编译成机器代码(汇编程序)而不是中间语言

In other words, you don't execute source code with your programs in .NET like an interpreted language.换句话说,您不会像解释性语言那样使用 .NET 中的程序来执行源代码。

You can still achieve your goal...你仍然可以实现你的目标......

Since ASP.NET Core and .NET Core are open source products, if you compile them yourself in your own machine and you add project references to them in your solution, you'll get what you want.由于 ASP.NET Core 和 .NET Core 是开源产品,如果您在自己的机器上自行编译它们并在您的解决方案中添加对它们的项目引用,您将得到您想要的。

BTW, you'll end up building the entire ASP.NET Core and .NET Core as part of your own solution.....顺便说一句,您最终将构建整个 ASP.NET Core 和 .NET Core 作为您自己解决方案的一部分......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM