2
Vote

Captcha module has problem in orchard V1.1

description

Copy from http://orchard.codeplex.com/workitem/17741   Compiler Error Message: CS0234: The type or namespace name 'Comments' does not exist in the namespace 'Orchard' (are you missing an assembly reference?)   Server Error in '/OrchardLocal' 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: CS0234: The type or namespace name 'Comments' does not exist in the namespace 'Orchard' (are you missing an assembly reference?)   Source Error:       Line 1: @model Orchard.Captcha.Models.CaptchaSettingsPartRecord Line 2: @using Orchard.Comments.Models; Line 3: Line 4: <fieldset>     Source File: d:\Orchardv1.1\Orchard\Modules\Orchard.Captcha\Views\EditorTemplates\Parts.Captcha.SiteSettings.cshtml Line: 2       Compiler Warning Messages: Warning: CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' Source Error:       [No relevant source lines]     Warning: CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' Source Error:       [No relevant source lines]     Warning: CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' Source Error:       [No relevant source lines]     Warning: CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' Source Error:       [No relevant source lines]     Warning: CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' Source Error:       [No relevant source lines]     Warning: CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll' Source Error:       [No relevant source lines]           Show Detailed Compiler Output:     C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\bb0c1bb7\bf7d55ed_28fbcb01\Orchard.Web.DLL" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Mvc\v4.0_3.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\593d25ec\626f2f7e_27fbcb01\Castle.Core.DLL" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Web.Infrastructure\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Web.Infrastructure.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\b0aed4eb\00f4df88_6ff7cb01\Autofac.Integration.Web.Mvc.DLL" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Helpers\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.Helpers.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Routing\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Routing.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\c7cafdb7\b7c1cbcd_28fbcb01\FluentNHibernate.DLL" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Abstractions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Abstractions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Deployment\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\c43b1c55\002f3891_6ff7cb01\Orchard.WarmupStarter.DLL" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\App_global.asax.ssdufsrq.dll" /R:"C:\Windows\assembly\GAC_MSIL\log4net\1.2.10.0__1b44e1d426115821\log4net.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\d2113b63\00020790_6ff7cb01\Orchard.Framework.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\c324ae07\1d49ea35_1cfbcb01\WatchersNET.CKEditor.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\dd817e4f\002f3891_6ff7cb01\Orchard.Core.DLL" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Razor\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.Razor.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\fb19fa69\00f4df88_6ff7cb01\Autofac.Integration.Web.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\5e5225a7\00f4df88_6ff7cb01\Autofac.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\c1cb919d\008f77eb_28fbcb01\Iesi.Collections.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\f0c330c6\e936cccd_28fbcb01\Castle.DynamicProxy2.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\41bb6927\b15a5636_27fbcb01\Autofac.Configuration.DLL" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages.Razor\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.Razor.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\0ccc1a31\fd464ad9_28fbcb01\NHibernate.ByteCode.Castle.DLL" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WebMatrix.Data\v4.0_1.0.0.0__31bf3856ad364e35\WebMatrix.Data.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\98df0a75\dcf849d9_28fbcb01\NHibernate.DLL" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\9edf69b2\f95dcccd_28fbcb01\ClaySharp.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\App_Web_b0cjemko.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\20de30c1\0021118a_6ff7cb01\System.Data.SqlServerCe.DLL" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\assembly\dl3\13fe3015\bf7787e1_28fbcb01\NHibernate.Linq.DLL" /out:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\App_Web_parts.captcha.sitesettings.cshtml.e65a76d7.-iiwzkqq.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 /warnaserror- "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\App_Web_parts.captcha.sitesettings.cshtml.e65a76d7.-iiwzkqq.0.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\orchardlocal\045c7bb8\601653b9\App_Web_parts.captcha.sitesettings.cshtml.e65a76d7.-iiwzkqq.1.cs"     Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1 Copyright (C) Microsoft Corporation. All rights reserved.   warning CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' warning CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' warning CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' warning CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' warning CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll' d:\Orchardv1.1\Orchard\Modules\Orchard.Captcha\Views\EditorTemplates\Parts.Captcha.SiteSettings.cshtml(2,19): error CS0234: The type or namespace name 'Comments' does not exist in the namespace 'Orchard' (are you missing an assembly reference?)   -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225

comments

HansSpitters wrote May 31, 2011 at 10:24 PM

Hello,
i've the same error :
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: CS0234: The type or namespace name 'Comments' does not exist in the namespace 'Orchard' (are you missing an assembly reference?)

Source Error:



Line 1: @model Orchard.Captcha.Models.CaptchaSettingsPartRecord
Line 2: @using Orchard.Comments.Models;
Line 3:
Line 4: <fieldset>

i've installed the module and when i click the Settings link i get the error.

Thanks

Hans

cleftheris wrote Jul 1, 2011 at 9:19 AM

Hi all,

I had the same problem with this module and I simply removed the using statement in the view. If you open the module project in visual studio it seems that there is no code atualy referencing the component. Otherwize you will have to add a reference to the Comments module dll.

The next problem you encounter is in the database. When you navigate to the orchard settings page from your dashboard. The exception is something like "TABLE CaptchaSettingsPartRecord ... cannot insert the value NULL into column PublicKey". Go to SQL Management studio and find the table CaptchaSettingsPartRecord then set all columns (except from the Id) to Allow nulls. Now the module works as intended.... or not?

There is much work done in the module but there is nothing I could find that could make this usefull to my bolog comments. It does not contain any parts. Although there is work done to create a CaptchaService class that makes use of the Recaptcha .Net dll.

That said, I believe there is more work to be done to make this interoperate with the comments section. I am no Orchard expert and we have to get help from the creator.

By the way where is the creator of this module?

Any help will is welcome!

Thanks

wrote Jul 1, 2011 at 9:22 AM

vhernandez wrote Sep 21, 2011 at 1:38 PM

Got the same issue. Any updates on this subject?

Thanks, Victor

ArefKarimi wrote Oct 8, 2011 at 1:01 PM

I really want to know who the idiot has developed it. I am surprised that Orchard owners allow this problematic module that does not have any documentation nor support exist in the gallery!

wrote Feb 13, 2013 at 9:11 PM

protandr wrote Mar 5, 2014 at 9:25 PM

Solution is simple - remove unused namespace at Line 2:
@using Orchard.Comments.Models; 
in Source File: \Orchard\Modules\Orchard.Captcha\Views\EditorTemplates\Parts.Captcha.SiteSettings.cshtml