PowerLessShell icon indicating copy to clipboard operation
PowerLessShell copied to clipboard

error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Windows\Microsoft.Net\Framework\v4.0.30319\Microsoft.Build.Tasks.v4.0.dll". Access to the path 'C:\Windows\TEMP\uxqs4ln2.tmp' is denied.

Open mtjbyddzqfwdyy opened this issue 1 year ago • 0 comments

MSBuild.exe在执行pyload时会在c:\windows\temp目录缓存文件。 当这个目录没有访问权限的时候,就会出现如下错误。我们如何才能自己指定一个目录来缓存临时文件?

我做了如下尝试,在代码里添加 <PropertyGroup> <BaseIntermediateOutputPath>C:\ProgramData</BaseIntermediateOutputPath> <TempDirectory>C:\ProgramData</TempDirectory> <MSBuildAssemblySearchPaths>C:\ProgramData;$(MSBuildAssemblySearchPaths)</MSBuildAssemblySearchPaths> </PropertyGroup> 来自定义临时目录位置,可是失败了。

请求帮助。

mtjbyddzqfwdyy avatar Nov 02 '23 12:11 mtjbyddzqfwdyy