{"id":36854,"date":"2016-09-20T12:00:58","date_gmt":"2016-09-20T19:00:58","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/?p=7615"},"modified":"2016-09-20T12:00:58","modified_gmt":"2016-09-20T19:00:58","slug":"announcing-the-dotnetcompilerplatform-1-0-2-release","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-the-dotnetcompilerplatform-1-0-2-release\/","title":{"rendered":"Announcing the DotNetCompilerPlatform 1.0.2 release"},"content":{"rendered":"<h2>Update<\/h2>\n<p><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.CodeDom.Providers.DotNetCompilerPlatform\/\">Microsoft.CodeDom.Providers.DotNetCompilerPlatform<\/a> is now open sourced on GitHub. If you have any suggestion or issue, please go to <a href=\"https:\/\/github.com\/aspnet\/RoslynCodeDomProvider\">this link<\/a> and post your thought there.<\/p>\n<p>&nbsp;<\/p>\n<p>Today I&#8217;m pleased to announce that the\u00a0<a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.CodeDom.Providers.DotNetCompilerPlatform\/\">Microsoft.CodeDom.Providers.DotNetCompilerPlatform<\/a> 1.0.2 package is released on NuGet. It enables\u00a0ASP.NET to support the new language features and improves the compilation performance. To install this NuGet package, open NuGet Package Manager in visual studio, search\u00a0Microsoft.CodeDom.Providers.DotNetCompilerPlatform and click Install\/Update button.<\/p>\n<h2>What\u2019s new in the new release<\/h2>\n<ol>\n<li>Update the dependency package Microsoft.Net.Compilers to which is the latest RTM version of the Roslyn compiler. This new version addresses a performance issue with csc.exe on single core machines.<\/li>\n<li>Disable profiling when launching Roslyn compiler. the profiling is enabled on the w3wp.exe process, CLR will not load NGEN\u2019d assembly which could slow down cold startup performance. The Roslyn compiler references several large assemblies and takes several seconds to start the Roslyn compiler process if those reference assemblies are not loaded from NGEN. This new version disables profiling when starting the compiler. If you do want to profile the Roslyn compiler, you can add the following appsetting entry in web.config.\n<pre><em>&lt;appSettings&gt;<\/em><em>&lt;add key=\"aspnet:DisableProfilingDuringCompilation\" value=\"false\"\/&gt;<\/em><em>&lt;\/appSettings&gt;<\/em><\/pre>\n<\/li>\n<li>Address an <a href=\"https:\/\/github.com\/dotnet\/roslyn\/issues\/12255\">issue<\/a> on GitHub which causes a compilation error. The root cause of the issue is that the Roslyn compiler assemblies are included as project items which are part of the &#8220;candidate assembly files&#8221;. \u00a0In the error case, ResolveAssemblyReferences task resolves the reference assembly, namely System.Collections.Immutable.dll, to the one under Roslyn compiler folder which may be an older version than the project actually references. This new release fixes the issue.<\/li>\n<\/ol>\n<h2>Tips<\/h2>\n<p>Roslyn compiler references several large assemblies and it takes several seconds to load them all, as CLR needs to JIT them. So to get better performance (for a simple website, the cold startup is about 50% faster), it\u2019s highly recommended to NGEN those assemblies. Here are the commands to do NGEN.<\/p>\n<pre>Ngen.exe install Microsoft.CodeAnalysis.CSharp.dll<\/pre>\n<p>Ngen.exe is under %SystemRoot%Microsoft.NetFrameworkv4.0.30319 folder and you may want to NGEN all the managed assemblies in Roslyn compiler package. (If\u00a0you are using 64 bits\u00a0OS\u00a0, please use 64 bits NGEN which is under %SystemRoot%Microsoft.NetFramework64v4.0.30319\u00a0folder.)<\/p>\n<h2>Known issue<\/h2>\n<p>When you update Microsoft.CodeDom.Providers.DotNetCompilerPlatform nuget package you may see an error message similar to that in the image below when updating the Microsoft.Net.Compilers NuGet package. This happens because the Roslyn compiler process is still active and NuGet fails to uninstall the old one. To work around this issue, please restart Visual Studio and reinstall the package.<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2016\/09\/nuget_error1.png\"><img decoding=\"async\" width=\"879\" height=\"125\" class=\"alignnone size-large wp-image-7635\" alt=\"nuget_error\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2016\/09\/nuget_error1-1024x146-1.png\" \/><\/a><\/p>\n<h3><\/h3>\n<h2>Feedback<\/h2>\n<p>If you find any issue or want to ask a question regarding what\u2019s discussed in this article, please leave a comment below, or use the<span>\u00a0<\/span><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.CodeDom.Providers.DotNetCompilerPlatform\/ContactOwners\">Contact Owners form<\/a><span>\u00a0<\/span>for the NuGet package.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update Microsoft.CodeDom.Providers.DotNetCompilerPlatform is now open sourced on GitHub. If you have any suggestion or issue, please go to this link and post your thought there. &nbsp; Today I&#8217;m pleased to announce that the\u00a0Microsoft.CodeDom.Providers.DotNetCompilerPlatform 1.0.2 package is released on NuGet. It enables\u00a0ASP.NET to support the new language features and improves the compilation performance. To install this [&hellip;]<\/p>\n","protected":false},"author":461,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[4,31,7347,7434,7333,7422],"class_list":["post-36854","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-net","tag-asp-net","tag-asp-net-4","tag-asp-net-4-5","tag-asp-net-mvc","tag-asp-net-web-forms"],"acf":[],"blog_post_summary":"<p>Update Microsoft.CodeDom.Providers.DotNetCompilerPlatform is now open sourced on GitHub. If you have any suggestion or issue, please go to this link and post your thought there. &nbsp; Today I&#8217;m pleased to announce that the\u00a0Microsoft.CodeDom.Providers.DotNetCompilerPlatform 1.0.2 package is released on NuGet. It enables\u00a0ASP.NET to support the new language features and improves the compilation performance. To install this [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/36854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/461"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=36854"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/36854\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=36854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=36854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=36854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}