everyone!
I try to update values in .resx file with ResXResourceWriter and the value which I updated with AddResource method call effected it well. But the other values were deleted. I didn’t receive any errors.
Platform is ASP.NET 3.5, Windows 7-x64.
Here is a code of key method in writing-workflow:
void UpdateResourceValueOfKey(string resFileName, string key, string value)
{
using (ResXResourceWriter resourceWriter = new ResXResourceWriter(resFileName))
{
string resValue = contentEditor.InnerText;
resourceWriter.AddResource(key, value);
resourceWriter.Generate();
resourceWriter.Close();
}
}
Any ideas would be appreciated.
I ddin’t find the reason of this strange behavior, but I solve it by copying all values from resx into dictionary, then made all changes in dictionary and save all pairs from it to the same resx file. I know, this is bad approach, but works for me.