RE: Dynamic assembly loading

2011-02-10 Thread John OBrien

Are you running Silverlight 4 and don't need OOB support? Simple solution is 
the built in application library caching. For external dlls you may need to 
manually create the exmap.
Also I saw you mention they were c1 controls, have you used their XAPOptomiser 
to trim out unused code instead?
 
I've implimented dynamic assemble loading for an application based on the 
navigation framework, essentially load each page from a remote dll, it is 
really quite fiddly to setup and I don't recommend the pain but the model of 
only loading the code you need as you load that page makes a lot of sence.
 
 From: g...@mira.net
 To: ozsilverlight@ozsilverlight.com
 Subject: RE: Dynamic assembly loading
 Date: Thu, 10 Feb 2011 17:13:46 +1100
 
 Colin, I also suspected some sort of domino effect of dependencies was
 causing my DLLs to stay included in the XAP. I'm sure my DLLs are only
 referenced in a single project, and that project has Copy Local false.
 
 I moved the DLLs to a separate folder and referenced them there instead of
 under C:\Program Files (x86) as Copy Local false. I cleaned everything, ran
 msbuild verbose and had a look at the output.
 
 The output is contradictory. It says it found the DLLs in my folder and
 correctly says they a copy local false. Later it says it will copy the files
 from the Program Files folder and then it gets included in the xap.
 
 There is some influence over the build that I can't detect, possibly taking
 references from the Program Files folder when I don't expect it to.
 
 Oh well, there goes another 5 hours of mostly unpaid work.
 
 Everything doesn't work -- Greg
 
 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
  ___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: Dynamic assembly loading

2011-02-10 Thread Greg Keogh
John, you've mentioned some interesting subjects that I am not familiar
with: application library caching and exmap; C1 XAPOptimiser. I'll run some
searches on these topics.

 

Loading by navigation might be overkill for my needs, but I would have tried
to implement something like if I had complex app navigation. This app has
only a handful of fixed screen views that you can jump between.

 

I would urge myself (and everyone else) who is starting a new Silverlight
app to remember right from the start that you might need to dynamically load
bits of the app ... data, resources, assemblies, etc. Don't be lazy at the
start, remember to bake-in some design so you can do this easily.

 

Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: Dynamic assembly loading

2011-02-10 Thread John OBrien

Absolutely worth looking at those options, It should have been extmap, MSDN 
article covers it well:
http://msdn.microsoft.com/en-us/library/dd833069(VS.95).aspx
 
Looks like C1 has an online version if you want to test their optomiser instead:
http://demo.componentone.com/Silverlight/XapOptimizer/
 
If you or anyone is really interested in the load on demand based on the 
navigation framework I got all the ideas from here:
http://www.davidpoll.com/2010/02/01/on-demand-loading-of-assemblies-with-silverlight-navigation-revisited-for-silverlight-4-beta/
 
John.
 


From: g...@mira.net
To: ozsilverlight@ozsilverlight.com
Subject: RE: Dynamic assembly loading
Date: Thu, 10 Feb 2011 21:12:10 +1100






John, you've mentioned some interesting subjects that I am not familiar with: 
application library caching and exmap; C1 XAPOptimiser. I'll run some searches 
on these topics.
 
Loading by navigation might be overkill for my needs, but I would have tried to 
implement something like if I had complex app navigation. This app has only a 
handful of fixed screen views that you can jump between.
 
I would urge myself (and everyone else) who is starting a new Silverlight app 
to remember right from the start that you might need to dynamically load bits 
of the app ... data, resources, assemblies, etc. Don't be lazy at the start, 
remember to bake-in some design so you can do this easily.
 
Greg
___ ozsilverlight mailing list 
ozsilverlight@ozsilverlight.com 
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
   ___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Dynamic assembly loading

2011-02-09 Thread Greg Keogh
Folks, after years of avoiding the need, I finally have to async load some
large DLLs. I have two charting libraries to reference and their total size
is causing slow app loading.

