[wix-devs] Intermediate File Path Conflicts

Ron Martin cpuwzd at comcast.net
Tue Jan 11 12:41:49 PST 2022


With respect to https://github.com/NuGet/Home/issues/4463, one situation 
I ran into was that multi-targeting makes the situation even worse than 
outlined in the cited nuget issue: It is not sufficient to guarantee 
that each project uses a different intermediate path: all target 
variants of the same project will use the same path for 
project.assets.json, and thus will overwrite each other. If allowed to 
build in parallel, file sharing locks will cause failures. With or 
without parallel building, there is still a possibility that pipelining 
might cause one target variant to use a project.assets.json file 
intended for another target variant..

I spent quite a bit of time investigating ways of creating unique paths 
for each target-specific build variant. I was not successful in changing 
the path of the obj directory created and used by nuget restore. Because 
this is where project.assets.json is placed, I was also unable to 
prevent the specific conflict on the project.assets.json file.

One of the suggested fixes in the cited nuget issue involves including 
the project name in the name of the json file. Since the name is the 
same in the multi-targeted case, this is not a sufficient approach.

I don't know all of the other uses made of the intermediate path, but 
all of them are ultimately subject to the general problem. Any sharing 
of intermediate paths between projects or msbuild targets (in the sense 
of sub-projects, rather than nuget target platforms) will likely break 
if a systematic fix for the underlying problem is implemented.

I have not commented on the cited nuget issue. I wanted to test out my 
observation in friendlier waters first. Perhaps I need to create a 
failing test case to illustrate my point. Let me know what you think.

Ron


More information about the wix-devs mailing list