Running 2.6 in VS 2010

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
I'm getting the following errors once I have updated FluentValidation to 3.4.6.0:

Error  12  Argument 1: cannot convert from 'Nop.Web.Framework.NopValidatorFactory' to 'FluentValidation.IValidatorFactory'  E:\SourceCode\Presentation\Nop.Web\Global.asax.cs  108  94  Nop.Web

Error  11  The best overloaded method match for 'FluentValidation.Mvc.FluentValidationModelValidatorProvider.FluentValidationModelValidatorProvider(FluentValidation.IValidatorFactory)' has some invalid arguments  E:\SourceCode\Presentation\Nop.Web\Global.asax.cs  108  51  Nop.Web

Error  10  The type 'FluentValidation.IValidatorFactory' is defined in an assembly that is not referenced. You must add a reference to assembly 'FluentValidation, Version=3.4.6.0, Culture=neutral, PublicKeyToken=null'.  E:\SourceCode\Presentation\Nop.Web\Global.asax.cs  108  13  Nop.Web


I've tried everything but it won't go away! I'm upgrading in order to use Nop 2.4 in VS2012

Thanks in advance!

Dave
11 years ago
P.s my Web.Config is looking like:

<add assembly="FluentValidation, Version=3.4.6.0, Culture=neutral, PublicKeyToken=null" />


<dependentAssembly>
        <assemblyIdentity name="FluentValidation" publicKeyToken="a82054b837897c66" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.3.1.0" newVersion="3.4.6.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="FluentValidation.MVC" publicKeyToken="a82054b837897c66" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.3.1.0" newVersion="3.4.6.0" />
      </dependentAssembly>
10 years ago
Still having issues here. We have used NuGet which updated FluentValidator to 4.0.0.0, although no signed versions of either standard or MVC Fluent were listed so we had to use the default ones as they were the only NuGet options available to update.

We have:

1. Manually removed all DLL references in a 2.50 source project.
2. Manually added all the references back in.
3. We have cleared the browser cache.
4. Updated the web.config as per http://www.nop-templates.com/step-by-step-guide-for-solving-of-the-nopcommerce-fluentvalidation-and-net-45-problem but using 4.0.0.0 due to current NuGet version.
5. We have cleaned and rebuilt the source project.


We're still getting this when building the project on a local dev system, we've also done this with two source projects and both result in the same thing:

System.Exception was unhandled by user code
  HResult=-2146233088
  Message=Could not load file or assembly 'FluentValidation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=a82054b837897c66' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Could not load file or assembly 'FluentValidation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=a82054b837897c66' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

  Source=Nop.Core
  StackTrace:
       at Nop.Core.Plugins.PluginManager.Initialize() in PATH\Libraries\Nop.Core\Plugins\PluginManager.cs:line 176
  InnerException:
       HResult=-2146233088
       Message=Could not load file or assembly 'FluentValidation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=a82054b837897c66' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Could not load file or assembly 'FluentValidation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=a82054b837897c66' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

       Source=Nop.Core
       StackTrace:
            at Nop.Core.Plugins.PluginManager.Initialize() in PATH\Libraries\Nop.Core\Plugins\PluginManager.cs:line 157
       InnerException: System.Reflection.ReflectionTypeLoadException
            HResult=-2146232830
            Message=Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
            Source=mscorlib
            StackTrace:
                 at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
                 at System.Reflection.RuntimeModule.GetTypes()
                 at System.Reflection.Assembly.GetTypes()
                 at Nop.Core.Plugins.PluginManager.Initialize() in PATH\Libraries\Nop.Core\Plugins\PluginManager.cs:line 137
            InnerException:
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.