问题
I have created a console app in which logging is done correctly using log4net. But after publishing my app (Click once app or .exe) logging is not working, even though my application is working fine.
Is there any way to make log4net work in my final click-once app?
回答1:
Found it myself..
The only thing we need to do is change the build action of Log4net from "NONE" to "Content".Then publish your application and you can find the log being cretaed while the app is running.
Thanks everyone for your response..
回答2:
You need specific permissions (FileIOPermission) to access files outside of isolated storage. See http://msdn.microsoft.com/en-us/library/d8saf4wy.aspx
来源:https://stackoverflow.com/questions/16414289/why-not-logging-is-done-after-converting-to-click-once-app-or-exe