Thursday, September 13, 2012

Is supported in Silverlight, Windows Phone, and Metro?

Is supported in Silverlight, Windows Phone, and Metro?

Is <bindingRedirect /> supported outside of the full .NET Framework? For instance, the following is supported with a normal .NET app (in app.config or web.config):

<configuration>   <runtime>     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">       <dependentAssembly>         <assemblyIdentity name="PostSharp"  publicKeyToken="b13fd38b8f9c99d7" culture="neutral" />         <bindingRedirect oldVersion="3.0.0.0-3.1.1.1" newVersion="3.1.1.1"/>       </dependentAssembly>     </assemblyBinding>   </runtime> </configuration> 

If it is not supported, how is the problem of indirect assembly references addressed? That is, if component A refers to components B and C, and B refers to D v1.0, C to D v1.1, how do we ensure that B finds its dependency if we ship only D v1.1?

Answers & Comments...

Answer: 1

No binding redirects are not supported in Silverlight, Windows Phone or Windows Store apps. However, this is because they are not needed.

Assuming we are only talking about non-platform assemblies here, basically all three of those platforms have similar binding policies in that they will allow a later version of an assembly to satisfy an earlier version with the same name.

In your particular example, this would mean that component B would automatically get version D v1.1.

by : David Keanhttp://stackoverflow.com/users/1218765




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog