2

I have tried solutions from the following posts/sites:

Error:

Could not load file or assembly 'file://\[networkdrive]\Programming\Misc Projects\CSVSerializer\UnitTestProject1\bin\Debug\UnitTestProject1.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

This error occurs when trying to discover tests on my solution on a mapped network drive, on multiple devices, this occurs in vs2015 and vs2017. If I copy the solution and directories to the device itself, it works fine.

What I've tried:

  • Unblocking file: The DLLs are not blocked
  • Readonly: Not marked as readonly
  • loadFromRemoteSources: Enabled on vs2015 & 2017 on all devices
  • Using UNC paths instead of a mapped drive

Why a network drive?

To keep my project files in a central, redundant, backed up location that I can access from multiple devices without having to pull from source control and rebuild each time. To save space on VMs for large projects and assemblies.

This seems as a supported, and even anticipated way to use a project considering there is a VS flag just for this https://learn.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element

Why is this happening? Is there more info for this error? what can I do to troubleshoot the problem?

Douglas Gaskell
  • 9,017
  • 9
  • 71
  • 128
  • Overall mapped drives are less supported than local drives. Instead of trying to troubleshoot and fix, please simply copy the files to your local drives and then work on them (or use UNC paths). – Lex Li Feb 25 '18 at 00:12
  • @LexLi Do you have documentation that explains that mapped drives are unsupported? I see many others on SO mentioning they use networked drives for their projects, and all the projects at my workplace are accessed via mapped drives. – Douglas Gaskell Feb 25 '18 at 00:15
  • If lots of people are mentioning they are using projects on a mapped drive on Stack Overflow, that means they are all having problems. Seriously, just don't do it, there is no benefit and lots of problems. – DavidG Feb 25 '18 at 00:17
  • Just tried UNC path instead of a mapped drive, same problem. @DavidG I'm referring to comments that show they are working on projects on networked drives. It seems odd that the solution to accessing files on a network drive is `don't` when many organizations operate in this fashion... Do you have an explanation, or a link to why? – Douglas Gaskell Feb 25 '18 at 00:20
  • No link, but when I've tried in the past to open a project on a share, it's always caused troubles. Not least of all is multiple people opening the same file. Can you tell me what possible benefit there is to doing it? – DavidG Feb 25 '18 at 00:21
  • Just read your update and your reason for wanting to use a network store. First, using it for backup is a horrible idea, that's what source control is for. I don't understand why you are reluctant to pull from source control on other devices though, I would give my engineers a hard time if they tried this. Anyway, I'm out - good luck finding a solution. – DavidG Feb 25 '18 at 00:38
  • @DavidG Gotcha, thanks for the reply. I am also trying to move my projects onto my NAS to save space on my VMs (All my projects are using ~30-40GB on each VM, which adds up quick on ssd-only storage..., and bloats backups by a ton). I use source control, but I keep the projects on drives so it's easy to pull from git and work on them without having to pull nuget dependencies. The organization is also easier to manage on a single location vs fragmented across a few devices... – Douglas Gaskell Feb 25 '18 at 00:41
  • If your repos are 40gb, you're doing something very peculiar like commiting content that should maybe be elsewhere (like videos, images etc) – DavidG Feb 25 '18 at 00:46
  • Oh, the repos are as you would expect, code-only. But the assemblies/dependencies for built projects add up (not just C#, but anything npm and other types of projects). I've accumulated quite a few projects. I just don't delete the project folders when done with them for the day, which may be the problem? – Douglas Gaskell Feb 25 '18 at 00:49
  • Sorry, I'm still confused. Even with npm and compiled code, that's not going to account for 40gb. What exactly are you keeping "daily" here? – DavidG Feb 25 '18 at 00:51
  • Dave, I keep all my projects, even ones from 5+ years ago, I only really delete ones that were tests. Between all my devices, it's quite a mess, and takes up more space than I'd like. My NAS has TBs of space, so dumping it all there was my idea, and I'd get to organize them all under a single folder structure to make it easy to find things. Maybe this is just the wrong way to go about it? – Douglas Gaskell Feb 25 '18 at 01:01
  • Firstly, it's David not Dave (I personal irritation of mine when people use the latter). Secondly, of course you should keep your old projects. But they should be inside different source control repositories. You only need to pull down the code you need to get the job done. – DavidG Feb 25 '18 at 01:09
  • You can read some Microsoft documents, like https://support.microsoft.com/en-us/help/257174/using-mapped-drives-with-iis . But of course, it would be difficult to tell what you exactly hit (as you described too little). – Lex Li Feb 25 '18 at 01:55
  • I just got thios on Windows 10, setting my exe to run as administrator worked for me. – schh Aug 16 '18 at 13:52

0 Answers0