You probably need to check if the folder exists before you create it.
if(!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
Would need to see code to give a better answer
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I am working on a WPF windows application. Whenever I launch this App for the first time in my system it creates a folder insider temp of windows viz. temp/.net/{ProjectName}.
Sometimes the App doesn't launch until I clear this folder i.e. temp/.net/{ProjectName} so I have to first go and clear the temp folder and then my windows app gets launched.
Is there any permanent solution for this?
You probably need to check if the folder exists before you create it.
if(!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
Would need to see code to give a better answer