question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Versioning of libraries and designer

See original GitHub issue
  • .NET Core Version: 5.0.x

  • Have you experienced this same bug with .NET Framework?: No

Problem description:

We are running Visual Studio 16.9.0 Preview 3.0 which ships with some .NET 5.0.2 bits. These bits are consumed by the WinForms designer. The designer then serializes these types into .resx along with the version of the library, eg.:

  <assembly alias="System.Windows.Forms.Primitives" name="System.Windows.Forms.Primitives, Version=5.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  <data name="label_Title.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms.Primitives">
    <value>0, 3, 3, 3</value>
  </data>

The application itself is however compiled with a fixed version of .NET framework specified in global.json file:

{
  "sdk": {
    "version": "5.0.100",
    "allowPrerelease": true,
    "rollForward": "latestFeature"
  }
}

This results in issue where the serialized types cannot be loaded at runtime and crash the app.

Expected behavior:

Assembly versions (as opposed to file versions!) should not change between service releases, or designer should target the same service release the application is compiled with.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
filipnavaracommented, Feb 19, 2021

Can you give an example to this and open a new issue with more details?

@dreddy-work I’ll file a separate report for that through VS feedback. Basically any null that is assigned into control property in the designer ends up as ResXNullRef type in the .resx file. Since the designer ships its own copy of ResX classes it happens to use its own copy of ResXNullRef that resides in the designer assembly. It puts the wrong assembly name into the .resx file and fails at runtime.

0reactions
dreddy-workcommented, Apr 30, 2021

Can you give an example to this and open a new issue with more details?

@dreddy-work I’ll file a separate report for that through VS feedback. Basically any null that is assigned into control property in the designer ends up as ResXNullRef type in the .resx file. Since the designer ships its own copy of ResX classes it happens to use its own copy of ResXNullRef that resides in the designer assembly. It puts the wrong assembly name into the .resx file and fails at runtime.

We stopped writing designer specific type info into Resx file during serialization. We still yet to do work for the resources added directly from the Resource editor in VisualStudio but not by Winforms designer. If you still see this issue with latest VS (VS 2019 16.10 preview3) and If you have already opened a feedback ticket, can you please share link here ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Design system versioning: single library or individual ...
Versioning the library as a whole means that maintainers can confidently say the group of components contained in the library are all compatible ......
Read more >
Version Control for Design - Why Is it Worth Having it?
Version control for designers is any record of changes to a design output like prototype or a design system. It helps designers stay...
Read more >
Design Versioning — It's true, it's here, let's talk and learn ...
Why versioning design is a good idea? Multiple designers can work on the same project, at the same time. Avoid not knowing what...
Read more >
The Ultimate Guide to Version Control for Designers
Take a look at this article that will help you to understand why version control is important for designers and help you start...
Read more >
Versioning Independent Components | Bits and Pieces - Bit.dev
Single-versioned component libraries block the distributor's ability to release incremental updates per-component. If there's a new major ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found