This is a migrated thread and some comments may be shown as answers.

Could not load file or assembly (Xaml)

0 Answers 231 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ENTERPRISE INTERNATIONAL SAS
Top achievements
Rank 1
ENTERPRISE INTERNATIONAL SAS asked on 18 Nov 2011, 10:37 PM

Hi!


Something is happening to me, I appreciate any guide to follow. I have a XBAP main App Full trusted, it added telerik assemblies and my custom assemblies to the references. My custom assemblies referenced has entity classes and general functions and methods which are called from main App and classes (cs file from XAML), and its respective xaml view where to go by using NavigationService.navigate, but something that being taking so long time with no solution is happening to me.

I've constructed a DLL assembly containing XAML views, telerik references and other custom assemblies. Main goal to do it so is because I need to add this Assembly dynamically when is requiered, and that's why this assembly is not added into references into main App. To call a xaml view from main App is by using:

(MainApp)
Assembly dll = Assembly.Load("........dll"); <---- External Assembly not added as reference
object obj = dll.CreateInstance(".../../../mainMenu.xaml");
NavigationService.navigate(obj);

MainMenu.xaml containing telerik components and others is shown successfully, but for some reason when I bind DataContext's MainMenu to my class (ViewModel class) located into my external Custom Assemblies (TransitoMV.dll, and others), system throws an exception:

In spanish:

=== Información de estado anterior al enlace ===
LOG: Usuario = ENTERPRISE\Sistemas01
LOG: DisplayName = TransitoMV, PublicKeyToken=null
 (Partial)
AVS: Se proporcionó información de enlace parcial para un ensamblado:
AVS: Nombre de ensamblado: TransitoMV, PublicKeyToken=null | Id. de dominio: 2
AVS: Un enlace parcial tiene lugar cuando solo se proporciona parte del nombre para mostrar del ensamblado.
AVS: Esto puede dar lugar a que el enlazador cargue un ensamblado incorrecto.
AVS: Se recomienda proporcionar una identidad textual completamente especificada para el ensamblado,
AVS: que consta del nombre simple, la versión, la referencia cultural y el token de clave pública.
AVS: Vea las notas del producto http://go.microsoft.com/fwlink/?LinkId=109270 para obtener más información y soluciones comunes a este problema.
LOG: Appbase = file:///D:/Proyectos/NET/Solar/Solar/bin/Debug/
LOG: PrivatePath inicial = NULL
Ensamblado de llamada : (Unknown).
===
LOG: Este enlace empieza en el contexto de carga default.
LOG: Utilización del archivo de configuración de la aplicación: D:\Proyectos\NET\Solar\Solar\bin\Debug\Solar.exe.config
LOG: Utilizando el archivo de configuración de host:
LOG: Utilizando el archivo de configuración del equipo en C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: La directiva no se está aplicando a la referencia en este momento (enlace de ensamblado privado, personalizado, parcial o basado en la ubicación).
LOG: Intento de descarga de la nueva dirección URL file:///D:/Proyectos/NET/Solar/Solar/bin/Debug/TransitoMV.DLL.
LOG: Intento de descarga de la nueva dirección URL file:///D:/Proyectos/NET/Solar/Solar/bin/Debug/TransitoMV/TransitoMV.DLL.
LOG: Intento de descarga de la nueva dirección URL file:///D:/Proyectos/NET/Solar/Solar/bin/Debug/TransitoMV.EXE.
LOG: Intento de descarga de la nueva dirección URL file:///D:/Proyectos/NET/Solar/Solar/bin/Debug/TransitoMV/TransitoMV.EXE.

With telerik assemblies I have no problems, but with mine I do. How can I do to have no problems with TransitoMV.dll and others mine to be referenced by my external dynamic DLL (containing xaml view) assembly?

thanks

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
ENTERPRISE INTERNATIONAL SAS
Top achievements
Rank 1
Share this question
or