Azure Web App deployment fails to build class library project that uses C# 6 features
Posted August 18, 2015
Reading time: 1 minute
With last week’s announcement that Azure Web Apps
support .NET 4.6
, I excitedly upgraded one my of solutions to .NET 4.6
and pushed the changes to my git repo. Unfortunately, there was a deployment error similar to the following:
|
|
You can read the full details in the issue I filed on Github, but basically if your web application project references a class library project that uses C# 6 features (in my case, string interpolation), Azure Web Apps will fail to build it during deployment. Luckily, there is a simple workaround. In your Web App’s Settings screen in the Azure Portal, add the following App setting:
Or, in text form:
|
|
Kudos to David Ebbo and the Project Kudu team for a quick response, a workaround, and a permanent fix. (As noted in the Github issue, they still need to thoroughly test the fix before rolling it out, so in the meantime, you’ll need to apply the workaround.)