2011-12-28 8 views
0

Silverlight 5プロジェクトを作成し、xamlページにテキストボックスコントロールを追加してから、テキストボックスコントロールにトラクトアクションビヘイビアを追加しました。 main.xamlページにServiceOrientedAnalyticsコンポーネントを追加し、エンドポイントを自分のwcfサービスに設定しました。プロジェクトを実行しようとすると、次のエラーメッセージが表示されます。同じことがSL4でうまくいきます。私はSL4のイベントとそのすべての正常な動作を追跡することができます。この問題を解決するのに誰も助けてくれますか?SL5でSilverlight Analyticsフレームワークを使用

また、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) 
+0

Silverlight 5用のMSAF(少なくともソースツリー内)のビルドがあります。そのビルド、またはSL4バージョンを使用していますか? –

答えて

0

私はMEFとSilverlight 5の問題を特定していると私はそれを解決するために働いています。 DataCollector.LogメソッドはMEFでは見つかりません。

Michael S. Scherotter(MSAFの作成者)。

関連する問題