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

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

Open
KieranRosinger opened this issue May 5, 2023 · 2 comments

Comments

@KieranRosinger
Copy link

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?

@3F
Copy link
Owner

3F commented May 5, 2023 via email

@KieranRosinger
Copy link
Author

Thanks, I have added a step to the build process outside of the MSBuild system that calls "DllExport -action Restore" before calling MSBuild to compile. This work around is sufficeint in our workflow.

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