Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Break WPF application into smaller assemblies

 
 
Old 07-10-2007   #1 (permalink)
tam.dominic@gmail.com


 
 

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


 
 

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


 
 

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


 
 

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


 
 

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
 

Thread Tools


Similar Threads
Thread Forum
Deploying satellite assemblies .NET General
Powershell Assemblies PowerShell
Powershell assemblies PowerShell
psh assemblies moved? PowerShell
How to find out which assemblies are 64bit? PowerShell


Vista Forums 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 Ltd

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