Since C1 CMS' built-in image resizer cannot enlarge images I've added modified image resizer library and modified the line below:
// using Composite.Core.WebClient.Media;
using Composite.Core.WebClient.Media.Modded;
Modified files are:
C:\NET\vhosts\C1.CMS.6.6\Website\Composite\services\Media\ImageManipulator.ashx
C:\NET\vhosts\C1.CMS.6.6\Website\Renderers\ShowMedia.ashx
Modified image resizer source codes are located under the folder:
App_Code\ImageResizerModded
Now everything works as perfect... Until I try to add new datatype or modify any. When I do that I got an error:
The line is untouched original source code which works perfectly:
The Stackoverflow answer says about => syntax:
I don't know what's wrong here and how to fix it. The only workaround is to delete ImageResizerModded folder temporarily, modify/add datatype and then undelete the folder. The online site (pictures) affects for a while during the folder is deleted.
How can I fix the issue?




This is due to the compiler used by C1 CMS to do the static checking if changes you made will compile is hardcoded to an old compiler version and not the current Roslyn compiler otherwise shipped in the bin-folder.
In your case C1 CMS compiles the app_code in-memory in this method https://github.com/Orckestra/C1-CMS-Foundation/blob/67275baf443c303623fd1f1ab43721a8e0efdd4f/Composite/Core/Types/CodeCompatibilityChecker.cs#L63, but a quick search shows the
CSharpCodeProviderbeing used in 6 different places https://github.com/Orckestra/C1-CMS-Foundation/search?q=CSharpCodeProvider&unscoped_q=CSharpCodeProviderThis use of
CSharpCodeProviderwould need to be replaced withMicrosoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProviderSo the behavior you see is expected and you can get around it by