Solution for Xaml Internal Error error WMC9999: Access denied

If you have this exception “Xaml Internal Error error WMC9999: Access denied” while compiling a WinRT or UWP project with Visual Studio, the solution is :

  • Close Visual Studio
  • Delete or rename the “packages” nuget cache directory of the project
  • Restart Visual Studio
  • Compile

You can check with “process monitor” on msbuild.exe to know which DLL have an Access Denied (in my case, it was BCL task library but I guess it could be anything else) if it’s not Nuget, maybe an other referenced DLL have an access denied !

This entry was posted in UWP, Visual Studio, WinRT. Bookmark the permalink.