Skip to content

Failed to write to log file ... because it is being used by another process #223

Closed
@KieranRosinger

Description

@KieranRosinger

I'm having an issue with building a project using DLLExport when using a Directory.Build.rsp file to set the msbuild /fl1 flag.

The error that occurs is

"C:\DLLExportIssue\Test\Test.sln" (default target) (1) ->
"C:\DLLExportIssue\Test\Test.csproj" (default target) (2) ->
(DllExportRestorePkg target) ->
  MSBUILD : Logger error MSB4104: Failed to write to log file "msbuild1.log". The process cannot access
 the file 'C:\DLLExportIssue\Test\msbuild1.log' because it is being used by another process. [C:\DLLExp
ortIssue\Test\Test.csproj]
  C:\DLLExportIssue\Test\Test.csproj(34,5): error MSB3073: The command ".\DllExport.bat  -action Restor
e" exited with code -1.

DLLExportIssue.zip

I have attached the solution and steps to reproduce. This is a new Hello World Console App .Net6.0 from Visual Studio 2022 with DLLExport installed onto the project.

The issue is only seen when a Directory.Build.rsp file is present in the solution folder that sets msbuild flag /fl1.

Please can you advise if there is a work around or how I can resolve the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions