Maxime66410
Maxime66410
CC#
Created by Maxime66410 on 8/25/2023 in #help
❔ [Resolved] How to delete the OBJ folder after a build
Hello it's been several days that when I try to build it gives me this error:
Fody: An unhandled exception occurred:
Exception:
Le processus ne peut pas accéder au fichier 'E:\Projet Unity\Curator\Curator\obj\x64\Debug\Curator.exe', car il est en cours d'utilisation par un autre processus.
Type:
System.IO.IOException
StackTrace:
à System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
à System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
à System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
à Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters) dans C:\Code\Fody\cecil\Mono.Cecil\ModuleDefinition.cs:ligne 1144
à InnerWeaver.WriteModule() dans C:\projects\fody\FodyIsolated\ModuleWriter.cs:ligne 18
à InnerWeaver.Execute() dans C:\projects\fody\FodyIsolated\InnerWeaver.cs:ligne 114
Source:
mscorlib
TargetSite:
Void WinIOError(Int32, System.String)
Fody: An unhandled exception occurred:
Exception:
Le processus ne peut pas accéder au fichier 'E:\Projet Unity\Curator\Curator\obj\x64\Debug\Curator.exe', car il est en cours d'utilisation par un autre processus.
Type:
System.IO.IOException
StackTrace:
à System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
à System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
à System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
à Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters) dans C:\Code\Fody\cecil\Mono.Cecil\ModuleDefinition.cs:ligne 1144
à InnerWeaver.WriteModule() dans C:\projects\fody\FodyIsolated\ModuleWriter.cs:ligne 18
à InnerWeaver.Execute() dans C:\projects\fody\FodyIsolated\InnerWeaver.cs:ligne 114
Source:
mscorlib
TargetSite:
Void WinIOError(Int32, System.String)
I found a solution for this problem, delete the contents of the OBJ folder with each build, so I went to find out how to do it, however I found several solutions for Rider or VS. Everyone says it works, that's how it should be done, whereas on my side it doesn't work. In file .csproj, between <Project></Project>
<Target Name="SpicNSpan" AfterTargets="Clean">
<!-- Remove obj folder -->
<RemoveDir Directories="$(BaseIntermediateOutputPath)" />
</Target>

<Target Name="SpicNSpan" AfterTargets="Clean">
<!-- Remove obj folder -->
<RemoveDir Directories="$(BaseIntermediateOutputPath)" />
</Target>

<Target Name="CleanObjFolder" AfterTargets="Build">
<Exec Command="rd /s /q $(OutDir)obj" />
</Target>

<Target Name="CleanObjFolder" AfterTargets="Build">
<Exec Command="rd /s /q $(OutDir)obj" />
</Target>

<Target Name="CleanObjFolder" AfterTargets="Builds">
<Exec Command="rd /s /q $(OutDir)obj" />
</Target>

<Target Name="CleanObjFolder" AfterTargets="Builds">
<Exec Command="rd /s /q $(OutDir)obj" />
</Target>

<Target Name="SpicNSpan" AfterTargets="Clean">
<RemoveDir Directories="$(ProjectDir)$(BaseIntermediateOutputPath)" /> <!-- obj -->
</Target>

<Target Name="SpicNSpan" AfterTargets="Clean">
<RemoveDir Directories="$(ProjectDir)$(BaseIntermediateOutputPath)" /> <!-- obj -->
</Target>

<Target Name="SpicNSpan"
AfterTargets="Clean">
<RemoveDir Directories="$(OUTDIR)"/>
</Target>

<Target Name="SpicNSpan"
AfterTargets="Clean">
<RemoveDir Directories="$(OUTDIR)"/>
</Target>

<Target Name="CleanAndDelete" AfterTargets="Clean">
<!-- Remove obj folder -->
<RemoveDir Directories="$(BaseIntermediateOutputPath)$(Configuration)" />
</Target>

<Target Name="CleanAndDelete" AfterTargets="Clean">
<!-- Remove obj folder -->
<RemoveDir Directories="$(BaseIntermediateOutputPath)$(Configuration)" />
</Target>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)' == 'Release'">
<!--remove obj-->
<Exec Command="rd /s /q &quot;$(BaseIntermediateOutputPath)Release&quot;" />
</Target>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)' == 'Release'">
<!--remove obj-->
<Exec Command="rd /s /q &quot;$(BaseIntermediateOutputPath)Release&quot;" />
</Target>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)' == 'Debug'">
<!--remove obj-->
<Exec Command="rd /s /q &quot;$(BaseIntermediateOutputPath)Debug&quot;" />
</Target>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)' == 'Debug'">
<!--remove obj-->
<Exec Command="rd /s /q &quot;$(BaseIntermediateOutputPath)Debug&quot;" />
</Target>

3 replies
CC#
Created by Maxime66410 on 6/27/2023 in #help
✅ [Resolved] [Unity] Procedural animation for a crab with Rigging animation & Inverse kinematic
I work on unity, I have to completely change my script which allows to do procedural animation in reverse kinematic, in fact to explain to you I have a crab with 8 legs, each with 4 pivot points, and I want to do so that when the crab moves the legs also, via procedural animation. I have already created a script to do all this, however sometimes the point remains in place, impossible to reset it, even with checks, whether in the calculation, out of the calculation, and even by forcing with Tasks etc.. So I would like to know if some here could help me fix this bug, or completely redo everything to start from a good base. Here is my full script.
11 replies