4

I have a .NET 3.0 project which should be installed into GAC. I have some strong named assemblies, and in one of them there is control, which is used on a form of another strong named assembly.

When I change the version number of all assemblies and recompile the project, the resx files still reference the old assembly version until I open the form with the designer.

The whole project is compiled by a build server, which also sets the assembly version, therefore opening the form in a designer is not possible. So is there a chance to do the update programmatically?

The current solution is "search and replace" but sometimes we hit version numbers of 3rd-party assemblies that should not be changed.

T.S.
  • 18,195
  • 11
  • 58
  • 78
baschdy
  • 103
  • 3
  • What are you asking? Want to know if you can write a program to modify an XML file. Yes. – Hans Passant Dec 07 '11 at 18:48
  • 1
    I just wanted to know if there is a best practise for updating the resx files of a form that uses controls from strong named assemblies. I could not imagine that it is the intention of microsoft, to update the resx files via "search and replace." – baschdy Dec 08 '11 at 07:05
  • Obviously there is no best practice, I suppose. The situation gets even worse, when the designer complains about a missing reference (the old assembly) after the update and refuses to fix the reference itself. We ended up suggesting our users to use the `DesignerSerializationVisibility` attribute with `Hidden` for all public properties of our types. I woudn't name this a 'solution' though... – Haymo Kutschbach Aug 15 '14 at 16:01

0 Answers0