Error after upgrading to K11

Develpment Operations asked on April 27, 2018 13:11

Hi After running upgrade 10.19 to K11 our site is broken with the following Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1056: Unexpected character '$'

Source Error:

Line 38: var script = $@"

Line 39: var IsCMSDesk = true;

Recent Answers


Develpment Operations answered on April 27, 2018 13:30 (last edited on April 27, 2018 13:31)

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 27, 2018 17:40

Did you have custom code you missed when upgrading your project?

Your error message is pretty vague so you might want to check the IIS event logs or the regular computer event logs.

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on April 27, 2018 20:42 (last edited on April 27, 2018 21:09)

I worked on a case with the same issue two days ago. Make sure the Roslyn compiler NuGet package is installed

https://docs.kentico.com/k11/installation/upgrading-to-kentico-11

Required .NET Compiler Platform

Kentico 11 requires the .NET Compiler Platform ("Roslyn") compiler to run. Installations of Kentico 10 or newer contain the Microsoft.CodeDom.Providers.DotNetCompilerPlatform NuGet package by default, which provides the required functionality.

However, if your project is upgraded from Kentico 9 or older, you may be missing the package. In these cases, you need to install the package before applying the upgrade:

  1. Open your Kentico solution in Visual Studio.
  2. Right-click the main web project in the Solution Explorer and select Manage NuGet Packages.
  3. Install the Microsoft.CodeDom.Providers.DotNetCompilerPlatform NuGet package (version 1.0.2 or newer).
3 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.