The code:
using (var codeProvider = new CSharpCodeProvider())
{
var compilerParameter = new CompilerParameters(
_assemblies, assemblyName, false)
{
GenerateInMemory = true,
CompilerOptions = "/optimize"
};
var compilerResults = codeProvider.CompileAssemblyFromDom(
compilerParameter, templateResults.Select(r => r.GeneratedCode)
.ToArray());
}
It throws exception: CS1567 Error generating Win32 resource: Access is denied.
What does it mean?