How to share DLL with developers? - wpf

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

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

Specify assembly location

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?

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.

How to reuse Silverlight projects in WPF?

I would like to use the same project (class library) in Silverlight and WPF. So, I started as a Silverlight Class Library.
But the problem is: some of the common classes (i.e. Point, TouchAction) exists in different assemblies and compiler is showing the following error when I add the reference of Silverlight class library to WPF project.
The type 'System.Windows.Point' exists in both 'c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.dll' and 'C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\WindowsBase.dll'
Can anyone please suggest a work around?
You can try Prism 2.0 approach:
Have two sepparated projects, but link files from one to another. Pieces that are specific to one platform can be sepparated in conditional compilation (#ifdef _SILVERLIGHT ... #elseif ... #end)
Check out the Multitargeting quickstart for more details (though all Quickstarts plus the Reference Implementation have Silverlight & WPF versions, the multitargeting sample is the simpliest one if you only want to share code between platforms).
In the same project, you'll find the Project Linker tool (though it only works in VS2008 as far as I know) which automatically keeps two or more projects synced-up by adding links automatically when new items are added to the source project.
Hope this helps!

How to create a compiled, redistributable class library in Silverlight?

Is it possible to create a small library (similar to a Flash or Flex SWC component) that can be used in Silverlight apps?
Since I'm a Flash and Flex developer, I'll relate it. In Flex, if I have a SWC I can add it to my build path and then immediately use its included classes and functions in my project. Similarly, in Flash if I add a SWC to the Components folder then drag that SWC into my library, I can use the classes in my Flash project.
Does Silverlight have a similar concept? I just need a small code library that I can send to other developers, but it should be pre-compiled so the source is not readily available.
Thanks!
You should not have an issue pre-compiling the "Silverlight Class Library" project type in Visual Studio like you would traditional C# libraries, and release these to developers who can reference them in their Silverlight applications.

Resources