You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have below structure in repository. When we are compiling individual folder solutions separately everything works correctly. We have also combined solution which contains all projects from all folders. If we will compile that solution everything works correctly. However, if we will compile combined solution first (compile correctly), and then we will compile just project2 (some code changes), msbuild will delete files which are part of the project1 from output directory even if project1 was not compiled at all. It seems that project2 FileListAbsolute.txt in obj compilation folder contain list of files from Project1 (probably generated when combined solution was compiled ?). As files which are not part of compiled solution are deleted from target location application will not start anymore. We have to go back and recompile Folder1 solution again. This is affecting productivity a lot and if people are not aware about this, they even spend lot of time investigating why those files are disappearing.
Please see attached binary log from compilation. Im not able to attach projects\solutions for reproducibility as those are protected IP.
Adding binary log for combined solution compilation which will lead to situation where Project2 FileListAbsolute.txt contains files which are not part of the project itself.
Issue Description
We have below structure in repository. When we are compiling individual folder solutions separately everything works correctly. We have also combined solution which contains all projects from all folders. If we will compile that solution everything works correctly. However, if we will compile combined solution first (compile correctly), and then we will compile just project2 (some code changes), msbuild will delete files which are part of the project1 from output directory even if project1 was not compiled at all. It seems that project2 FileListAbsolute.txt in obj compilation folder contain list of files from Project1 (probably generated when combined solution was compiled ?). As files which are not part of compiled solution are deleted from target location application will not start anymore. We have to go back and recompile Folder1 solution again. This is affecting productivity a lot and if people are not aware about this, they even spend lot of time investigating why those files are disappearing.
Please see attached binary log from compilation. Im not able to attach projects\solutions for reproducibility as those are protected IP.
msbuild.DeletingWrongFiles.zip
MI.Biz.Plugin.Registration.csproj.FileListAbsolute.txt
Folder1
Folder2
CombinedSolution (Folder1\Folder2)
Steps to Reproduce
Compile combined solution first. Compile individual projects afterwards.
Expected Behavior
Files which are not related\owned by compiled project\solution should not be deleted from compilation output directory.
Actual Behavior
Files which are not part of compiled project\solution are deleted from compilation output directory.
Analysis
No response
Versions & Configurations
MSBuild version 17.12.12+1cce77968 for .NET Framework
17.12.12.57101
The text was updated successfully, but these errors were encountered: