Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Break WPF application into smaller assemblies

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 07-10-2007   #1 (permalink)
tam.dominic@gmail.com
Guest


 

Break WPF application into smaller assemblies

Hi. I'm new to WPF. Is there any way to break a big WPF exe into
smaller assemblies, say, one exe with a bunch of DLLs (just like the
good-old-days of Win32 application)

If there is, I wonder whether these assemblies (exe and DLLs) can have
different version numbers so that the automatic update will only
update the client with a subset of these assemblies. For example,
Main.exe, Component1.dll and Component2.dll are kept the same, but I
have updated Component3.dll. So, when the user runs the application,
the automatic update will be smart enough to know that only
Component3.dll needs to be updated.


Thanks
Dom


My System SpecsSystem Spec
Old 07-12-2007   #2 (permalink)
Laurent Bugnion, MVP
Guest


 

Re: Break WPF application into smaller assemblies

Hi,

tam.dominic@gmail.com wrote:
> Hi. I'm new to WPF. Is there any way to break a big WPF exe into
> smaller assemblies, say, one exe with a bunch of DLLs (just like the
> good-old-days of Win32 application)


Yes. WPF is a normal .NET application. You can pack functionality in
multiple assemblies (DLL or even EXEs). Just like you'd do in a WinForms
application.

> If there is, I wonder whether these assemblies (exe and DLLs) can have
> different version numbers so that the automatic update will only
> update the client with a subset of these assemblies. For example,
> Main.exe, Component1.dll and Component2.dll are kept the same, but I
> have updated Component3.dll. So, when the user runs the application,
> the automatic update will be smart enough to know that only
> Component3.dll needs to be updated.


I suppose that the "automatic update" mechanism you mention means that
you deploy your application using ClickOnce? WPF does not have an
intrisic "automatic update" mechanism, but .NET 2.0 has one, which is
named ClickOnce. Unfortunately, as far as I know, the version specified
in the AssemblyInfo is not observed in ClickOnce, this is another
version number for the application (the one you enter in the Project
Properties under "Publish"). If you have multiple components, I am not
sure how clever ClickOnce is, and if only new/updated components are
downloaded, or the whole thing again.

> Thanks
> Dom


HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
My System SpecsSystem Spec
Old 07-12-2007   #3 (permalink)
Laurent Bugnion, MVP
Guest


 

Re: Break WPF application into smaller assemblies

Hi,

tam.dominic@gmail.com wrote:
> Hi. I'm new to WPF. Is there any way to break a big WPF exe into
> smaller assemblies, say, one exe with a bunch of DLLs (just like the
> good-old-days of Win32 application)


Yes. WPF is a normal .NET application. You can pack functionality in
multiple assemblies (DLL or even EXEs). Just like you'd do in a WinForms
application.

> If there is, I wonder whether these assemblies (exe and DLLs) can have
> different version numbers so that the automatic update will only
> update the client with a subset of these assemblies. For example,
> Main.exe, Component1.dll and Component2.dll are kept the same, but I
> have updated Component3.dll. So, when the user runs the application,
> the automatic update will be smart enough to know that only
> Component3.dll needs to be updated.


I suppose that the "automatic update" mechanism you mention means that
you deploy your application using ClickOnce? WPF does not have an
intrisic "automatic update" mechanism, but .NET 2.0 has one, which is
named ClickOnce. Unfortunately, as far as I know, the version specified
in the AssemblyInfo is not observed in ClickOnce, this is another
version number for the application (the one you enter in the Project
Properties under "Publish"). If you have multiple components, I am not
sure how clever ClickOnce is, and if only new/updated components are
downloaded, or the whole thing again.

> Thanks
> Dom


HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
My System SpecsSystem Spec
Old 07-14-2007   #4 (permalink)
tam.dominic@gmail.com
Guest


 

Re: Break WPF application into smaller assemblies

