I am currently using the new throw expression in C # as such:
_configurator = configurator ?? throw new ArgumentException(nameof(configurator));
It compiles easily inside Visual Studio 2017, however, when it is deployed in my intermediate slot from my version control (in this case, BitBucket), it fails:
Repositories\UserRepository.cs(46,45): error CS1525: Invalid expression term 'throw' [D:\home\site\repository\foo\foo.csproj]
This happens in several places in my project.
How can I configure my WebApp to allow compilation of this new throw function? The only workaround I found now is to compile it locally and manually publish through Visual Studio. I would like to use the automatic deployment option that Azure allows.
I found this error , which relates to a local project, but I'm not sure how to update Microsoft.Net.Compilers on WebApp. My slot is installed in .NET 4.6
Thank,
source
share