2011-12-28 1 views
0

J'ai créé un projet Silverlight 5 et ajouté un contrôle de zone de texte à une page xaml, puis ajouté un comportement d'action Tracé au contrôle Zone de texte. Ajout du composant ServiceOrientedAnalytics sur la page main.xaml et configuration du point de terminaison sur mon service wcf. Lorsque j'ai essayé d'exécuter le projet, j'obtiens le message d'erreur suivant. La même chose fonctionne bien dans SL4. Je suis capable de suivre les événements dans SL4 et tout fonctionne bien. Quelqu'un pourrait-il m'aider à résoudre ce problème?Utilisation de l'infrastructure Silverlight Analytics dans SL5

J'ai également téléchargé le dernier code source de Microsoft Analytics à partir du site codeplex et ajouté à mon projet, quand j'ai essayé de déboguer, la même exception se produit quand il essaie d'importer le journal.

Message d'erreur:

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

Il existe une version de MSAF pour Silverlight 5 (au moins dans l'arborescence des sources). Utilisez-vous cette version ou la version SL4? –

Répondre

0

J'ai identifié un problème avec Silverlight 5 et MEF et je travaille pour le résoudre. La méthode DataCollector.Log n'est pas trouvée par MEF. Michael S. Scherotter (créateur du MSAF).

Questions connexes