Unable to copy file when compiling an F# project

This is just going to be a really quick post on how to solve this problem I get occasionally and it fits in with what was made in the post on using MonoGame with F# interactive. When you try and compile an F# project, you may get a series of warnings telling you that the file copy operation timed out. Then after 10 of these warnings you get an error and a build failure. This error probably means that the library you are trying to use was referenced in the F# interactive window by using the #r directive.


To solve it you have to simply reset your interactive session by right clicking within the F# interactive window and selecting reset interactive session. Unfortunately there doesn’t appear to be a way of dynamically unloading any assemblies and so you will end up losing your current interactive session.



  1. >dynamically unloading any assemblies
    That’s just .net for you — once you’ve loaded the assembly into your AppDomain, it’s there for the duration. Even if Fsi could recycle AppDomains on cue, that would be at the cost of the current session context (everything you’ve #r’d so far).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s