在SL5中使用Silverlight分析框架

在SL5中使用Silverlight分析框架,silverlight,analytics,Silverlight,Analytics,我已经创建了一个silverlight 5项目,并向xaml页面添加了一个textbox控件,然后向textbox控件添加了一个tract操作行为。 还在main.xaml页面上添加了ServiceOrientedAnalytics组件,并将端点配置为我的wcf服务。当我试图执行该项目时,我收到以下错误消息。在SL4中同样适用。我能够跟踪SL4中的事件,并且一切正常。谁能帮我解决这个问题 我还从codeplex网站下载了Microsoft Analytics的最新源代码,并将其添加到我的项目中。

我已经创建了一个silverlight 5项目,并向xaml页面添加了一个textbox控件,然后向textbox控件添加了一个tract操作行为。 还在
main.xaml
页面上添加了
ServiceOrientedAnalytics
组件,并将端点配置为我的wcf服务。当我试图执行该项目时,我收到以下错误消息。在SL4中同样适用。我能够跟踪SL4中的事件,并且一切正常。谁能帮我解决这个问题

我还从codeplex网站下载了Microsoft Analytics的最新源代码,并将其添加到我的项目中。当我尝试调试时,在尝试导入日志时也会发生相同的异常

错误消息:

   at System.Windows.Navigation.PageResourceContentLoader.EndLoad(IAsyncResult asyncResult)
   at System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(IAsyncResult result)
Caused by: Add value to collection of type 'System.Windows.Interactivity.TriggerCollection' threw an exception. [Line: 22 Position: 27]

   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at SL5CompatibilityTest.Home.InitializeComponent()
   at SL5CompatibilityTest.Home..ctor()
Caused by: The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

1) No valid exports were found that match the constraint '((exportDefinition.ContractName == "Log") AndAlso (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") AndAlso "System.Void(Microsoft.WebAnalytics.AnalyticsEvent)".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))', invalid exports may have been rejected.

Resulting in: Cannot set import 'Microsoft.WebAnalytics.Behaviors.TrackAction.Log (ContractName="Log")' on part 'Microsoft.WebAnalytics.Behaviors.TrackAction'.
Element: Microsoft.WebAnalytics.Behaviors.TrackAction.Log (ContractName="Log") -->  Microsoft.WebAnalytics.Behaviors.TrackAction


   at System.ComponentModel.Composition.CompositionResult.ThrowOnErrors(AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Compose(CompositionBatch batch)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.Compose(CompositionBatch batch)
   at System.ComponentModel.Composition.CompositionInitializer.SatisfyImports(ComposablePart part)
   at System.ComponentModel.Composition.CompositionInitializer.SatisfyImports(Object attributedPart)
   at Microsoft.WebAnalytics.Behaviors.TrackAction.OnAttached()
   at System.Windows.Interactivity.TriggerAction.Attach(DependencyObject dependencyObject)
   at System.Windows.Interactivity.TriggerActionCollection.OnAttached()
   at System.Windows.Interactivity.AttachableCollection`1.Attach(DependencyObject dependencyObject)
   at System.Windows.Interactivity.TriggerBase.Attach(DependencyObject dependencyObject)
   at System.Windows.Interactivity.TriggerCollection.ItemAdded(TriggerBase item)
   at System.Windows.Interactivity.AttachableCollection`1.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Windows.DependencyObjectCollection`1.TryCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Windows.DependencyObjectCollection`1.System.Collections.IList.Add(Object value)
   at MS.Internal.XamlManagedRuntimeRPInvokes.Add(XamlQualifiedObject& qoCollection, XamlPropertyToken inCollectionProperty, XamlQualifiedObject& inValue)

我已经发现了MEF和Silverlight 5的一个问题,我正在努力解决它。MEF找不到DataCollector.Log方法


Michael S.Scherotter(MSAF的创建者)。

Silverlight 5有一个MSAF的构建(至少在源代码树中)。您使用的是该版本还是SL4版本?