volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Google Analytics compile error

Testing to create a GadgetMetric in my solution using the guidelines but get compile errors (EPiServer CMS 6 R2, with latest GA plugin)

'System.ComponentModel.Composition.ExportAttribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel.Composition, Version=2009.22.10.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'.

But System.CompinentModel.Composition is already referenced, my web.config:

<dependentAssembly>
<assemblyIdentityname="System.ComponentModel.Composition"publicKeyToken="8fe83dea738b45b7"culture="neutral"/>
<bindingRedirectoldVersion="1.0.0.0-2009.22.10.0"newVersion="2009.22.10.0"/>
</dependentAssembly>

Error 2 'EPiServer.GoogleAnalytics.Analytics.GadgetMetricAttribute' is not an attribute class 

This is my simple code, added the class to root:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using EPiServer.GoogleAnalytics;
using EPiServer.GoogleAnalytics.Analytics;
using EPiServer.GoogleAnalytics.Analytics.Models;


namespace EPiServer.GoogleAnalytics.Analytics
{
    [GadgetMetric]
    public class TestGa : ListMetricBase
    {
        public override string Metric
        {
            get { return "ga:pageviews"; }
        }

        public override string Dimension
        {
            get
            {
                return "ga:pageTitle";
            }
        }
    }
}

What is missing?

     

 

 

#64016
Dec 07, 2012 10:34

Something got wrong when pasting, can't edit, namespace in class should of course be the name of my solution

#64017
Dec 07, 2012 10:40
Vote:

Step 6. of this article. It should solve our problem:

http://world.episerver.com/Articles/Items/EPiServer-CMS-60-now-supporting-ASPNET-40/

#64117
Dec 11, 2012 10:12
error This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.