Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GlassMapper 4 Sitecore 8.1 #183

Closed
Sitecoreclimber opened this issue Oct 24, 2015 · 9 comments
Closed

GlassMapper 4 Sitecore 8.1 #183

Sitecoreclimber opened this issue Oct 24, 2015 · 9 comments

Comments

@Sitecoreclimber
Copy link

Hey,
I'm trying to install GlassMapper on a Sitecore 8.1 solution and I'm receiving next errors:

PM> Install-Package Glass.Mapper.Sc
Attempting to resolve dependency 'Castle.Core (= 3.3.3)'.
'Glass.Mapper.Sc 4.0.3.51' already installed.
Adding 'Castle.Core 3.3.3' to SitecoreDemo.Website.
Successfully added 'Castle.Core 3.3.3' to SitecoreDemo.Website.
Adding 'Glass.Mapper.Sc 4.0.3.51' to SitecoreDemo.Website.
Successfully added 'Glass.Mapper.Sc 4.0.3.51' to SitecoreDemo.Website.
Check Version of Sitecore.Kernel
Sitecore.Kernel Path: D:\Dev\CompanyName\TemplateSitecore\Lib\Sitecore.Kernel.dll
Check Sitecore.Kernel File Version is 8.1.0.5297
Adding reference to D:\Dev\CompanyName\TemplateSitecore\SitecoreDemo.Solution\packages\Glass.Mapper.Sc.4.0.3.51\lib\81\Glass.Mapper.Sc.dll
Exception calling "Add" with "1" argument(s): "Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))"
At D:\Dev\CompanyName\TemplateSitecore\SitecoreDemo.Solution\packages\Glass.Mapper.Sc.4.0.3.51\tools\install.ps1:45 char:3

  •     $project.Object.References.Add($path);
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : ComMethodTargetInvocation

The property 'CopyLocal' cannot be found on this object. Verify that the property exists and can be set.
At D:\Dev\CompanyName\TemplateSitecore\SitecoreDemo.Solution\packages\Glass.Mapper.Sc.4.0.3.51\tools\install.ps1:46 char:3

  •     $project.Object.References.Item($name).CopyLocal = "True"
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyNotFound

Check Version of System.Web.Mvc
System.Web.Mvc Path: D:\Dev\CompanyName\TemplateSitecore\Lib\System.Web.Mvc.dll
Check System.Web.Mvc File Version is 5.2.30128.0
Adding reference to D:\Dev\CompanyName\TemplateSitecore\SitecoreDemo.Solution\packages\Glass.Mapper.Sc.4.0.3.51\lib\Mvc5\Glass.Mapper.Sc.Mvc.dll
Installation complete

@joosthollander
Copy link

Hi,

I ran into the same problem. It seems that 8.1 is not supported yet. The install script is looking for a 8.1 folder which does not exist. If you temporally reference an 8.0 update x Sitecore.Kernel before you install Glass it will install but of-course this is a hack. I am currently finding out if there are other compatibility issues.
@mikeedwards83 Any news on 8.1? Do I need to make a 8.1 specific built of Glass?

Regards,
Joost

@mikeedwards83
Copy link
Owner

We have pushed 8.1 support to the nightly build. You can download it from the Glass nightly build server. We will make an official release later this week.

@pault70
Copy link

pault70 commented Nov 2, 2015

Downloaded the latest nightly 4.03.60-beta and get the same error when trying to add to an 8.1 sitecore install.

@mikeedwards83
Copy link
Owner

@pault70 I have just tested with the same version and it worked for me. I am using SC assemblies 8.1.0.5297.

@pault70
Copy link

pault70 commented Nov 3, 2015

Not sure where I get those sitecore assemblies from, I have the latest official release and it's v 8.1.0.0

@mikeedwards83
Copy link
Owner

Released in 4.0.4

@mikeedwards83
Copy link
Owner

When you install Glass.Mapper.Sc.Core the package uses a powershell script to determine which version of System.Web.Mvc your project references. It will then pick the correct version of the Glass.Mapper.Sc.Mvc.dll to add to your project.

Normally if the Glass.Mapper.Sc.Mvc.dll is not being referenced after the install then it is normally because the project itself does not reference System.Web.Mvc.

To solve add the System.Web.Mvc and then reinstall the Glass.Mapper.Sc.Core nuget package.

@argha007
Copy link

argha007 commented Apr 6, 2017

Hi Mike,
We are getting below issue for some of the components after upgrading glass mapper... Any insight Please? Thanks & Appreciate your Co-Operation in Advance!!!

GlassMapper error "Configuration Resolver pipeline did not return a type. Has the type been loaded by Glass.Mapper. Type: System.Object"

Failing to map some of the properties with the new version but works fine with the older glass mapper.... should I need to change something after upgrading?

@mikeedwards83
Copy link
Owner

mikeedwards83 commented Apr 13, 2017

Hi

This is normally caused by a property of type System.Object on the model. You need to find the property and either change the return type of mark it with SitecoreIgnore.

This worked in older versions because we didn't ignore System.Object. However we had to ignore it in later versions because it was found to cause issues with type inferring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants