2017-09-18 13 views
0

VS Debugger Extension(WPF Xaml UserControl)でOxyPlotライブラリを使用しようとしていますが、最も単純な例でも失敗します。コントロールのコンストラクタでInitializeComponentの呼び出しには、次の例外がスローされます。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. 

OxyPlotアセンブリが適切に拡張展開フォルダに含まれています。 OxyPlotのサンプルアプリケーションはすべて正常に動作するため、VSデバッガの拡張機能やアセンブリの解決方法に関連しているようです。

XAML名前空間宣言がある:私も参照(XAML)の例のいくつかで

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

に対し:

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

URLが404に解決され、コンパイルしようと、私は取得すること:

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

ただし、OxyPlotパッケージのWPFの例では、problなしで同じ名前空間宣言を使用していますems?

更新:この問題の融合ログでは、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://の方法を使用しています。使用しているのはどのoxyplotバージョンですか? – Jose

+0

2.0.0-unstable1013リリース(Nuget経由) – Robert

+0

OxyPlot.Coreの2.0.0-unstable1013でもあります。 – Robert

答えて

0

[OK]を、.NETに精通した人であること、私は解決策のアイデアのためのPalleために感謝していない、拡張パッケージのコンストラクタに私が追加:ハンドラ内

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

、その後を:

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

となり、OxyPlotがうまく読み込まれます。 Phew。

関連する問題