Specify assembly location - wpf

Hi I have created WPF(XBAP) application.
In that for the referred assemblies Build Action is specified as Embedded Resource.
But still the .NET will look for the actual assemblies.
Is there any way to tell the .NET that assembly is embedded resource.
e.g. MyApp.dll is the XBAP which uses Comp.dll
I have added Comp.dll as item in MyApp project.
However In execution MyApp look for Comp.dll instead it should look in the resources.

These links might answer your queries to embed DLL's as resource in your exe -
Embedding DLLs in a compiled executable
C#: How to embed DLL into resourcefile (no dll copy in program directory)
Merge .dll into C# Assembly?

Related

Using dotnetbrowser in a WinForm via Com Interop?

We have an application where the main UI is coded in vb6. We also have multiple .net assemblies (winform and class libraries) built in vb.net (VS2015, targeting framework 4.5.2).
Can we utilize the winform dotnetbrowser in a .net assembly that is called via com interop from our vb6 main app?
The licensing articles instruct adding the license to the project as an embedded resourse - would this license be added to the .net assembly as an embedded resource? Or would it need to be added to the main app exe (vb6) as an embedded resource there?
Can we utilize the winform dotnetbrowser in a .net assembly that is called via com interop from our vb6 main app?
Yes, this use-case is possible.
The licensing articles instruct adding the license to the project as an embedded resourse - would this license be added to the .net assembly as an embedded resource? Or would it need to be added to the main app exe (vb6) as an embedded resource there?
There are several ways to provide the licence to DotNetBrowser:
the most common and recommended way is to include the licence into
the application .NET assembly as an Embedded Resource (it is
usually done when performing a build)
the other common way is putting
the licence file into the working directory of the application that
loads and uses DotNetBrowser
at last, you can specify the full path to the
licence file using the DOTNETBROWSER_LICENSE_PATH environment
variable

How to share DLL with developers?

I'm a graphic designer who is fairly new to XAML and blend. I've been reading a tutorial on Theming and It mentions about sharing DLL's with developers. It does not explain what specific Dll contains my resources to send to the developers. I've created a control library for my resources. Is there a specific Dll file that holds these resources?
Thanks!
When you build a class library project it compiles a dll. Give them that dll
The file will be in bin/(debug or release)/[project].dll

Is it possible to have REF to a Silverlight class library (dll) module in ModuleCatalog.xaml

I am working with Silverlight 4.0 and Windows Application Composite Framework (Prism).
I have created couple of modules which are Silverlight libraries so they are compiled into dlls and not xaps.
I want to register these modules into my Shell application using ModuleCatalog.xaml. If I package my modules into .xap then this approach works fine but since my modules are .dll, I am getting exception during load.
So my question is, will be possible to register silverlight module dll in ModuleCatalog.xaml?
This is not possible because Silverlight packages assemblies in .xap packages. Thus, if an assembly is not in the main .xap (the one of the Shell), Prism must know how to download the .xap file where it's located at to be able to download and load modules correctly.
Imagine that, if the application downloaded the module's from a server, downloading the .xap package and loading an assembly in the application is possible and easy in Silverlight, while doing it directly with a .dll is not.

WPF - Copying resources on publishing

I'm developing an WPF application that has an reference of a C# Class Library.
That C# Class Library has a few XML files that i'm copying to output as embed resources.
When i debug the WPF application, those XML are copied to debug folder of WPF and the app runs properly.
But when i publish the application i get errors because the application isn't finding the resources.
I must admit i'm just now introducing to WPF, so i haven't understand yet the process of publishing and installing the application.
Those XML files should be published by VS in "Aplication Files" folder of the published folder? If yes, what i'm i doing wrong?
By the way, i'm accessing those files in my code (of C# Class Library) from AppDomain.CurrentDomain.BaseDirectory
Thanks
Are you using click once for publishing? you can define what dependencies you need and for each one where place must have.

Adding satellite assemblies into XAP

I have satellite assemblies pre-built and I want to add them into the silverlight xap file after the file has been built. I know if I do this manually all I need to do is add the files into the xap (it's a zip file) and update appmanifest.xaml.
Are there any tools out there (or msbuild task) that I can call in the post build process?
you can dynamically load dll's at runtime. Have a look here: Dynamic assembly loading
Have you considered using MEF? Here's a linke where they show how to download XAP's at runtime. Silverlight TV 11: Dynamically Loading XAPs with MEF.
I hope this helps you.
BR,
TJ

Resources