From 9d282037edd45d13cef06f4fe06cd7551873140a Mon Sep 17 00:00:00 2001 From: Brimerland <609797+Brimerland@users.noreply.github.com> Date: Tue, 12 Dec 2023 13:40:18 +0100 Subject: [PATCH] fix: Changed WorkingDirectory to $(OutDir) as default and $(OutputPath) as fallback (#223) * Changed the WorkingDirectory parameter of the exec call to dscom to use $(OutDir) as default and $(OutputPath) as fallback. $(OutputPath) might not work on large complex solutions. See https://github.com/dotnet/msbuild/blob/f914c9bfb613d32edb658b803c7fe046f9ee3c37/src/Tasks/Microsoft.Common.CurrentVersion.targets#L107-L122 'OutDir and OutputPath are distinguished for legacy reasons, and OutDir should be used if at all possible.' * Quotation marks added for calling the dscom tool on paths containing spaces --- ...SPACE.Runtime.InteropServices.BuildTasks.Tools.targets | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dscom.build/dSPACE.Runtime.InteropServices.BuildTasks.Tools.targets b/src/dscom.build/dSPACE.Runtime.InteropServices.BuildTasks.Tools.targets index 0d4a199..407ebd9 100644 --- a/src/dscom.build/dSPACE.Runtime.InteropServices.BuildTasks.Tools.targets +++ b/src/dscom.build/dSPACE.Runtime.InteropServices.BuildTasks.Tools.targets @@ -52,21 +52,23 @@ <_DsComArguments> $(_DsComArguments) $(_DsComAssemblyReferences) <_DsComArguments> $(_DsComArguments) $(_DsComTypeLibraryReferences) <_DsComArguments> $(_DsComArguments) $(_DsComTypeLibraryReferencePaths) - <_DsComArguments> $(_DsComArguments) $(_DsComExportTypeLibraryAssemblyFile) + <_DsComArguments> $(_DsComArguments) "$(_DsComExportTypeLibraryAssemblyFile)" <_DsComArguments> $(_DsComArguments) $(_DsComAliasNames) <_DsComArguments Condition="'$(DsComOverideLibraryName)' != ''"> $(_DsComArguments) --overridename "$(DsComOverideLibraryName)" <_DsComArguments> $(_DsComArguments) --out "$(_DsComExportTypeLibraryTargetFile)" + <_DsComWorkingDir>$(OutDir) + <_DsComWorkingDir Condition="$(_DsComWorkingDir) == ''">$(OutputPath) - + WorkingDirectory="$(_DsComWorkingDir)" />