Warnings on Cleaning a build if the bin folder does not exist
Posted: Wed Mar 31, 2021 3:41 am
If the bin folder does not exist, then performing a Clean results in warnings.
We're in the process of upgrading from Ranorex 8.3 to 9.4.1 and this behavior did not occur before the upgrade.
Repro Steps
1. Create a new blank solution
2. Open the project folder in explorer
3. Delete the bin folder
4. Clean Solution or Project
Result
I think the fix would be as simple as updating Ranorex.MSBuild.Targets to use a condition for running the CleanGeneratedFiles target.
We're in the process of upgrading from Ranorex 8.3 to 9.4.1 and this behavior did not occur before the upgrade.
Repro Steps
1. Create a new blank solution
2. Open the project folder in explorer
3. Delete the bin folder
4. Clean Solution or Project
Result
Code: Select all
Failed to clean generated shortcuts. Could not find a part of the path '.\Ranorex\RanorexStudio Projects\MyTest1\MyTest1\bin\Debug'.
Failed to clean report metadata files. Could not find a part of the path '.\Ranorex\RanorexStudio Projects\MyTest1\MyTest1\bin\Debug'.
Failed to clean integration metadata files. Could not find a part of the path '.\Ranorex\RanorexStudio Projects\MyTest1\MyTest1\bin\Debug'.
Code: Select all
<Target Name="CleanGeneratedFiles" AfterTargets="Clean" Condition="Exists($(OutDir))">
<CleanGeneratedFiles OutputDirectory="$(OutDir)"
Project="$(MSBuildProjectFullPath)"
Platform="$(Platform)"
IntermediateOutputPath="$(IntermediateOutputPath)"/>
</Target>