Skip to content

WPF: problem with 1.*, non-globalized, locally defined component, & signing

July 27, 2006
We have a problem that a few customers have hit here and here.
 
We believe it only happens if all of these things are true:
1) Your project has a version number with an asterisk in it (auto-incrementing).
2) You are not building a globalized application (set via UICulture setting in the project file).
3) In a XAML file, which is configure to be compiled as a Page, you are referencing a type that is from the same assembly that the baml file will be compiled into.  (Locally defined component is the term our team often uses for that.)
4) You are signing your assembly.
 
 
Currently, we think we aren’t going to fix this problem in v1, since it is a bit risky, we are done, and there are 4 different work arounds.
 
Please yell if this is going to be an extremely common scenario…or if we are crazy for not fixing this now.
 
Thanks, Rob

From → WPF

6 Comments
  1. Unknown permalink

    I ran into this without signing, but otherwise everything else is accurate

  2. Michael Gravill permalink

    I\’m sure we are going to see a lot more of \’we don\’t plan to fix this for v1\’.  I\’ve read previously that Microsoft is planning much more frequent and incremental updates in the future.  Can you say what the thinking is as regards WPF updates?  Not fixing stuff is less of an issue if an update with fixes can be expected in a reasonable timescale.
     
    It would also be great to see Microsoft\’s wish list for WPF and when features might be incorporated, eg. V2/V3, so we can provide feedback as to what we would find most useful.
     
    Oh, and tell Bill you guys deserve a pay raise!  WPF is FANTASTIC!🙂

  3. Ian permalink

    Chris\’s comment that this can occur without signing is a bit troubling – if that\’s going to be true for release, this would be more of a big deal.
     
    But if it\’s as you say in the list, and that you only see this if all 4 conditions apply, this looks very low priority to me. I\’ve always regarded the combination of "*" versioning and strong names to be a mistake. If you\’re doing that, it means you\’ve got no control over your version numbers. It would mean you can\’t repeatably build a speciifc version of your code from source control for example.
     
    So I\’ve tended to regard the "*" as a bit of a safety net whose only purpose is to provide a slightly better default than 0.0.0.0. (And it\’s only \’better\’ in the sense that it has a tendency to make the failure to think about versioning obvious earlier than it might otherwise have been – it\’s essentially a way of making alarms go off.) Any serious software project should remove and replace this with something that fits into their build process.
     
    So I wouldn\’t be in any hurry to see this issue fixed.

  4. Rob permalink

    Chris-
    I\’m scared that you ran into this without signing.  Can you please give us repro steps or a project that shows the problem?
    Thanks, Rob

  5. Unknown permalink

    Well I was getting this problem in the following situation:
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1329634&SiteID=1
    I\’m not totally sure that the problem is solved…It seems to be ok now, because I removed the * from the assembly.cs. 
     

  6. John permalink

    Hi Rob,
     
    I know you\’ve blogged about this topic some time ago.  I am currently writing a Pluggable design for a UI administrative application where the UI screens are implemented as extensible plugins.  I load these screens using a combination of Assembly.LoadFraom, Assebly.CreateInstance and then load the control asseblies\’ resources using Application.LoadComponent.  One of the requires of the application is that I can load multiple versions (i.e. 1.0.0.0 and 2.0.0.0) of the same extension.  I can load the resources of one version fine, but LoadComponent fails when I attempt to load the second version\’s resources with the \’The assembly used when compiling might be different than that used when loading…\’.
     
    I followed the steps you outlined previously (don\’t use * versioning, build supporting globalization, etc.) to no effect.  Is there anything else I can be missing?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: