Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is it possible to configure an Umbraco 7 site to compile the templates/views using c# 6? If yes, how?
What if the site is hosted on the Umbraco Cloud?
Not sure on Cloud, but locally you can:
Updated the Microsoft.Net.Compilers NuGet package to latest version.
Microsoft.Net.Compilers
In your web.config add:
web.config
<system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:7 /nowarn:1659;1699;1701" /> </compilers> </system.codedom>
Change langversion to suit.
Thanks, Dan! I was aware of this, but uncertain if it will work on Umbraco Cloud. Anyone tried it?
Does it work in Cloud in the end or not?
This comes built in with the latest Umbraco version, so if you’re keeping up with the upgrades in Umbraco Cloud, then yes, it works!
-Tor
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
CSharp version 6
Is it possible to configure an Umbraco 7 site to compile the templates/views using c# 6? If yes, how?
What if the site is hosted on the Umbraco Cloud?
Not sure on Cloud, but locally you can:
Updated the
Microsoft.Net.Compilers
NuGet package to latest version.In your
web.config
add:Change langversion to suit.
Thanks, Dan! I was aware of this, but uncertain if it will work on Umbraco Cloud. Anyone tried it?
Does it work in Cloud in the end or not?
This comes built in with the latest Umbraco version, so if you’re keeping up with the upgrades in Umbraco Cloud, then yes, it works!
-Tor
is working on a reply...