Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shared folder on VirtualBox not opening with Visual Studio 2015 (Website project)

I created a windows 10 virtual box vm with Visual studio 2015 enterprise installed.

I tried to open an existing Visual Studio Website project solution in C:\sharedfolder\projectdirectory (With symbolic link) or \\VBOXSVR\myapp via virtualbox shared folder functionality, but it fails to open saying

"Creation of the virtual directory http://localhost:1849/ failed with the error: Filename: \?\UNC\VBOXSVR\myapp.vs\config\applicationhost.config Error: Cannot read configuration file"

If I copy the folder to C:\Code it opens without any issues?

Any idea how I can solve this problem? I need it in the shared folder because I am using MAC OS to do javascript dev stuff, so its good to share that folder.

like image 971
Joshscorp Avatar asked Oct 18 '22 16:10

Joshscorp


2 Answers

I tried this same solution and get the same result, I did some research and found this link that says that the shared folder shoud not be used as this

https://forums.virtualbox.org/viewtopic.php?f=2&t=62120

Text from the link:

GA Shared Folders are NOT a full implementation of file share, so things will break. It is only a mean to easily access files from host to guest, no use it as a workspace location for dev programs. Use a real network share instead.

like image 188
Luiz Bicalho Avatar answered Oct 27 '22 22:10

Luiz Bicalho


This issue also occurs with VMWare Virtual Machine drive mappings.

I received this error when opening a working ASP project from a VMware virtual share:

Creation of the virtual directory failed with the error: Filename/... Error: Cannot read configuration file

Other suggestions which did not help:

  • Resetting the read-only permissions on the “C:\Users\\Documents\IISExpress\config\applicationhost.config” file or on the “:\”
  • Removal and re-installation of the entire Visual Studio suite, IISExpress, or “Microsoft ASP.NET Web Frameworks and Tools 2015”

All other, non-virtually mapped ASP projects, loaded correctly.

The core of the problem is that the virtual mapped drive causes incorrect references in the path of Visual Studio.

In my case the virtual drive was "Z" - “\?\Z:\Misc\"\applicationhost.config.

Solution: Move the project out of any virtual drive and into a local drive. If you are using Team Services, remap the project to that local directory.

like image 24
Binary1 Avatar answered Oct 27 '22 23:10

Binary1