Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 6.x > Installation and deployment > EmailTemplateMacros.cs(362): error CS1031: Type expected error after 5.5 > 6 upgrade View modes: 
User avatar
Member
Member
Darren - 12/14/2011 7:33:39 PM
   
EmailTemplateMacros.cs(362): error CS1031: Type expected error after 5.5 > 6 upgrade
I used the upgrade tool to move from 5.5 to 6.0 however I was getting the following error:

Event code: 3008
Event message: A configuration error has occurred.
Event time: 12/15/2011 9:21:38 AM
Event time (UTC): 12/14/2011 10:21:38 PM
Event ID: b6117a3acbea4a11931f8247b6393b9d
Event sequence: 1
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/2/ROOT-2-129683748198535749
Trust level: Full
Application Virtual Path: /
Application Path: C:\inetpub\wwwroot\CmsWebsite\
Machine name: GGSWEB

Process information:
Process ID: 3548
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: HttpException
Exception message: Could not load file or assembly 'System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (C:\inetpub\wwwroot\CmsWebsite\web.config line 98)

Request information:
Request URL: http://www.ggs.vic.edu.au/wallcalendar/popupreadBb.aspx?MonthN=14
Request path: /wallcalendar/popupreadBb.aspx
User host address: 172.16.1.3
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 6
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)


Custom event details:

-----------------

I've installed .NET 3.5 but am getting this issue:

Event code: 3007
Event message: A compilation error has occurred.
Event time: 12/15/2011 9:55:39 AM
Event time (UTC): 12/14/2011 10:55:39 PM
Event ID: 498ab0541b94496aabedf03b6dff65fc
Event sequence: 3
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/2/ROOT-6-129683769308578037
Trust level: Full
Application Virtual Path: /
Application Path: C:\inetpub\wwwroot\CmsWebsite\
Machine name: xxxx

Process information:
Process ID: 3548
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: HttpCompileException
Exception message: c:\inetpub\wwwroot\CmsWebsite\App_Code\CMSModules\EmailTemplates\EmailTemplateMacros.cs(362): error CS1031: Type expected

Request information:
Request URL: http://www.ggs.vic.edu.au/cmsdesk/default.aspx
Request path: /cmsdesk/default.aspx
User host address: 172.16.1.7
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 6
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed)
at System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories)
at System.Web.Compilation.BuildManager.CompileCodeDirectories()
at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)


Custom event details:

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 12/15/2011 7:20:48 AM
   
RE:EmailTemplateMacros.cs(362): error CS1031: Type expected error after 5.5 > 6 upgrade
Hello,

Could you please make sure you are using the correct version of the file in the error message (EmailTemplateMacros.cs)? Could you please post the 362th line from that file?
Please double check that you are using the Kentico CMS dll files for the correct .NET version. The version of the System.Web.Extensions.Design.dll file should be also of the same version, e.g. 3.5.0.0 and you also need to use the proper web.config file for the .NET 3.5 version with reference to correct version of System.Web.Extensions.Design assembly. There should be following line of code in your web.config file:

<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Once more, this is an example for the 3.5 version of .NET.

Best regards,
Boris Pocatko

User avatar
Member
Member
andrew-tod - 1/25/2014 4:55:19 PM
   
RE:EmailTemplateMacros.cs(362): error CS1031: Type expected error after 5.5 > 6 upgrade
Hi, I've just got exactly the same error - was this ever resolved? What I've done to date:

1. Re-copied the EmailTemplateMacros.cs file from the deployment folder to ensure it is using the correct version.
2. Re-copied the CMS dll files for .Net 3.5 to make sure they are correct.
3. Confirmed that the C:\Windows\assembly\System.Web.Extensions.Design.dll file is version 3.5.0.0
4. Confirmed that the web.config file contains <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Line 362 is: private static void RegisterValues(this MacroResolver resolver, string[] names)

What else am I missing?

Thanks.

User avatar
Member
Member
kentico_sandroj - 1/27/2014 5:04:48 PM
   
RE:EmailTemplateMacros.cs(362): error CS1031: Type expected error after 5.5 > 6 upgrade
Hello,

We have not received a reply to our latest suggestion which was to check for multiple copies of EmailTemplateMacros.cs which can happen when the script fails to remove files from your project folder. This was the solution in a few cases, please let us know if that is not the case in your instance.

Best Regards,
Sandro