UWP: System.Reflection.TargetInvocationException - c#

This is the error: (it is not complete but this is what VS gives me)
XDG0062 System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. --->
Windows.UI.Xaml.Markup.XamlParseException: The text associated with
this error code could not be found.
No matching constructor found on type 'SMPlayer.MediaControl'. [Line:
163 Position: 25] at
Windows.UI.Xaml.Application.LoadComponent(Object component, Uri
resourceLocator, ComponentResourceLocation componentResourceLocation)
at SMPlayer.MediaControl.InitializeComponent() at
SMPlayer.M SMPlayer MainPage.xaml 151
However, my MediaControl does have a constructor, which is defined here. (Sorry for posting the link instead of the code). And MediaControl.g.i.cs does not have Line 163.
Nonetheless, my project still compiles and runs correctly even with that error. And my MediaControl is displayed properly.
What is wrong?

Related

Invalid parameter on FullSeriesCollection

Hi I'm taking back the lead on a project for an Excel plugin. But I ran into a kind of strange error:
System.Runtime.InteropServices.COMException (0x800A03EC): Parameter not valid at Microsoft.Office.Interop.Excel._Chart.FullSeriesCollection(Object Index)
The corresponding line is:
chart.FullSeriesCollection(1).DataLabels.ShowValue = true;
Any idea of what's wrong in there?

Error while drawing shape on Canvas Windows 10 Universal Apps

I am creating an app that draws shapes on canvas and those shapes are recognized as letters using https://github.com/phatware/WritePadSDK sdk for writing pad. but the problem is that this api code works fine when it is used in windows 8.1 project but when the same code is used in windows 10 universal app it produces error when i debugged the code. Code of xaml is given bellow
<Canvas Background="WhiteSmoke" Name="InkCanvas" PointerPressed="OnCanvasPointerPressed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" PointerReleased="OnCanvasPointerReleased" PointerCaptureLost="OnCanvasPointerCaptureLost" PointerExited="InkCanvas_OnPointerExited" PointerMoved="OnCanvasPointerMoved" LostFocus="InkCanvas_LostFocus">
and the code which is recognizes the shape using sdk is given bellow which is executed on PointerReleased event of Canvas:-
var resultValue = recognizerShared.RecognizeStrokes(InkCanvas.Children.ToList(), false);
and when i inspected the method given in sdk i.e. RecognizeStrokes which does the recolonization i got error when i did debugging
As this code works fine in windows 8.1 project i think it can be something todo with windows 10 universal app problem
Excelption details is given bellow:-
AccessKey = 'new System.Collections.Generic.Mscorlib_CollectionDebugView<Windows.UI.Xaml.UIElement>(strokes).Items[0].AccessKey' threw an exception of type 'System.InvalidCastException'
AccessKeyScopeOwner = 'new System.Collections.Generic.Mscorlib_CollectionDebugView(strokes).Items[0].AccessKeyScopeOwner' threw an exception of type 'System.InvalidCastException'
AllowFocusOnInteraction = '((Windows.UI.Xaml.FrameworkElement)new System.Collections.Generic.Mscorlib_CollectionDebugView(strokes).Items[0]).AllowFocusOnInteraction' threw an exception of type 'System.InvalidCastException'
AllowFocusWhenDisabled = '((Windows.UI.Xaml.FrameworkElement)new System.Collections.Generic.Mscorlib_CollectionDebugView(strokes).Items[0]).AllowFocusWhenDisabled' threw an exception of type 'System.InvalidCastException'
ContextFlyout = 'new System.Collections.Generic.Mscorlib_CollectionDebugView(strokes).Items[0].ContextFlyout' threw an exception of type 'System.InvalidCastException'
ExitDisplayModeOnAccessKeyInvoked = 'new System.Collections.Generic.Mscorlib_CollectionDebugView(strokes).Items[0].ExitDisplayModeOnAccessKeyInvoked' threw an exception of type 'System.InvalidCastException'
FocusVisualMargin = '((Windows.UI.Xaml.FrameworkElement)new System.Collections.Generic.Mscorlib_CollectionDebugView(strokes).Items[0]).FocusVisualMargin' threw an exception of type 'System.InvalidCastException'
FocusVisualPrimaryBrush = '((Windows.UI.Xaml.FrameworkElement)new System.Collections.Generic.Mscorlib_CollectionDebugView(strokes).Items[0]).FocusVisualPrimaryBrush' threw an exception of type 'System.InvalidCastException'
new System.Collections.Generic.Mscorlib_CollectionDebugView(strokes).Items[0].IsAccessKeyScope
Please help me to solve the problem above.
Link to download the sample project code is given bellow for testing where you can see the problem
https://www.dropbox.com/s/1xbtxbxwyoyuf00/WindowsSDK.rar?dl=0
Thanks!

