2017-09-18 15 views
0

VS Debugger Extension (WPF Xaml UserControl)에서 OxyPlot 라이브러리를 사용하려고하지만 가장 간단한 예제도 실패합니다. OxyPlot 조립체가 적절히 확장 전개 폴더에 포함Visual Studio 디버거 확장에서 OxyPlot 사용

System.Windows.Markup.XamlParseException occurred 
HResult=0x80131501 
Message=Could not load file or assembly 'OxyPlot.Wpf, PublicKeyToken=75e952ba404cdbb0' or one of its dependencies. The system cannot find the file specified. 
Source=PresentationFramework 
StackTrace: 
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) 
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) 
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) 
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) 
at GraphicalDebugging.PlotWatchControl.InitializeComponent() in C:\code\git\temp\graphical-debugging\Visual_Studio_2015\GraphicalDebugging\PlotWatchControl.xaml:line 1 
at GraphicalDebugging.PlotWatchControl..ctor() in C:\code\git\temp\graphical-debugging\Visual_Studio_2015\GraphicalDebugging\PlotWatchControl.xaml.cs:line 29 
at GraphicalDebugging.PlotWatch..ctor() in C:\code\git\temp\graphical-debugging\Visual_Studio_2015\GraphicalDebugging\PlotWatch.cs:line 37 
Inner Exception 1: 
FileNotFoundException: Could not load file or assembly 'OxyPlot.Wpf, PublicKeyToken=75e952ba404cdbb0' or one of its dependencies. The system cannot find the file specified. 

: 제어 생성자 InitializeComponent를 호출은 다음과 같은 예외가 발생. 예제 OxyPlot 응용 프로그램은 모두 정상적으로 작동하므로 VS 디버거 확장과 어셈블리가 어떻게 해석되는지와 관련이있는 것으로 보입니다.

XAML 네임 스페이스 선언은 다음과 같습니다

xmlns:oxy="clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Wpf" 

제 (XAML) 예제의 일부 나 또한 볼 수있는 반면 : 404에 URL이 해결합니다

xmlns:oxy="http://oxyplot.org/wpf" 

을하고, 노력하는 것은 내가받을 컴파일 :

error MC3074: The tag 'PlotView' does not exist in XML namespace 'http://oxyplot.org/wpf'. 

그러나 OxyPlot 패키지의 WPF 예제는 probl없이 동일한 네임 스페이스 선언을 사용합니다. 뭐라구?

업데이트 : 문제의 퓨전 로그는 DLL이 설치된 VS 확장명 (C : \ Users \ AppData) 아래에 있지만 어셈블리 로더가 OxyPlot.Wpf.dll을 찾을 수 없다는 것이 명백합니다. \ GraphicalDebugging) 0.7 \ \ 로컬 \ 마이크로 소프트 \으로 VisualStudio \ 14.0Exp \ 확장 \ 아담 Wulkiewicz :

*** Assembly Binder Log Entry (2017-09-19 @ 08:46:44) *** 

The operation failed. 
Bind result: hr = 0x80070002. The system cannot find the file specified. 

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll 
Running under executable C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe 
--- A detailed error log follows. 

=== Pre-bind state information === 
LOG: DisplayName = OxyPlot.Wpf, PublicKeyToken=75e952ba404cdbb0 
(Partial) 
WRN: Partial binding information was supplied for an assembly: 
WRN: Assembly Name: OxyPlot.Wpf, PublicKeyToken=75e952ba404cdbb0 | Domain ID: 1 
WRN: A partial bind occurs when only part of the assembly display name is provided. 
WRN: This might result in the binder loading an incorrect assembly. 
WRN: It is recommended to provide a fully specified textual identity for the assembly, 
WRN: that consists of the simple name, version, culture, and public key token. 
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue. 
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/ 
LOG: Initial PrivatePath = NULL 
LOG: Dynamic Base = NULL 
LOG: Cache Base = NULL 
LOG: AppName = devenv.exe 
Calling assembly : (Unknown). 
=== 
LOG: This bind starts in default load context. 
LOG: Using application configuration file: C:\Users\robi\AppData\Local\Temp\dev7ED0.tmp 
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. 
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/OxyPlot.Wpf/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PublicAssemblies/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PublicAssemblies/OxyPlot.Wpf/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PrivateAssemblies/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PrivateAssemblies/OxyPlot.Wpf/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/OxyPlot.Wpf/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Platform/Debugger/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Platform/Debugger/OxyPlot.Wpf/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Platform/DiagnosticsHub/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Platform/DiagnosticsHub/OxyPlot.Wpf/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PrivateAssemblies/DataCollectors/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PrivateAssemblies/DataCollectors/OxyPlot.Wpf/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/OxyPlot.Wpf/OxyPlot.Wpf.DLL. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/OxyPlot.Wpf/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PublicAssemblies/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PublicAssemblies/OxyPlot.Wpf/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PrivateAssemblies/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PrivateAssemblies/OxyPlot.Wpf/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Microsoft/TemplateProviders/OxyPlot.Wpf/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Platform/Debugger/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Platform/Debugger/OxyPlot.Wpf/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Platform/DiagnosticsHub/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Platform/DiagnosticsHub/OxyPlot.Wpf/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PrivateAssemblies/DataCollectors/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PrivateAssemblies/DataCollectors/OxyPlot.Wpf/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/OxyPlot.Wpf.EXE. 
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/PrivateAssemblies/DataCollectors/x86/OxyPlot.Wpf/OxyPlot.Wpf.EXE. 
LOG: All probing URLs attempted and failed. 

아이디어?

+0

나는 네임 스페이스에 http : // 방법을 사용하고 있으며 나를 위해 작동합니다. 어느 옥시 플롯 버전을 사용하고 있습니까? – Jose

+0

2.0.0-unstable1013 출시 (Nuget 경유) – Robert

+0

OxyPlot에 대해 2.0.0-unstable1013입니다 .Core also – Robert

답변

0

좋아하는 .NET 잘 아는 사람이없는, 내가 확장 패키지 I 추가 생성자에서, 솔루션 아이디어의 Palle 인해 감사합니다 : 핸들러에서 다음

AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); 

과 :

private Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) 
{ 
    return AppDomain.CurrentDomain.Load(args.Name); 
} 

그리고 OxyPlot을 멋지게로드합니다. 휴.