Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error loading Visual Studio 2012 and 2015 projects

I have been with VS2012 for a few years now. I developed my first asp.net/angularjs project under VS2012. Secondly, I recently checked out a VS2013 project (written by a 3rd party) which ran just fine under 2012.

Then it was suggested that I install VS2015 on my laptop. This is when things went wrong.

Problems: I attempted to load the new VS2013 project in VS2015, but it immediately failed to load.

VS2015 error:

Creation of the virtual directory http://localhost:32999/ 
failed with the error: Filename: redirection.config
Error: Cannot read configuration file

Now when I go back to VS2012 and load my original asp.net/angular project, I get this error:

Error loading vs2012 project

So in the end, I can't load any projects at all ! Neither 2012 nor 2015.

My local IIS websites are still running fine, by the way, but not the local dev environments.

How can I fix these virtual directories ?

Thanks in advance, Bob

like image 801
bob.mazzo Avatar asked Jan 29 '16 15:01

bob.mazzo


People also ask

How do I fix Visual Studio installer has stopped working?

Please remove the folder: C:\Program Files (x86)\Microsoft Visual Studio\Installer. Then, re-download the bootstrapper file from the following Microsoft Site and run it as administrator. If the answer is helpful, please click "Accept Answer" and upvote it.

How do I run a .SLN file in Visual Studio code?

You can open any solution, project, folder or file in Visual Studio Code by simply right-clicking it in Solution Explorer and select Open in Visual Studio Code.

How do I load an unloaded project in Visual Studio?

Open Project dialog Choose Open. The solution opens with all of its projects unloaded. In Solution Explorer, select the projects you want to load (press Ctrl while clicking to select more than one project), and then right-click on the project and choose Reload Project.

Why is my project file not loading in Visual Studio?

error : The project file could not be loaded. Could not find a part of the path... Another way you can encounter this error is if you renamed your project folder and sometimes you can get this error without moving or renaming anything at all. In this article, you will be shown how to solve this problem for all those cases.

How do I fix a Visual Studio error in Visual Studio 2019?

One way to fix this error is to correct the path of the problematic projects yourself by directly editing the .sln file. For those who feel uncomfortable editing the solution file, there is another way. You can fix the path of the project directly from Visual Studio and this procedure is shown next.

How to reload unavailable project in Visual Studio Code?

Locate project file (.csproj) and click Open. In the Solution Explorer, the project will still have (unavailable) message besides it. We still need to carry out one more step. Right-click on the project to open context menu. Select Reload Project as shown below: Reloading the unloaded project in the solution explorer. Build solution.

Why can't I install Visual Studio 2013?

Visual Studio can't be installed, and you receive an error message that contains one of the following errors: 0x80200010, 0x80072efe, or 0x80072ee7 - connectivity issue during download Multiple feature installation errors occur after warning about certificate updates is ignored in Visual Studio 2013 and 2015


4 Answers

As per some guidance from this post - IISExpress 8 Cannot read configuration file redirection.config, here's how I got my VS2015 to load up successfully:

  • Close VS2015
  • Go into folder %userprofile%\Documents\IISExpress\config
  • Rename applicationhost.config
  • Restart VS and load the solution/project
  • VS should have recreated applicationhost.config, and project should load

Of course, I now have a different error, which I will post anew:

[BadImageFormatException: Could not load file or assembly 'MyWebApp.DAL' 
or one of its dependencies. An attempt was made 
to load a program with an incorrect format.]
like image 68
bob.mazzo Avatar answered Oct 17 '22 23:10

bob.mazzo


I resolved the same problem by starting visual studio with Administrator rights. This post pointed me in the right direction and gives more solutions.

like image 29
Tom Avatar answered Oct 17 '22 22:10

Tom


This may be due to checked-in applicationhost file. Delete the file from the repository. Build the project again. This file will be created automatically. Don't check in this config file again.

like image 43
Neha K Avatar answered Oct 17 '22 21:10

Neha K


This won't work for everyone, but in my case, the file that couldn't be written was actually a temp file in C:\users\\AppData\Local\Temp\iisexpress. We were getting a company wide virus attack and they shut this area down for everyone. They were able to change the policy just for me and that fixed it.

like image 34
John-Lausten Avatar answered Oct 17 '22 21:10

John-Lausten