Getting start with ArangoDB and .Net - Exception thrown by AddConnection()

I am hoping that someone who has worked with ArangoDB and .Net and C# can help me out.
When I call ArangoClient.AddConnection() an exception gets thrown (of type 'System.ArgumentException' occurred in mscorlib.dll). The message is "An item with the same key has already been added."
The call to ArangoClient is: ArangoClient.AddConnection("127.0.0.1", 8529, false, "NancyTest", "NancyTest", "root");
Any ideas?
You most probably already created a connection with specified alias. With a driver version 0.9.0 and higher you can check if the specified alias already exists through ASettings.HasConnection(string alias) static method.

1 Error "ResolveManifestFiles" System.ArgumentException: Value does not fall within the expected range. WPF C# Desktop app

Im tray to compile a Visual Studio Solution and get this error.
Error 1 Error inesperado en la tarea "ResolveManifestFiles".
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.NativeMethods.GetAssemblyIdentityFromFile(String filePath, Guid& riid)
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.MetadataReader.ImportAttributes()
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.MetadataReader.get_Attributes()
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.MetadataReader.get_Name()
at Microsoft.Build.Tasks.Deployment.ManifestUtilities.AssemblyIdentity.FromManagedAssembly(String path)
at Microsoft.Build.Tasks.ResolveManifestFiles.IsFiltered(ITaskItem item)
at Microsoft.Build.Tasks.ResolveManifestFiles.GetOutputAssemblies(PublishInfo[] publishInfos, List`1& assemblyList)
at Microsoft.Build.Tasks.ResolveManifestFiles.GetOutputAssembliesAndSatellites(PublishInfo[] assemblyPublishInfos, PublishInfo[] satellitePublishInfos)
at Microsoft.Build.Tasks.ResolveManifestFiles.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() Ziruma
Im not sure what is the problem. Project compiling until i try to generate the final instalation package. Please, help me.

IntellitraceFile throwing strange error

Can someone explain this error? (it showed up after enabling tracing in the collection plan.)
Test method ExecuteTaskTest threw exception:
System.ArgumentException: An item with the same key has already been added.
System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
Microsoft.VisualStudio.IntelliTrace.IntelliTraceProcess.AddModule(IntelliTraceModule module)
Microsoft.VisualStudio.IntelliTrace.IntelliTraceProcess.Initialize(IntelliTraceFile traceDebugLogFile)
Microsoft.VisualStudio.IntelliTrace.IntelliTraceProcess..ctor(IntelliTraceFile traceDebugLogFile)
**Microsoft.VisualStudio.IntelliTrace.IntelliTraceFile.get_Processes()**
Microsoft.VisualStudio.Samples.IntelliTraceReader..ctor(String logFileName) in C:\workspace\agileproductlinerdsl\ITraceLogParser\IntelliTraceReader.cs: line 49
UofCASE.AgileProductLinerDSL.Nant.AspenTest.writeTraceResult(FileInfo itraceLog, FileInfo resultFile) in C:\workspace\agileproductlinerdsl\NantTask\AspenTest.cs: line 148
UofCASE.AgileProductLinerDSL.Nant.AspenTest.runTests(FeatureTestMap tests) in C:\workspace\agileproductlinerdsl\NantTask\AspenTest.cs: line 124
UofCASE.AgileProductLinerDSL.Nant.AspenTest.ExecuteTask() in C:\workspace\agileproductlinerdsl\NantTask\AspenTest.cs: line 56
APLDTests.AspenTestTest.ExecuteTaskTest() in C:\workspace\agileproductlinerdsl\APLDTests\AspenTestTest.cs: line 37
It's a known issue with IntelliTrace. The log file was likely collected from an app that had the same module loaded into multiple app domains and this causes IntelliTrace to barf when grabbing the Process list as you can see.

Categories

Resources