c# - New string added to .resx file in VS2008 cause compilation error that it doesn't exist -
I recently upgraded my projects from VS 2005 to VS 2008. I created a .resx file And it works fine with VS 2005.
Now, with VS2008, I added a new string in the string.rex file and used it in my code (C #). But I have received a compilation error that my new string is not present in the string. I asked my colleague to check on his machine and he got the same problem. I found out that VS2008 adds new string to the .resx file, but not so. Designer.cs file.
Is this a known problem? Is there any way to fix it? (In addition to manually adding code).
Thanks in advance.
Turns out that the problem occurred because my .resx and .esigner.cs files were read It was because I was checking them out of StarTeam.
I was asked in VS 2005 whether I should write both files and when I answered yes The Designer.cs file was also modified, so I could use a new member from my code. But in VS 2008, it does not ask if I want to make it. Designer files are writable, so it remains only for reading and VS. Can not modify it, so I can not use a new member.
To summarize: You should always write to work with VS2008 correctly before changing .resx file and .Designer.cs file to .3x file before it can be corrected.
Comments
Post a Comment