I have placed the guilty DLLs in the ClientBin folder and I can see them
async loading correctly. But ... how do I let them be referenced in the
project for compilation, but keep them out of the app XAP file for deploy?

I tried setting Copy Local = false for the two references, but that has no
effect.

Cheers,
Greg


___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Re: Dynamic assembly loading

2011-02-09 Thread Stephen Price
Have a look at this
http://development-guides.silverbaylabs.org/Video/Dynamically-Loading-.Dlls-in-Silverlight
It seems to cover how I started off doing it on a project last year. I
started off copying how Prism does it (it's a pattern with some helper
dll's essentially) and then later we swapped in the Prism helpers.
That was pretty easy as I'd named everything closely with Prism.

So you can do it yourself or use a framework such as Prism. I've heard
it said Prism is quite large/bloated compared to some other
frameworks. I've not yet had a chance to look at the others, I like to
do things myself until the need arises to use someone elses framework.
Its a double edged sword, it does what you want but comes with their
bugs.

I'll be looking at MVVM lite over the next few weeks. May even do a
demo at next Perth Silverlight user group. (more than welcome to fly
over to visit hehe)

have fun!

On Thu, Feb 10, 2011 at 11:41 AM, Greg Keogh g...@mira.net wrote:
 Folks, after years of avoiding the need, I finally have to async load some
 large DLLs. I have two charting libraries to reference and their total size
 is causing slow app loading.

 I have placed the guilty DLLs in the ClientBin folder and I can see them
 async loading correctly. But ... how do I let them be referenced in the
 project for compilation, but keep them out of the app XAP file for deploy?

 I tried setting Copy Local = false for the two references, but that has no
 effect.

 Cheers,
 Greg


 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: Dynamic assembly loading

2011-02-09 Thread Carl . Scarlett
+1

 

Covering MVVM Lite at Perth SDDN is an awesome idea.

 

Carl.

 

Carl Scarlett

Senior .NET/WPF Developer, UX Designer | Genesis

IT  Change Management | Bankwest

A: Level 5, 199 Hay Street | Perth | Western Australia | 6004

P: (08) 9449 8451

M: 0408 913 870

E: carl.scarl...@bankwest.com.au

 

AFR Smart Investor Blue Ribbon Awards
2010 Bank of the Year

 

 

From: ozsilverlight-boun...@ozsilverlight.com
[mailto:ozsilverlight-boun...@ozsilverlight.com] On Behalf Of Stephen
Price step...@littlevoices.com
Sent: Thursday, 10 February 2011 12:28 PM
To: ozSilverlight ozsilverlight@ozsilverlight.com
Subject: Re: Dynamic assembly loading

 

Have a look at this 
http://development-guides.silverbaylabs.org/Video/Dynamically-Loading-.D
lls-in-Silverlight 
It seems to cover how I started off doing it on a project last year. I 
started off copying how Prism does it (it's a pattern with some helper 
dll's essentially) and then later we swapped in the Prism helpers. 
That was pretty easy as I'd named everything closely with Prism. 

So you can do it yourself or use a framework such as Prism. I've heard 
it said Prism is quite large/bloated compared to some other 
frameworks. I've not yet had a chance to look at the others, I like to 
do things myself until the need arises to use someone elses framework. 
Its a double edged sword, it does what you want but comes with their 
bugs. 

I'll be looking at MVVM lite over the next few weeks. May even do a 
demo at next Perth Silverlight user group. (more than welcome to fly 
over to visit hehe) 

have fun! 

On Thu, Feb 10, 2011 at 11:41 AM, Greg Keogh  g...@mira.net wrote: 
 Folks, after years of avoiding the need, I finally have to async load
some 
 large DLLs. I have two charting libraries to reference and their total
size 
 is causing slow app loading. 
 
 I have placed the guilty DLLs in the ClientBin folder and I can see
them 
 async loading correctly. But ... how do I let them be referenced in
the 
 project for compilation, but keep them out of the app XAP file for
deploy? 
 
 I tried setting Copy Local = false for the two references, but that
has no 
 effect. 
 
 Cheers, 
 Greg 
 
 
 ___ 
 ozsilverlight mailing list 
 ozsilverlight@ozsilverlight.com 
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight 
 
___ 
ozsilverlight mailing list 
ozsilverlight@ozsilverlight.com 
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight 

__ 
This email has been scanned by the MessageLabs Email Security System. 
For more information please visit http://www.messagelabs.com/email 
__ 


___ 

This email has been scanned by the Bankwest Email Security System. 

___ 

___
Unencrypted electronic mail is not secure and may not be authentic.
If you have any doubts as to the contents please telephone to confirm.

This electronic transmission including any attachments is intended only
for those to whom it is addressed. It may contain copyright material or
information that is confidential, privileged or exempt from disclosure by law.
Any claim to privilege is not waived or lost by reason of mistaken transmission
of this information. If you are not the intended recipient you must not
distribute or copy this transmission and should please notify the sender.
Your costs for doing this will be reimbursed by the sender.

We do not accept liability in connection with computer virus, data corruption,
delay, interruption, unauthorised access or unauthorised amendment.
___


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
_
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Re: Dynamic assembly loading

2011-02-09 Thread Chris Anderson
I'd like to have a talk on MVVM Light at the Sydney SDDN too.  Anybody
willing to do a talk about it next month?  This month, we've got Young Oh
talking about Prism + MEF.

BTW. I think this is the first email you've sent to the list Carl that
hasn't gone into my Spam folder :).

Chris


On 10 February 2011 15:39, carl.scarl...@bankwest.com.au wrote:

  +1



 Covering MVVM Lite at Perth SDDN is an awesome idea.



 Carl.



 Carl Scarlett

 Senior .NET/WPF Developer, UX Designer | Genesis

 *IT  Change Management |** **Bankwest*

 A: Level 5, 199 Hay Street | Perth | Western Australia | 6004

 P: (08) 9449 8451

 M: 0408 913 870

 E: carl.scarl...@bankwest.com.au



 *AFR Smart Investor** Blue Ribbon Awards**
 **2010 Bank of the Year*





 *From:* ozsilverlight-boun...@ozsilverlight.com [mailto:
 ozsilverlight-boun...@ozsilverlight.com] *On Behalf Of *Stephen Price 
 step...@littlevoices.com
 *Sent:* Thursday, 10 February 2011 12:28 PM
 *To:* ozSilverlight ozsilverlight@ozsilverlight.com
 *Subject:* Re: Dynamic assembly loading



 Have a look at this

 http://development-guides.silverbaylabs.org/Video/Dynamically-Loading-.Dlls-in-Silverlight
 It seems to cover how I started off doing it on a project last year. I
 started off copying how Prism does it (it's a pattern with some helper
 dll's essentially) and then later we swapped in the Prism helpers.
 That was pretty easy as I'd named everything closely with Prism.

 So you can do it yourself or use a framework such as Prism. I've heard
 it said Prism is quite large/bloated compared to some other
 frameworks. I've not yet had a chance to look at the others, I like to
 do things myself until the need arises to use someone elses framework.
 Its a double edged sword, it does what you want but comes with their
 bugs.

 I'll be looking at MVVM lite over the next few weeks. May even do a
 demo at next Perth Silverlight user group. (more than welcome to fly
 over to visit hehe)

 have fun!

 On Thu, Feb 10, 2011 at 11:41 AM, Greg Keogh  g...@mira.net wrote:
  Folks, after years of avoiding the need, I finally have to async load
 some
  large DLLs. I have two charting libraries to reference and their total
 size
  is causing slow app loading.
 
  I have placed the guilty DLLs in the ClientBin folder and I can see them
  async loading correctly. But ... how do I let them be referenced in the
  project for compilation, but keep them out of the app XAP file for
 deploy?
 
  I tried setting Copy Local = false for the two references, but that has
 no
  effect.
 
  Cheers,
  Greg
 
 
  ___
  ozsilverlight mailing list
  ozsilverlight@ozsilverlight.com
  http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
 
 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email
 __

 ___


 This email has been scanned by the Bankwest Email Security System.
 ___




 ___
 Unencrypted electronic mail is not secure and may not be authentic.
 If you have any doubts as to the contents please telephone to confirm.

 This electronic transmission including any attachments is intended only
 for those to whom it is addressed. It may contain copyright material or
 information that is confidential, privileged or exempt from disclosure by
 law.
 Any claim to privilege is not waived or lost by reason of mistaken
 transmission
 of this information. If you are not the intended recipient you must not
 distribute or copy this transmission and should please notify the sender.
 Your costs for doing this will be reimbursed by the sender.

 We do not accept liability in connection with computer virus, data
 corruption,
 delay, interruption, unauthorised access or unauthorised amendment.

 ___
 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email
 __

 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001

Re: Dynamic assembly loading

2011-02-09 Thread Stephen Price
His email went into my spam folder but thats due to a special filter I
set up. ;)

just kidding Carl!

On Thu, Feb 10, 2011 at 12:43 PM, Chris Anderson
christheco...@gmail.com wrote:
 I'd like to have a talk on MVVM Light at the Sydney SDDN too.  Anybody
 willing to do a talk about it next month?  This month, we've got Young Oh
 talking about Prism + MEF.
 BTW. I think this is the first email you've sent to the list Carl that
 hasn't gone into my Spam folder :).
 Chris

 On 10 February 2011 15:39, carl.scarl...@bankwest.com.au wrote:

 +1



 Covering MVVM Lite at Perth SDDN is an awesome idea.



 Carl.



 Carl Scarlett

 Senior .NET/WPF Developer, UX Designer | Genesis

 IT  Change Management | Bankwest

 A: Level 5, 199 Hay Street | Perth | Western Australia | 6004

 P: (08) 9449 8451

 M: 0408 913 870

 E: carl.scarl...@bankwest.com.au



 AFR Smart Investor Blue Ribbon Awards
 2010 Bank of the Year





 From: ozsilverlight-boun...@ozsilverlight.com
 [mailto:ozsilverlight-boun...@ozsilverlight.com] On Behalf Of Stephen Price
 step...@littlevoices.com
 Sent: Thursday, 10 February 2011 12:28 PM
 To: ozSilverlight ozsilverlight@ozsilverlight.com
 Subject: Re: Dynamic assembly loading



 Have a look at this

 http://development-guides.silverbaylabs.org/Video/Dynamically-Loading-.Dlls-in-Silverlight
 It seems to cover how I started off doing it on a project last year. I
 started off copying how Prism does it (it's a pattern with some helper
 dll's essentially) and then later we swapped in the Prism helpers.
 That was pretty easy as I'd named everything closely with Prism.

 So you can do it yourself or use a framework such as Prism. I've heard
 it said Prism is quite large/bloated compared to some other
 frameworks. I've not yet had a chance to look at the others, I like to
 do things myself until the need arises to use someone elses framework.
 Its a double edged sword, it does what you want but comes with their
 bugs.

 I'll be looking at MVVM lite over the next few weeks. May even do a
 demo at next Perth Silverlight user group. (more than welcome to fly
 over to visit hehe)

 have fun!

 On Thu, Feb 10, 2011 at 11:41 AM, Greg Keogh  g...@mira.net wrote:
  Folks, after years of avoiding the need, I finally have to async load
  some
  large DLLs. I have two charting libraries to reference and their total
  size
  is causing slow app loading.
 
  I have placed the guilty DLLs in the ClientBin folder and I can see them
  async loading correctly. But ... how do I let them be referenced in the
  project for compilation, but keep them out of the app XAP file for
  deploy?
 
  I tried setting Copy Local = false for the two references, but that has
  no
  effect.
 
  Cheers,
  Greg
 
 
  ___
  ozsilverlight mailing list
  ozsilverlight@ozsilverlight.com
  http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
 
 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email
 __


 ___

 This email has been scanned by the Bankwest Email Security System.

 ___


 ___
 Unencrypted electronic mail is not secure and may not be authentic.
 If you have any doubts as to the contents please telephone to confirm.

 This electronic transmission including any attachments is intended only
 for those to whom it is addressed. It may contain copyright material or
 information that is confidential, privileged or exempt from disclosure by
 law.
 Any claim to privilege is not waived or lost by reason of mistaken
 transmission
 of this information. If you are not the intended recipient you must not
 distribute or copy this transmission and should please notify the sender.
 Your costs for doing this will be reimbursed by the sender.

 We do not accept liability in connection with computer virus, data
 corruption,
 delay, interruption, unauthorised access or unauthorised amendment.

 ___
 __
 This email has been scanned by the MessageLabs Email Security System.
 For more information please visit http://www.messagelabs.com/email
 __

 ___
 ozsilverlight mailing list
 ozsilverlight@ozsilverlight.com
 http://prdlxvm0001

RE: Dynamic assembly loading

2011-02-09 Thread Colin Savage
I have seen problems in the past with copy local, particularly with using 
msbuild. It goes like this:

Assembly B.dll depends on Assembly A.dll
Assembly C.dll also depends on Assembly A.dll and Assembly B.dll

B - A has copy local = true
C - A has copy local = false

When compiling a solution using msbuild, Assembly A.dll appears in the compiled 
output of both B and C. 

The copy local setting should exclude your assembly from the xap, but the build 
process might be getting confused with multiple copy local settings. If you set 
the build output level to verbose you may be able to diagnose why your assembly 
is being copied to the output. 

Regards,
Colin Savage

-Original Message-
From: ozsilverlight-boun...@ozsilverlight.com 
[mailto:ozsilverlight-boun...@ozsilverlight.com] On Behalf Of Greg Keogh
Sent: Thursday, 10 February 2011 3:40 PM
To: 'ozSilverlight'
Subject: RE: Dynamic assembly loading

Howdy, I should have mentioned that I'm not using MEF or Prism or the like, as 
my needs are modest and I don't want dependencies on more frameworks. I'm 
simply firing off some WebClient OpenReadAsync() calls and feeding the returned 
streams into AssemblyPart Load(), the code is short and clear and it worked 
first time.

I've been searching and searching, but everyone says simply putting Copy 
Local to false on the references will keep them out of the deployed xap file. 
Not for me ... I have purged all of the binaries out of my solution many times 
over, restarted, double checked the references and their properties, but no 
matter what I do the offending DLLs get included in the XAP file.

I've now wasted 3 hours on this idiocy.

I can only come to your Perth presentation on a first class flight due to a bad 
back, just post me the ticket.

Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: Dynamic assembly loading

2011-02-09 Thread Greg Keogh
I guess that means I'm not spamming the list with my posts then *grin*.

 

You could be kind to the colour blind and change your font ;-) -- Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: Dynamic assembly loading

2011-02-09 Thread Greg Keogh
Colin, I also suspected some sort of domino effect of dependencies was
causing my DLLs to stay included in the XAP. I'm sure my DLLs are only
referenced in a single project, and that project has Copy Local false.

I moved the DLLs to a separate folder and referenced them there instead of
under C:\Program Files (x86) as Copy Local false. I cleaned everything, ran
msbuild verbose and had a look at the output.

The output is contradictory. It says it found the DLLs in my folder and
correctly says they a copy local false. Later it says it will copy the files
from the Program Files folder and then it gets included in the xap.

There is some influence over the build that I can't detect, possibly taking
references from the Program Files folder when I don't expect it to.

Oh well, there goes another 5 hours of mostly unpaid work.

Everything doesn't work -- Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight