-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visual Studio locking access to xml doc files #57
Comments
yes this is a major annoyance |
👍 |
any ideas where we need to look? |
I have noticed this also happens occasionally when project files change externally and VS reloads them, unrelated to FAKE. I had suspected F# Power Tools, maybe there is something in common? |
I'd love to see this fixed, I've seen it somewhat randomly when compiling quite a range of projects with Visual F#. |
I've also seen this. On F# Data I went to some trouble to try to not lock the .dll files, but then the .xml file is still locked :/ |
Curious - does this seem to affect only F#, or has anyone experienced it with C#, too? Would also be good to know if this is a long-standing problem, or has this been the case for multiple VS releases? |
This problem has existed at least since VS2012, and I never saw it in C# |
According to this answer http://stackoverflow.com/questions/6515795/why-is-my-xml-doc-file-always-getting-locked, this code fragment supposes to fix the bug https://github.com/Microsoft/visualfsharp/blob/fac44095a8dbc7303efa9866e0e2d9dddbdeae5d/vsintegration/src/vs/FsPkgs/FSharp.Project/Common.Source.CSharp/Project/ProjectConfig.cs#L1877-L1896. I'm not sure there is any regression here. Is there any historical note elsewhere about this bug? For now, this answer seems like a reasonable workaround http://stackoverflow.com/a/3969978. |
@dungpa If I understand that fix correctly, it fixes for for building in VS only: |
No idea. I don't understand why it needs to lock xml files in the first place. @vladima @KevinRansom @latkin Any pointer to investigate this further? |
Ok, just investigated a bit. This repros for C#, as well, at least as far back as VS 2013. Steps:
So at least F# is not doing anything worse than C# here. That's not to say this couldn't in theory be fixed (for all languages). Seems that project systems don't actually touch the XML doc files themselves, they rely on VS platform to handle this (lots of complexities around path to localized XML files, etc). Code here is using IVsXMLMemberIndexService. So the bug (and the fix) is somewhere in the VS platform/SDK, not in the F# codebase. Maybe I will log a bug on the platform team to look at this. |
@latkin Please do file a bug and report any progress back here. :) |
@latkin any news about from the platform team? |
+1 |
1 similar comment
👍 |
I've found an old internal bug tracking thing. It ended up getting closed, I think just because it was close to a deadline and nobody had a chance to follow up. I can bring that bug back to life, but first I'd like to know when the issue was introduced. If would help if someone could give positive confirmation whether this repros in VS 2012 and VS 2010, if you have those installed. My steps here #57 (comment) should be valid to repro. |
I tried VS 2008, 2010, 2012, and this repros in all of them 😢 |
I hit this problem yesterday (I had to restart VS to update some nuget packages due to XML file locking) |
FYI, @KevinRansom is poking the VS platform people about this, hopefully more updates next week |
The team that owns this code has been identified and a bug raised. We will keep you posted as to progress. |
Thanks for opening the issue. Is this a private Microsoft issue tracker or can we see progress/discussion? |
Regarding activity: maybe it wasn't a big issue at the time when the bug got introduced, but since NuGet is used everywhere people see this issue all the time (at least that's what my twitter stream is suggesting for a couple of years) |
@forki it's in a private bug database |
We'll keep y'all in the loop as my southern wife would say. |
This got discussed a bit with platform people over the past few weeks. It's almost surely not going to be fixed for VS 2015 RTM, but it's on their radar perhaps for an early VS update after that. No guarantees , though. Just wanted to let you know this hasn't totally disappeared into a black hole. |
Ping. Any news on this? It's still no. 1 annoyance for me. Working with cmd line tools like FAKE or git and having solution open is not possible. |
ping |
ping++ |
pong++ |
ping - was just blocked once more where VisualStudio failed to compile an F# project because it was locking the xml file itself (sic) (no FSI or external tools involved). |
Lol with the pings. This was fixed in the VS platform, and will be part of VS 2015 Update 1. Kevin |
I just tried the CTP, and can confirm that the problem has gone away. This has easily saved me 20 minutes of work every day. 😃 |
Lovely! |
👍 |
\o/ What a day, what a lovely day! |
Wow. That's great to hear. Thanks so much.
|
@KevinRansom could you please ask if this was also resolved for dll file locking? Can we switch branches from cmd line when VS is open? |
Is the CTP containing this fix publicly available? If not, is there an ETA? |
This is a common annoyance when using Visual Studio together with FAKE. Running a FAKE build while the solution is open in Visual Studio invariably results in the following error:
FSC : error FS0193: Access to the path 'path_to_bin_folder\project.XML' is denied. ['path_to_project\project.fsproj']
The error persists even if the solution is closed from within Visual Studio. The IDE needs to be restarted in order for the problem to go away.
The text was updated successfully, but these errors were encountered: