visual-studio-2015 - Roslyn 中的重大更改列表

标签 visual-studio-2015 roslyn csc

切换到 Visual Studio 2015 后,我们注意到 Roslyn 中 lambda 编译为 MSIL 的方式发生了一些变化(在 this threadon GitHub 中描述)在某些情况下引入了运行时故障。

由于 Roslyn 显然是 .NET 的 future ,我们想切换到这项技术,但似乎所有在生产中运行的遗留代码(我们有相当程度的信心它可以正常工作)是现在容易出现新的运行时故障。这些库也受此问题影响(如 Moq, for example)。

我们已经跳过了升级到 RyuJIT 的 its issues ,但我相信 Visual Studio 2015 与 Roslyn 高度集成,我认为我们不能简单地手动替换 csc.exe(但那是 a different question )。

那么,Roslyn 中是否有一个重大更改的汇编列表,我们可以引用它来了解我们可以期待什么?

最佳答案

(更新)

感谢@NealGafter 提供链接。目前可以在此处找到重大更改列表:


似乎有些文档应该在这里:Roslyn Compiler Specification (roslyn/docs/compilers on GitHub) .根据描述:

The compiler specification details the supported (and semi-supported) surface area of the Roslyn VB and C# compilers. This includes

  1. Command-line switches and their meaning
  2. Breaking changes from previous versions of the compilers
  3. Compiler behaviors that are (intentionally) contrary to the specification
  4. Compiler features not described by the language specification
    • COM-specific and other Microsoft-specific features
    • "Well-known" attributes that affect compiler behavior
    • The "ruleset" file syntax and semantics
  5. Features included for interoperability between C# and VB, for example
    • Named Indexers use from C#
  6. Places where the compiler behavior diverges from the language specification
  7. Limitations (e.g. identifier length)
  8. History of language changes per version

描述 CodeGen 关于 lambda 的更改的文档(因为这是我最初的问题)位于 roslyn/docs/compilers/CSharp/CodeGen Differences :

Non-lifting Lambda expressions are now implemented as instance methods on singleton display classes. Since the entry point to the delegate is the instance "Invoke" method, it is cheaper at runtime to dispatch delegate invocations to the underlying implementing method if such method is also an instance method with exactly same formal signature as "Invoke".

关于visual-studio-2015 - Roslyn 中的重大更改列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33954768/

相关文章:

c# - 在 Xamarin iOS 中检索 JSON 数据

windows - Visual Studio 2015 无法构建 Windows 10 通用应用程序?

C++ executeQuery() 错误显示表中的 MySQL 数据

c# - 有没有办法为 "r and "加载命令设置工作目录

c# - 检查ClassDeclarationSyntax是否实现了特定接口(interface)(Standalone代码分析工具)

c# - 如何从 Roslyn 脚本文件加载引用的脚本库?

c# - C# 项目的编译器命令行

reporting-services - 我可以使用 SQL Server 2008 R2 在 VS 2015 中创建 SSRS 报告吗?

c# - 用新的 Roslyn 构建替换 c# 编译器

c# - 没有主方法,我无法使用命令行生成dll文件