Building a Console app (just like TwitterSearch.UI.Console) sample
I'm working on a project that has client and server side. And I'm writing
a "pre-check-in" tool that will validate a lot of our communication
between client and server.
I already have unit tests on both sides, now i really want to test the
integration between both.
Like a real client connection to the server and vice-versa.
I'm trying to see how "TwitterSearch.UI.Console" works, as I think that
twill be a great starting point for me, but after spending some time
fighting it, I thought that maybe it's better to ask the pros in here.
I'm using the latest version from here:
https://github.com/slodge/MvvmCross-Tutorials
paired with latest binaries.
Right now this is the output debug spill:
mvx: Diagnostic: 0.01 Setup: PlatformServices start mvx: Diagnostic: 0.02
Setup: MvvmCross settings start mvx: Diagnostic: 0.02 Setup: Singleton
Cache start mvx: Diagnostic: 0.02 Setup: Bootstrap actions mvx:
Diagnostic: 0.05 Setup: StringToTypeParser start mvx: Diagnostic: 0.05
Setup: ViewModelFramework start mvx: Diagnostic: 0.05 Setup:
PluginManagerFramework start mvx: Diagnostic: 0.06 Setup: App start mvx:
Diagnostic: 0.07 Loading plugin assembly:
Cirrious.MvvmCross.Plugins.Visibility.Wpf
'TwitterSearch.UI.Console.vshost.exe' (Managed (v4.0.30319)): Loaded
'C:\fileZ\projZ\samples\MvvmCross-Tutorials\Sample -
TwitterSearch\TwitterSearch.UI.Console\bin\Debug\TwitterSearch.Core.dll',
Symbols loaded. 'TwitterSearch.UI.Console.vshost.exe' (Managed
(v4.0.30319)): Loaded 'C:\fileZ\projZ\samples\MvvmCross-Tutorials\Sample -
TwitterSearch\TwitterSearch.UI.Console\bin\Debug\Cirrious.MvvmCross.Plugins.Visibility.dll',
Symbols loaded. A first chance exception of type
'System.IO.FileNotFoundException' occurred in mscorlib.dll A first chance
exception of type 'Cirrious.CrossCore.Exceptions.MvxException' occurred in
Cirrious.CrossCore.dll
And in the exception details, looks like the plugin manager is resolving
the name of the assembly wrong?
He is trying to load 'Cirrious.MvvmCross.Plugins.Visibility.Wpf', and the
one referenced by the .Console app is
'Cirrious.MvvmCross.Plugins.Visibility.Console'.
Here are more details from the exception:
*Cirrious.CrossCore.Exceptions.MvxException was unhandled
HResult=-2146233088 Message=Could not load file or assembly
'Cirrious.MvvmCross.Plugins.Visibility.Wpf' or one of its dependencies.
The system cannot find the file specified. Source=Cirrious.CrossCore
StackTrace: at
Cirrious.CrossCore.Plugins.MvxPluginManager.ExceptionWrappedLoadPlugin(Type
toLoad) in
c:\Projects\Misc\MVVMCROSS\CrossCore\Cirrious.CrossCore\Plugins\MvxPluginManager.cs:line
136 at
Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePlatformAdaptionLoadedT
in
c:\Projects\Misc\MVVMCROSS\CrossCore\Cirrious.CrossCore\Plugins\MvxPluginManager.cs:line
87 at Cirrious.MvvmCross.Plugins.Visibility.PluginLoader.EnsureLoaded() in
c:\Projects\Misc\MVVMCROSS\Plugins\Cirrious\Visibility\Cirrious.MvvmCross.Plugins.Visibility\PluginLoader.cs:line
23 at TwitterSearch.Core.TwitterSearchApp.InitialisePlugIns() in
c:\fileZ\projZ\samples\MvvmCross-Tutorials\Sample -
TwitterSearch\TwitterSearch.Core\TwitterSearchApp.cs:line 33 at
TwitterSearch.Core.TwitterSearchApp..ctor() in
c:\fileZ\projZ\samples\MvvmCross-Tutorials\Sample -
TwitterSearch\TwitterSearch.Core\TwitterSearchApp.cs:line 15 at
TwitterSearch.UI.Console.Setup.CreateApp() in
c:\fileZ\projZ\samples\MvvmCross-Tutorials\Sample -
TwitterSearch\TwitterSearch.UI.Console\Setup.cs:line 16 at
Cirrious.MvvmCross.Platform.MvxSetup.CreateAndInitializeApp(IMvxPluginManager
pluginManager) in
c:\Projects\Misc\MVVMCROSS\Cirrious\Cirrious.MvvmCross\Platform\MvxSetup.cs:line
272 at
Cirrious.MvvmCross.Platform.MvxSetup.InitializeApp(IMvxPluginManager
pluginManager) in
c:\Projects\Misc\MVVMCROSS\Cirrious\Cirrious.MvvmCross\Platform\MvxSetup.cs:line
265 at Cirrious.MvvmCross.Platform.MvxSetup.InitializeSecondary() in
c:\Projects\Misc\MVVMCROSS\Cirrious\Cirrious.MvvmCross\Platform\MvxSetup.cs:line
77 at Cirrious.MvvmCross.Platform.MvxSetup.Initialize() in
c:\Projects\Misc\MVVMCROSS\Cirrious\Cirrious.MvvmCross\Platform\MvxSetup.cs:line
36 at TwitterSearch.UI.Console.Program.Run() in
c:\fileZ\projZ\samples\MvvmCross-Tutorials\Sample -
TwitterSearch\TwitterSearch.UI.Console\Program.cs:line 21 at
TwitterSearch.UI.Console.Program.Main(String[] args) in
c:\fileZ\projZ\samples\MvvmCross-Tutorials\Sample -
TwitterSearch\TwitterSearch.UI.Console\Program.cs:line 14 at
System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[]
args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args) at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at
System.Threading.ThreadHelper.ThreadStart_Context(Object state) at
System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean
preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean
preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state) at
System.Threading.ThreadHelper.ThreadStart() InnerException:
System.IO.FileNotFoundException HResult=-2147024894 Message=Could not load
file or assembly 'Cirrious.MvvmCross.Plugins.Visibility.Wpf' or one of its
dependencies. The system cannot find the file specified. Source=mscorlib
FileName=Cirrious.MvvmCross.Plugins.Visibility.Wpf FusionLog==== Pre-bind
state information === LOG: User = LAGOA\Sergio LOG: DisplayName =
Cirrious.MvvmCross.Plugins.Visibility.Wpf (Partial) WRN: Partial binding
information was supplied for an assembly: WRN: Assembly Name:
Cirrious.MvvmCross.Plugins.Visibility.Wpf | 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:/fileZ/projZ/samples/MvvmCross-Tutorials/Sample -
TwitterSearch/TwitterSearch.UI.Console/bin/Debug/ LOG: Initial PrivatePath
= NULL
Calling assembly : Cirrious.CrossCore, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=e16445fd9b451819.
LOG: This bind starts in default load context. LOG: Using application
configuration file: C:\fileZ\projZ\samples\MvvmCross-Tutorials\Sample -
TwitterSearch\TwitterSearch.UI.Console\bin\Debug\TwitterSearch.UI.Console.vshost.exe.Config
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:/fileZ/projZ/samples/MvvmCross-Tutorials/Sample -
TwitterSearch/TwitterSearch.UI.Console/bin/Debug/Cirrious.MvvmCross.Plugins.Visibility.Wpf.DLL.
LOG: Attempting download of new URL
file:///C:/fileZ/projZ/samples/MvvmCross-Tutorials/Sample -
TwitterSearch/TwitterSearch.UI.Console/bin/Debug/Cirrious.MvvmCross.Plugins.Visibility.Wpf/Cirrious.MvvmCross.Plugins.Visibility.Wpf.DLL.
LOG: Attempting download of new URL
file:///C:/fileZ/projZ/samples/MvvmCross-Tutorials/Sample -
TwitterSearch/TwitterSearch.UI.Console/bin/Debug/Cirrious.MvvmCross.Plugins.Visibility.Wpf.EXE.
LOG: Attempting download of new URL
file:///C:/fileZ/projZ/samples/MvvmCross-Tutorials/Sample -
TwitterSearch/TwitterSearch.UI.Console/bin/Debug/Cirrious.MvvmCross.Plugins.Visibility.Wpf/Cirrious.MvvmCross.Plugins.Visibility.Wpf.EXE.
StackTrace:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName,
String codeBase, Evidence assemblySecurity, RuntimeAssembly
locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder,
Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean
suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName,
String codeBase, Evidence assemblySecurity, RuntimeAssembly
locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder,
Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean
suppressSecurityChecks)
at
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName
assemblyRef, Evidence assemblySecurity, RuntimeAssembly
reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder,
Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean
suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String
assemblyString, Evidence assemblySecurity, StackCrawlMark&
stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String
assemblyString, Evidence assemblySecurity, StackCrawlMark&
stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at
Cirrious.CrossCore.Plugins.MvxFilePluginManager.LoadAssembly(Type
toLoad) in
c:\Projects\Misc\MVVMCROSS\CrossCore\Cirrious.CrossCore\Plugins\MvxFilePluginManager.cs:line
53
at Cirrious.CrossCore.Plugins.MvxFilePluginManager.FindPlugin(Type
toLoad) in
c:\Projects\Misc\MVVMCROSS\CrossCore\Cirrious.CrossCore\Plugins\MvxFilePluginManager.cs:line
31
at
Cirrious.CrossCore.Plugins.MvxPluginManager.ExceptionWrappedLoadPlugin(Type
toLoad) in
c:\Projects\Misc\MVVMCROSS\CrossCore\Cirrious.CrossCore\Plugins\MvxPluginManager.cs:line
120
InnerException: *
Can someone help me figure out if I did something wrong or if the plug in
is really trying to load the wrong file?
Thank you, Sergio
No comments:
Post a Comment