because it is being used by another process "BUG" #735

Closed
opened 2026-01-29 16:47:16 +00:00 by claunia · 2 comments
Owner

Originally created by @lzb949838390 on GitHub (Dec 17, 2021).

  • Version: node -v 14.17.6 ; ElectronNET.CLI Version: 13.5.1.0 ; ElectronNET.API Version:13.5.1 ;
    Microsoft Visual Studio Community 2019 Version16.11.7
  • Target:

Steps to Reproduce:

  1. run 'electronize start' or 'electronize build /target win'
  2. Error:
  3. C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: Unerwarteter Fehler bei der GenerateBundle-Aufgabe. [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj]
    C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: System.IO.IOException: The process cannot access the file 'C:\dev\HelloElectron\HelloElectron\obj\Host\bin\HelloElectron.exe' because it is being used by another process. [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj]
    C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj]
    C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj]
    C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at Microsoft.NET.HostModel.AppHost.BinaryUtils.CopyFile(String sourcePath, String destinationPath) [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj]
    C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at Microsoft.NET.HostModel.Bundle.Bundler.GenerateBundle(IReadOnlyList`1 fileSpecs) [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj]
    C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at Microsoft.NET.Build.Tasks.GenerateBundle.ExecuteCore() [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj]
    C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute() [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj]
    C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj]
    C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj]
Originally created by @lzb949838390 on GitHub (Dec 17, 2021). <!-- Please search existing issues to avoid creating duplicates. --> <!-- Which version of Electron.NET CLI and API are you using? --> <!-- Please always try to use latest version before report. --> * **Version**: node -v 14.17.6 ; ElectronNET.CLI Version: 13.5.1.0 ; ElectronNET.API Version:13.5.1 ; Microsoft Visual Studio Community 2019 Version16.11.7 <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> <!-- What target are you building for? --> * **Target**: <!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) --> Steps to Reproduce: 1. run 'electronize start' or 'electronize build /target win' 2. Error: 3. C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: Unerwarteter Fehler bei der GenerateBundle-Aufgabe. [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj] C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: System.IO.IOException: The process cannot access the file 'C:\dev\HelloElectron\HelloElectron\obj\Host\bin\HelloElectron.exe' because it is being used by another process. [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj] C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj] C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj] C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at Microsoft.NET.HostModel.AppHost.BinaryUtils.CopyFile(String sourcePath, String destinationPath) [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj] C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at Microsoft.NET.HostModel.Bundle.Bundler.GenerateBundle(IReadOnlyList`1 fileSpecs) [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj] C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at Microsoft.NET.Build.Tasks.GenerateBundle.ExecuteCore() [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj] C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute() [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj] C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj] C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(1017,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\dev\HelloElectron\HelloElectron\HelloElectron.csproj]
claunia added the bug label 2026-01-29 16:47:16 +00:00
Author
Owner

@danatcofo commented on GitHub (Dec 17, 2021):

your issue is in the stack trace

The process cannot access the file 'C:\dev\HelloElectron\HelloElectron\obj\Host\bin\HelloElectron.exe' because it is being used by another process.

figure out whats accessing that file and kill it. This is not a problem with Electron.NET

@danatcofo commented on GitHub (Dec 17, 2021): your issue is in the stack trace `The process cannot access the file 'C:\dev\HelloElectron\HelloElectron\obj\Host\bin\HelloElectron.exe' because it is being used by another process.` figure out whats accessing that file and kill it. This is not a problem with Electron.NET
Author
Owner

@lzb949838390 commented on GitHub (Dec 18, 2021):

您的问题出在堆栈跟踪中

The process cannot access the file 'C:\dev\HelloElectron\HelloElectron\obj\Host\bin\HelloElectron.exe' because it is being used by another process.

找出访问该文件的内容并杀死它。这不是 Electron.NET
I tried to execute the command many times and found that it was OK

@lzb949838390 commented on GitHub (Dec 18, 2021): > 您的问题出在堆栈跟踪中 > > `The process cannot access the file 'C:\dev\HelloElectron\HelloElectron\obj\Host\bin\HelloElectron.exe' because it is being used by another process.` > > 找出访问该文件的内容并杀死它。这不是 Electron.NET I tried to execute the command many times and found that it was OK
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#735