visual studio - How to avoid Winforms designer errors caused by assembly version mismatch, using NuGet workflow -


In the outside company, we use the NewGate version of our internal libraries to build the build server for each library , Which opens a new nugget package and uploads it to our internal feed.

This works very well for us, but we often run into a problem with WinForms Designer where it will refuse to load a form with an error message:

Dialy oder assembly "UILib, version = 1.0.0.906, culture = fair, public keynote = zero" Other words Abhay Igngkeit davon wurde nicht gefunden Das system kan die engangini detai niket search.

(broadly: one of the file or assembly "UILB, version = 1.0.0.906, culture = neutral, public key token = faucet" or its dependency can not be found. Can not find this file.)

This is only a designer issue - though this application will create no problem and it will move in its intended form.

This problem is, but now you need some valuable reference to make any sense out of it. The format that I am trying to open is part of an application (let's call it just app), and it has a usertrantol that is part of our product-specific UI library (ProductVilib). This library references reference to our general purpose UI library (UILib). However, this application also depends directly on UILB.

Both UILib and ProductUILib are provided through their own NuGet packages. Therefore, the simplified dependency graph is like this:

  app ---- & gt; Products ------ & gt; UILib | ^ ------------------------------ |   

All products are OK for ULib as well as AP references, similar versions of UILib (say, 1.0.0.906). However, if I modify UILib and then update my newgate dependency in the app, then the app will be found and reference to the latest version of UILB (say, 1.0.0.932) ProductUILib was made against the old UILib, but It should be fine because all the changes in UILib are backwards compatible, and we do not have strong names for those libraries, and in fact, the building and the running app works fine but the design And has now broken to affect the form and I showed up outlined above error message.

To solve this issue, we also need to update the productUyilib's Nuggets package so that in turn makes it against the latest UILB, and then the dependence of the app to get the new product UILB once Update

I have both V.S. 2010 and latest VS Tested in 2013, the new one reflects correct behavior.

Do you have any suggestions on how we can avoid this issue?

We managed to resolve the problem by changing our strategy, AssemblyVersion Using AssemblyFileVersion and assembly related versions .

We automatically generate the last part of our version numbers on each build, setting it to the current SVN correction number, this generated version number (such as 1.0.0.906) both assembly version and AssemblyFileVersion . Is used to go in. Designers are apparently considered inconsistent with the assembly version with different assemblies assembly. However, without the strong name, the normal loading process for assemblies, does not take into account the mismatch, so the creation and execution of the program is therefore a designer's bit more pick-up.

The solution was to use a certain value for the AssemblyVersion , we will only update the changes to break the generated version number now AssemblyFileVersion and Assemblance Version goes to both. This last one is important because NuGet will always fill its $ nuspec $ version $ placeholder with AssemblyVersion , unless AssemblyInformationalVersion is not present to override it, and we Version number is intended

In short:

  • Update assembly version to break the changes < Li> Legislature Correspondent Version for Numbers for your newgate package Switch to be

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -