在最新的Windows 10更新中是否更改了nlog文件权限? [英] Have nlog file permissions changed in the latest windows 10 update?
问题描述
我已经在WPF应用程序中使用NLog几个月了。我在Windows 10上的Visual Studio 2015中进行开发。
我使用NLog将我的应用程序写入 \ bin \Debug \ Logs
。突然间,我发现我没有权限删除此目录中的日志文件。这显然会在目录树中传播,所以我无法在资源管理器中删除 \bin
文件夹。
我以管理员身份运行Visual Studio。我改用这个来修复我很久以前遇到的问题(不记得具体问题是什么),但它从来没有阻止我在此之前删除NLog文件。
几天前我确实收到了Windows Update。有没有人知道是否有可能导致这种行为的变化?
我也很感激有关如何解决此问题的任何建议。
我尝试过:
甚至尝试在具有管理员权限的命令提示符下执行此操作访问被拒绝失败。
我也无法取得该文件的所有权。如果我尝试在资源管理器中执行此操作,我会收到一条消息,说您必须具有读取权限才能查看此对象的属性。
原来这样我刚刚开始使用的Gamut文件查看器( www.gamutsoftware.com )(应该是我的线索)。阅读文档,似乎它具有清除日志文件的功能,这可能意味着它会永久锁定文件。
我很惊讶我是甚至拒绝了读取权限。
我打算删除这个问题,但后来我认为它可能对其他选择使用这个相当常见的一套的人有价值。工具。
I have been using NLog in a WPF application for some months. I am developing in Visual Studio 2015 on Windows 10.
I write from my application using NLog into \bin\Debug\Logs
. Suddenly I find I do not have permission to delete log files in this directory. And this obviously propagates up the directory tree, so I cannot delete the \bin
folder in Explorer.
I do run Visual Studio as Administrator. I switched to doing this to fix a problem I had ages ago (can't remember what the specific issue was), but it has never stopped me deleting NLog files before now.
I did get a Windows Update a few days ago. Does anyone know if there has been a change that might be causing this behaviour?
I would also appreciate any suggestions about how to fix this.
What I have tried:
Even attempting to do this in a command prompt with Administrator permission fails with 'Access is denied'.
I cannot take ownership of the file either. If I try to do this in Explorer, I get a message saying, 'You must have Read permissions to view the properties of this object.'
This turned out to be the Gamut File Viewer (www.gamutsoftware.com), which I have just started using (that should have been my clue). Reading the docs, it seems it has the functionality to clear the log file, which probably means it keeps a permanent lock on the file.
I am surprised that I was even denied Read permission though.
I was going to delete this question, but then I thought it might have value to anyone else who chooses to use this fairly common set of tools.
这篇关于在最新的Windows 10更新中是否更改了nlog文件权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!