On Jul 12, 5:10 am, "Laurent Bugnion, MVP" <galasoft...@bluewin.ch>
wrote:
> Hi,
>
> tam.domi...@gmail.com wrote:
> > Hi. I'm new to WPF. Is there any way to break a big WPF exe into
> > smaller assemblies, say, one exe with a bunch of DLLs (just like the
> > good-old-days of Win32 application)

>
> Yes. WPF is a normal .NET application. You can pack functionality in
> multiple assemblies (DLL or even EXEs). Just like you'd do in a WinForms
> application.
>
> > If there is, I wonder whether these assemblies (exe and DLLs) can have
> > different version numbers so that the automatic update will only
> > update the client with a subset of these assemblies. For example,
> > Main.exe, Component1.dll and Component2.dll are kept the same, but I
> > have updated Component3.dll. So, when the user runs the application,
> > the automatic update will be smart enough to know that only
> > Component3.dll needs to be updated.

>
> I suppose that the "automatic update" mechanism you mention means that
> you deploy your application using ClickOnce? WPF does not have an
> intrisic "automatic update" mechanism, but .NET 2.0 has one, which is
> named ClickOnce. Unfortunately, as far as I know, the version specified
> in the AssemblyInfo is not observed in ClickOnce, this is another
> version number for the application (the one you enter in the Project
> Properties under "Publish"). If you have multiple components, I am not
> sure how clever ClickOnce is, and if only new/updated components are
> downloaded, or the whole thing again.
>
> > Thanks
> > Dom

>
> HTH,
> Laurent
> --
> Laurent Bugnion [MVP ASP.NET]
> Software engineering, Blog:http://www.galasoft.ch
> PhotoAlbum:http://www.galasoft.ch/pictures
> Support children in Calcutta:http://www.calcutta-espoir.ch


Thanks for your reply. I only had experience in ASP.NET, but not much
in WinForm. For example, if an app has two different XAML pages. Do
you mean that I can put them into two different Exes or DLLs? Exactly
how can I do that? How do they communicate with each other (saying
passing information from one to another)?

Thanks
Dominic

My System SpecsSystem Spec
Old 07-28-2007   #5 (permalink)
Laurent Bugnion, MVP
Guest


 

Re: Break WPF application into smaller assemblies

Hi,

tam.dominic@gmail.com wrote:
>
> Thanks for your reply. I only had experience in ASP.NET, but not much
> in WinForm. For example, if an app has two different XAML pages. Do
> you mean that I can put them into two different Exes or DLLs? Exactly
> how can I do that? How do they communicate with each other (saying
> passing information from one to another)?
>
> Thanks
> Dominic


I am sorry for the delayed answer. I was in holidays. This forum is very
slow, most people moved to the WPF section of MSDN now, at
http://forums.microsoft.com/MSDN/Sho...D=119&SiteID=1

About your question, yes you can use a XAML page packed in a DLL from
another DLL or EXE. To do this, use the pack URI syntax, which is
described here:
http://msdn2.microsoft.com/en-us/library/aa970069.aspx

The pack URI syntax can be used to define the "Source" property of an
element or to navigate to a page. It allows using pages in referenced
DLLs. Only limitation: The DLL must be loaded in the App Domain, which
can be achieved either by referencing the DLL from your CSPROJ file (use
the "Add reference" function in Visual Studio) or dynamically by using
the Assembly.LoadFrom method (there are other ways too).

I hope this late answer helps you anyway.

Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
My System SpecsSystem Spec
Closed Thread
Update your Vista Drivers Update Your Drivers Now!!

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Powershell Assemblies PPTEscher PowerShell 5 02-29-2008 10:20 AM
Powershell assemblies VS PowerShell 3 10-07-2007 04:47 PM
psh assemblies moved? William Stacey [C# MVP] PowerShell 3 05-31-2007 01:46 PM
Loading Assemblies and Memory K Kong PowerShell 1 05-09-2007 02:54 AM
using external assemblies in XAML madhur Avalon 3 03-01-2006 04:43 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51