1

When building this project, shouldn't resgen.exe create code that would target .net 4.0 out of this resx file; and therefore fail when running under CLR 2.0?

This is a follow-up question to On a computer with .net 4.0 - Can one test that an application will run on .net 3.5? .

Community
  • 1
  • 1
ispiro
  • 26,556
  • 38
  • 136
  • 291
  • Resgen doesn't generate code. It generates a .resources file, a binary copy of the content of a .resx file. Data, not code. – Hans Passant May 12 '14 at 13:44
  • @HansPassant a)Thanks. b) Sorry for persisting, but apparently I've got this all wrong. Do you mean to say that when I build the project, Visual Studio (using resgen) will use the 4.0 assemblies in order to create the resources file? Is that where the **4.0.0.0** will come into play? The "**4.0.0.0**" must have _some_ effect, doesn't it? – ispiro May 12 '14 at 13:51
  • 1
    It uses the build tools that are selected by the Windows SDK version you use to build programs. For VS2013 they are in the "bin\NETFX 4.5.1 Tools" subdirectory. The resgen.exe tool there of course doesn't have any trouble using 4.0.0.0 types. Targeting an earlier .NET Framework version doesn't change the tools, they have no trouble supporting old versions. Maybe you are trying too hard to find a non-existing problem. – Hans Passant May 12 '14 at 14:01
  • @HansPassant In your comment to the previous question you said an ImageList would likely fail. That would mean that the resources file's format is slightly different in 4.0 than in 2.0. So **my takeaway from all of this is** that it _might_ fail - but it will do so even on my computer so I'll know about it. Thank you very much. – ispiro May 12 '14 at 14:13

0 Answers0