Similarly to this question, but rather than creating a file if it doesn't exist - I want to create a folder, if it doesn't exist.
Similarly to this question, but rather than creating a file if it doesn't exist - I want to create a folder, if it doesn't exist.
MSBuild create folder if folder does not exists
To create a folder if folder does not exists, you can use the below xml code:
<Target Name="MakeMyDir" AfterTargets="PrepareForBuild">
<MakeDir Directories="$(ProjectDir)Newfolder" Condition="!Exists('$(ProjectDir)Newfolder')" />
</Target>
Newfolder is the name of your created folder.