sooprise
sooprise

Reputation: 23177

Resources.resx error?

I'm getting an error that reads:

The custom tool 'PublicResXFileCodeGenerator' failed while processing the file 'Properties\Resources.resx'

I haven't the slightest clue how to fix it. If any of you know what's going on here, I could use your help.

Upvotes: 4

Views: 8968

Answers (3)

Michael azzar
Michael azzar

Reputation: 321

try this .. Open your fileName.resx file in windows explorer and right click - Properties

maybe you will find "This file came from another computer and might be blocked to help protect this computer."

Check [Unblock] checkbox and apply then try to build your solution again.enter image description here

Upvotes: 0

Matt Frear
Matt Frear

Reputation: 54801

Follow these instructions:

  1. Copy the contents of Resources.resx to a new resource file.
  2. Delete Resources.resx from the project.
  3. Unload the project
  4. Reload the project.

That should get rid of the compiler warning.

Upvotes: 1

womp
womp

Reputation: 116977

Whenever a .resx file is compiled, Visual Studio runs it through the PublicResXFileCodeGenerator (or InternalResXFileCodeGenerator, if it's visibility is internal) to generate the actual strongly-typed properties that you use in your code.

If there is something wrong with the XML in the file, malformed or corrupted perhaps, then the process might fail. Can you open the file in the resource view?

Upvotes: 2

Related Questions