Comments (40)
yes this is a major annoyance
from fsharp.
👍
from fsharp.
any ideas where we need to look?
from fsharp.
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?
from fsharp.
I'd love to see this fixed, I've seen it somewhat randomly when compiling quite a range of projects with Visual F#.
from fsharp.
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 :/
fsprojects/FSharp.Data@8734a17
from fsharp.
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?
from fsharp.
This problem has existed at least since VS2012, and I never saw it in C#
from fsharp.
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.
from fsharp.
@dungpa If I understand that fix correctly, it fixes for for building in VS only:
When a build starts, ask intellisense to stop locking xml doc. After build is finished, tell intellisense that its ok to lock this file again. This means building from command line will never work properly. How can we tell intellisense to never lock this file?
from fsharp.
How can we tell intellisense to never lock this file?
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?
from fsharp.
Ok, just investigated a bit. This repros for C#, as well, at least as far back as VS 2013.
Steps:
- Create C# library project, add some XML doc comments, make sure project setting to generate doc file is enabled
- Build, then close VS
- Create new VS C# project, reference built binary from earlier.
- Use editor to view XML doc comments via intellisense
- Try re-building original project on command line via MSBuild
- This fails due to XML doc file locked
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.
from fsharp.
@latkin Please do file a bug and report any progress back here. :)
from fsharp.
@latkin any news about from the platform team?
from fsharp.
+1
from fsharp.
👍
from fsharp.
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.
from fsharp.
I tried VS 2008, 2010, 2012, and this repros in all of them 😢
from fsharp.
I hit this problem yesterday (I had to restart VS to update some nuget packages due to XML file locking)
from fsharp.
FYI, @KevinRansom is poking the VS platform people about this, hopefully more updates next week
from fsharp.
The team that owns this code has been identified and a bug raised. We will keep you posted as to progress.
Just to set expectations you should recognize that this behavior has been substantially the same since Whidbey without this bug getting a lot of attention and so they may not be inclined to change it at this time.
from fsharp.
Thanks for opening the issue. Is this a private Microsoft issue tracker or can we see progress/discussion?
from fsharp.
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)
from fsharp.
@forki it's in a private bug database
from fsharp.
We'll keep y'all in the loop as my southern wife would say.
from fsharp.
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.
from fsharp.
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.
from fsharp.
ping
from fsharp.
ping++
from fsharp.
pong++
from fsharp.
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).
from fsharp.
Lol with the pings. This was fixed in the VS platform, and will be part of VS 2015 Update 1.
Kevin
from fsharp.
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. 😃
from fsharp.
Lovely!
from fsharp.
👍
from fsharp.
\o/ What a day, what a lovely day!
from fsharp.
Wow. That's great to hear. Thanks so much.
On Oct 17, 2015 6:01 AM, "Rodrigo Vidal" [email protected] wrote:
\o/ What a day, what a lovely day!
—
Reply to this email directly or view it on GitHub
#57 (comment)
.
from fsharp.
@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?
from fsharp.
Is the CTP containing this fix publicly available? If not, is there an ETA?
from fsharp.
@hmemcpy http://blogs.msdn.com/b/visualstudio/archive/2015/10/08/visual-studio-2015-update-1-ctp.aspx 😄
from fsharp.
Related Issues (20)
- Using `delegate` keyword breaks semantic highlighting HOT 1
- Inconsistent analysis for top-level module in F# script HOT 1
- Inconsistent treatment of `<-` with tuples
- Potential relaxation of indentation requirements for type extensions HOT 3
- [Automated] PRs inserted in VS build main-34805.21
- Go to definition and Find References not working for C# extension method `AsMemory()` in this repo
- Warning FS3560 triggered upon nested update even if other fields of nested record are copied HOT 5
- The code fix alignment problem
- Code gen of record updates when all fields are updated HOT 16
- The F# Build should cache the generated lexer/parser instead of recreating them all of the time HOT 1
- [Automated] PRs inserted in VS build main-34809.16
- [Automated] PRs inserted in VS build feature.dotnetVS-34808.241
- realsig+ on fsharp editor dlls demonstrates some MEF Export visibility issues. HOT 1
- Compiler error with iteration and units of measure in F# 17.10 preview with LangVersion Preview HOT 4
- Tooltip in IDE suggests wrong type of parameter or even multiple types HOT 2
- The term 'fsi' is not recognized as the name of a cmdlet, function, script file, or operable program HOT 2
- Static abstract method on class or abstract class yields internal error HOT 2
- Units of measure can affect compiled form of integral ranges HOT 2
- [Automated] PRs inserted in VS build feature.debugger.main-34815.163
- FSharp.Core. summary XML documentation for pairwise (List, Array, and Seq) is misleading
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.