Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObfuscateDlls fails - System.IO.IOException: The process cannot access the file because it is being used by another process #48

Closed
sykesbPragmatics opened this issue Feb 6, 2023 · 3 comments

Comments

@sykesbPragmatics
Copy link
Contributor

I am running builds on a AWS based virtual machine and the build step constantly fails during the Xor step on random files. I originally thought that the Antivirus was causing it but the failures are still consistently happening with the Antivirus disabled.

I strongly suspect that the process is stepping on itself.

D:\BuildAgents\BuildTools\NugetCache\blazorwasmantivirusprotection\2.4.0\build\net6.0\BlazorWasmAntivirusProtection.targets(28,3): error MSB4018: The "ObfuscateDlls" task failed unexpectedly. [D:\BuildAgents\BuildServer\_work\1\s\Src\Project.Client\Project.Client.csproj]
D:\BuildAgents\BuildTools\NugetCache\blazorwasmantivirusprotection\2.4.0\build\net6.0\BlazorWasmAntivirusProtection.targets(28,3): error MSB4018: System.IO.IOException: The process cannot access the file 'D:\BuildAgents\BuildServer\_work\1\s\Src\Project.Client\obj\Release\net6.0\linked\CurrieTechnologies.Razor.Clipboard.dll' because it is being used by another process. [D:\BuildAgents\BuildServer\_work\1\s\Src\Project.Client\Project.Client.csproj]
D:\BuildAgents\BuildTools\NugetCache\blazorwasmantivirusprotection\2.4.0\build\net6.0\BlazorWasmAntivirusProtection.targets(28,3): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) [D:\BuildAgents\BuildServer\_work\1\s\Src\Project.Client\Project.Client.csproj]
D:\BuildAgents\BuildTools\NugetCache\blazorwasmantivirusprotection\2.4.0\build\net6.0\BlazorWasmAntivirusProtection.targets(28,3): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) [D:\BuildAgents\BuildServer\_work\1\s\Src\Project.Client\Project.Client.csproj]
D:\BuildAgents\BuildTools\NugetCache\blazorwasmantivirusprotection\2.4.0\build\net6.0\BlazorWasmAntivirusProtection.targets(28,3): error MSB4018:    at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) [D:\BuildAgents\BuildServer\_work\1\s\Src\Project.Client\Project.Client.csproj]
D:\BuildAgents\BuildTools\NugetCache\blazorwasmantivirusprotection\2.4.0\build\net6.0\BlazorWasmAntivirusProtection.targets(28,3): error MSB4018:    at System.IO.File.WriteAllBytes(String path, Byte[] bytes) [D:\BuildAgents\BuildServer\_work\1\s\Src\Project.Client\Project.Client.csproj]
D:\BuildAgents\BuildTools\NugetCache\blazorwasmantivirusprotection\2.4.0\build\net6.0\BlazorWasmAntivirusProtection.targets(28,3): error MSB4018:    at BlazorWasmAntivirusProtection.Tasks.ObfuscateDlls.Execute() [D:\BuildAgents\BuildServer\_work\1\s\Src\Project.Client\Project.Client.csproj]
D:\BuildAgents\BuildTools\NugetCache\blazorwasmantivirusprotection\2.4.0\build\net6.0\BlazorWasmAntivirusProtection.targets(28,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\BuildAgents\BuildServer\_work\1\s\Src\Project.Client\Project.Client.csproj]
D:\BuildAgents\BuildTools\NugetCache\blazorwasmantivirusprotection\2.4.0\build\net6.0\BlazorWasmAntivirusProtection.targets(28,3): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [D:\BuildAgents\BuildServer\_work\1\s\Src\Project.Client\Project.Client.csproj]
@sykesbPragmatics
Copy link
Contributor Author

#49 Added a Pull Request to resolve this issue. @stavroskasidis PLEASE accept soon as this is causing me major issues.

@stavroskasidis
Copy link
Owner

Fixed in 2.4.5 (pull request approved)

@sykesbPragmatics
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants