Question WPF App not launching until i clear my app folder in temp section.

kashgoyal

Member
Joined
Sep 14, 2021
Messages
6
Programming Experience
5-10
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?
 
I highly doubt that this is a WPF issue.

Does this happen with a brand new WPF project that is simply just the initial boilerplate? (It's not creating that temp folder for me when I try.)
 
Hi Skydriver,

Yes, i believe this is a generic issue for any windows desktop application.

Whenever I launch my desktop app it create a .net folder in C drive temp folder if it's not there already. After that it runs fine for some day but suddenly app stops launching and first i need to clear that .net folder and then only app launches again.

Any idea?
 
Post your code. As I said, I'm not seeing any folder being created in my case. You maybe dragging in some kind of dependency which is doing that folder creation and then gets stuck when the folder is not cleared later.
 
By any chance are you building a .NET Core app and publishing it as a single executable? If so, it looks like there is an closed issue about this. It was fixed in .NET Core 3.1.4 and .NET 5 and up.
 
Last edited:
Update to the latest .NET Core 3.1 ( 3.1.21 I believe) and that should fix your problem. .NET Core 3.0 ended support Mar 3, 2020.
 
Last edited:

Latest posts

Back
Top Bottom