Couldn't process file resx due to its being in the Internet or Restricted zone or having the mark of the web on the file
Solution 1:
If you downloaded the file from the internet, either separately or inside a .zip file or similar, it may have been "locked" because it is flagged as coming from the internet zone. Many programs will use this as a sign that the content should not be trusted.
The simplest solution is to right-click the file in Windows Explorer, select Properties, and along the bottom of this dialog, you should have an "Unblock" option. Remember to click OK to accept the change.
If you got the file from an archive, it is usually better to unblock the archive first, if the file is flagged as coming from the internet zone, and you unzip it, that flag might propagate to many of the files you just unarchived. If you unblock first, the unarchived files should be fine.
There's also a Powershell command for this, Unblock-File:
> Unblock-File *
Additionally, there are ways to write code that will remove the lock as well.
From the comments by @Defcon1: You can also combine Unblock-File
with Get-ChildItem
to create a pipeline that unblocks file recursively. Since Unblock-File
has no way to find files recursively by itself, you have to use Get-ChildItem
to do that part.
> Get-ChildItem -Path '<YOUR-SOLUTION-PATH>' -Recurse | Unblock-File
Solution 2:
- Open the file explorer. Navigate to project/solution directory
- Search for *.resx. --> You will get list of resx files
- Right click the resx file, open the properties and check the option 'Unblock'
- Repeat #3 for each resx file.
- Reload the project.