2

I have a portable app that isn't stealth. And by stealth, I mean:

"Stealth" means when an application is launched, used and terminated properly, it does not leave behind any entries in the registry or filesystem.

My app runs under .Net Framework 4.6.1 and leaves behind a log file under the folder:

%AppData%\Local\Microsoft\CLR_v4.0_32\UsageLogs\ [App Name].exe.log


Who is creating this log file?

Is there any way to avoid the creation (without breaking the app)?

What's the purpose of this log?

Nicke Manarin
  • 2,294
  • 1
  • 24
  • 59
  • Any information on what is in the log file? – Chris Watts Oct 30 '16 at 21:01
  • What is your final goal? Why do you want to avoid any log files and other similar stuff? – Dennis Oct 30 '16 at 21:22
  • Just build your application in release mode and it should not leave this log file then. – Evk Oct 30 '16 at 21:44
  • @ChrisWatts Contains a list of dependencies used by the executable. Something like: http://stackoverflow.com/questions/39959280/application-exe-not-running-properly-there-is-a-log-in-clr-v4-0-32-usagelogs-w – Nicke Manarin Oct 31 '16 at 00:07
  • @Dennis The goal here is understanding why this file created on release mode on other computers (not the developer's computer). Also how to avoid this file. I'm asking this because some users complained. – Nicke Manarin Oct 31 '16 at 00:10

1 Answers1

2

With Windows 8 (.NET 4.5), a new NGen mode: "Auto NGen" has been introduced. Basically, the .NET runtime generates usage logs for managed applications. Source

enter image description here

Every time the application run it creates a new type of logs called “Assembly Usage Logs” in the AppData windows directory. Source

On my research I found out mostly that it only does this job on Windows 8+.

But in this source it says also on Windows Server 2012, but I have tried it on a Windows Server 2012 R2 and could NOT reproduce it!

I did not find a way to disable this, one solution could be to target a lower .net Framework within our application.

Community
  • 1
  • 1
Patrick
  • 571
  • 2
  • 6
  • 19