Oops.. how can I rebuild a RESX file?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Yup - I'm having one of those days! I've just deleted the wrong RESX file (ie
one that was in use!) and now my project wont compile. How can I rebuild the
resx file, or get it back!? (didnt go into the bin!).

Ta


Dan
 
If you use sytem for version control like SourceSafe, you can restore it from
there. Otherwise I don't know what you can do about it.
 
dhnriverside said:
Yup - I'm having one of those days! I've just deleted the wrong RESX file (ie
one that was in use!) and now my project wont compile. How can I rebuild the
resx file, or get it back!? (didnt go into the bin!).
Have you still got a .resources file? If so you can use the resgen.exe
tool to generate the .resx from the .resource file. If not you'll have
to use a tool, such as Reflector, to decompile the assembly to get hold
of the resources.

Anders Norås
http://dotnetjunkies.com/weblog/anoras/
 
Anders,

I've just downloaded Reflector and loaded my project's dll file from the bin
dir, and there is no resources for the lost RESX at all! I have the class
name, members etc in the namespace, but nothing under Resources.

I'm guessing that means there's no way to rebuild it?
 
Is it viable in your situation to create a new ASP page, copy-paste relevant
pieces of HTML and code behind, delete the old file, rename the new one and
rebuild the application?

Hrvoje
 
Just to let you know I've fixed it. Looking at the other RESX files in VS, I
noticed there's not a lot in them, then I noticed I could create them through
Add New Item, so I created a new resx file and just named it xxx.aspx.resx -
and it now compiles again!

Yay! Thanks for all suggestions - Reflector/Resourcer look very handy!
 
Back
Top