focus-creative-games / hybridclr

HybridCLR是一个特性完整、零成本、高性能、低内存的Unity全平台原生c#热更新解决方案。 HybridCLR is a fully featured, zero-cost, high-performance, low-memory solution for Unity's all-platform native c# hotupdate.
https://code-philosophy.com/
MIT License
6.51k stars 656 forks source link

打包时报System.UnauthorizedAccessException错误 #8

Closed ldcf4 closed 2 years ago

ldcf4 commented 2 years ago

在使用jenkins+SVN工具打包时,会报Exception: System.UnauthorizedAccessException错误。应该是svn工具会给每个文件夹下增加.svn文件,但是打包时会试图删除整个文件夹。这时会遇到.svn文件夹下的文件无法删除的错误。我不确定这是不是bybridclr的错误,但是我觉得有必要关注下这个问题。

Exception: System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\Jenkins\.jenkins\workspace\build_1.2.4_windows_debug\Library\Il2cppBuildCache\Windows\x64\Native\Data\etc\.svn\entries' is denied.
   at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
   at NiceIO.NPath.CopyWithDeterminedDestination(NPath absoluteDestination, Func`2 fileFilter)
   at NiceIO.NPath.CopyWithDeterminedDestination(NPath absoluteDestination, Func`2 fileFilter)
   at NiceIO.NPath.CopyWithDeterminedDestination(NPath absoluteDestination, Func`2 fileFilter)
   at NiceIO.NPath.CopyWithDeterminedDestination(NPath absoluteDestination, Func`2 fileFilter)
   at Unity.IL2CPP.Building.BuildDescriptions.IL2CPPOutputBuildDescription.FinalizeBuild(CppToolChain toolChain)
   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
   at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection`1 matchedAssemblyMethodSourceFiles)
   at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, BuildingOptions buildingOptions, Boolean throwExceptions)
  at UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) [0x00154] in <ae2b3fa0806947cd9e0033e4ac1637da>:0 
  at UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) [0x00060] in <ae2b3fa0806947cd9e0033e4ac1637da>:0 
  at UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) [0x00116] in <ae2b3fa0806947cd9e0033e4ac1637da>:0 
  at UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) [0x003c1] in <ae2b3fa0806947cd9e0033e4ac1637da>:0 
  at UnityEditorInternal.IL2CPPBuilder.Run () [0x000f4] in <ae2b3fa0806947cd9e0033e4ac1637da>:0 
  at UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) [0x0001c] in <ae2b3fa0806947cd9e0033e4ac1637da>:0 
  at DesktopStandalonePostProcessor.RunIL2CPP (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditorInternal.IIl2CppPlatformProvider il2cppPlatformProvider, System.Collections.Generic.List`1[T] cppPlugins) [0x0001c] in <ae2b3fa0806947cd9e0033e4ac1637da>:0 
  at DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) [0x000a4] in <ae2b3fa0806947cd9e0033e4ac1637da>:0 
  at DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x00015] in <ae2b3fa0806947cd9e0033e4ac1637da>:0 
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
  at DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) [0x00070] in <ae2b3fa0806947cd9e0033e4ac1637da>:0 
  at UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) [0x00001] in <ae2b3fa0806947cd9e0033e4ac1637da>:0 
  at UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) [0x000dc] in <ae2b3fa0806947cd9e0033e4ac1637da>:0 
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, String[], Boolean)
UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, String[])
UnityEditor.BuildPipeline:BuildPlayer(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, String[])
UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
UnityEditor.BuildPipeline:BuildPlayer(EditorBuildSettingsScene[], String, BuildTarget, BuildOptions)
pirunxi commented 2 years ago

打包时不会删除那个目录,生成桥接函数时会。 堆栈中也没有HybridCLR相关函数。建议先定位原因,如果跟HybridCLR有关,再找我们解决。