70

I am trying to install Visual Studito 2015 RC Community edition.

I downloaded the web installer and installed all components. After installation, I rebooted my machine as instructed, but it keeps giving me the same error when I try to make an application. Please see the screen below:

Screenshot showing the error "Project ... could not be opened because the Visual C# 2015 RC compiler could not be created.  Please re-install Visual Studio."

I have tried this answer and this answer from earlier versions of Visual Studio. It resets the settings but ultimately had the same error.

I have also tried removing C:\Users\Gogol\AppData\Local\Microsoft\VisualStudio folder, but again, no luck.

I also have devenv.exe added to the path. I can access devenv in command prompt.

Community
  • 1
  • 1
Gogol
  • 3,033
  • 4
  • 28
  • 57
  • I am having the same problem. Getting error: "Project 'xyz' could not be opened because the Visual Basic 2015 RC compiler could not be created" – brando Jul 10 '15 at 04:30
  • 7
    I had same problem in VS 2015 on Win8. I ran VS 2015 as administrator, it worked fine then. – Savaratkar Sep 07 '15 at 10:34
  • Me too. Same problem. Went away when running VS as administrator. Thanks to @Savaratkar for the comment. – BaBu Oct 26 '15 at 13:19
  • 2
    I had the same problem, even when running VS2015 as Administrator (which I always do with VS). It went away just after I closed VS2015 and reopened it What I also have noticed, it happens with every project I try to migrate from VS2012 to VS2015 - it fails to load for the first time, but loads ok after restarting VS. – Tomasz Przychodzki Mar 03 '16 at 16:40
  • I have tried this [answer](http://stackoverflow.com/a/773787/3581643). It worked for me. – Rahul Apr 25 '16 at 19:18
  • Some hints was discussed here https://social.msdn.microsoft.com/Forums/vstudio/en-US/146fbb05-ab92-4a31-a29e-ed85599e12b7/visual-c-2015-rc-compiler-could-not-be-created?forum=vssetup – Alsphere Mar 28 '16 at 06:30
  • I had to close Visual Studio 2015 before Windows would allow me to delete the Visual Studio folders, as mentioned in another answer, and still nothing changed. I had to edit the project file to set to False, to True, create a new IIS web site, and set the project URL to the web site I created. Then I had to restart Visual Studio as Administrator (explicitly, even though I normally have it run as Administrator). Only then did it stop complaining. What a mess. – Suncat2000 Jan 10 '18 at 15:58

14 Answers14

111

This method worked for me:

Delete contents of these 2 folders

C:\Users\%USERNAME%\AppData\Roaming\Microsoft\VisualStudio\
C:\Users\%USERNAME%\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

Then run the VS.NET as admin, otherwise it won't be able to renew the Roaming folder correctly.

VahidN
  • 18,457
  • 8
  • 73
  • 117
61

Run devenv.exe as administrator. It worked for me.

bernnabe
  • 726
  • 5
  • 4
  • After reading this post I have remembered that the last time when I used Visual Studio I was debugging something and I had to run it in administration mode. Obviously at that time it wrote something in a file that it could not access later. So, to start VS without privilege again it's necessary to locate and delete that file (or change its privilege). – Elvedin Hamzagic Dec 20 '16 at 16:16
11

After some research, I was able to install VS 2015 Community and use it. This happened in my case because I paused the installation and restarted it later on. I uninstalled VS 2015 from my computer, restarted my computer and re-ran the setup ( including downloads) and it worked. Answering my own question just in case anyone is still searching for solution.

Gogol
  • 3,033
  • 4
  • 28
  • 57
8

I too had this issue, generally it came from including a file in a git repo instead of using .gitignore

What I did is went to the project directory...

/.vs/config/applicationhost.config

And deleted the above file, it worked from that point on. I believe it is a conflict with UUID's or some such. (total guess)

  • 1
    that worked for me, I don't know what's the problem was, but deleting the .vs folder worked for me. – SeriousM Sep 29 '16 at 07:11
4

Found this solution for VS 2012, which worked for me for VS 2015.

solution from referred link below: note: change the path for VS 2015.

Solution

  1. Open exe, VS2012 x86 Native Tools Command Prompt (Run as administrator).

Path: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools

  1. Then run gacutil /u Microsoft.VisualStudio.CSharp.Services.Language.Interop

This will successfully uninstall the service from GAC, which was causing the problem.

Project could not be opened because the Visual C# 2012 compiler could not be created.

dotNet Decoder
  • 511
  • 5
  • 8
3

Visual Studio 2015 could not load my MVC5 project in my solution and shows the same error message to me, when I tried to use 'Reload Project' via the context menu. The reason for this was a duplicate entry in the applicationhost.config.

Depending on the project settings, one of the both following applicationhost.config will be used by Visual Studio 2015:

  • "[Path to solution].vs\config\applicationhost.config"
  • "C:\Users\[username]\Documents\IISExpress\config\applicationhost.config"

I opened the applicationhost.config and found two 'site' entries with the same name attribute:

<sites>
    <site name="WebSite" id="1" serverAutoStart="true">
    [...]
    </site> 
    <site name="WebSite" id="2" serverAutoStart="true">
    [...]
    </site>
</sites>

I removed one of the both 'site' blocks:

<sites>
    <site name="WebSite" id="1" serverAutoStart="true">
    [...]
    </site> 


</sites>

After that I was able to successfully reload the MVC5 project.

Simon
  • 4,157
  • 2
  • 46
  • 87
2

Started happening to me after i installed update 2 for Visual studio Community 2015. I tried absolutely everything

non of these worked .. was really frustrated for 2 days. Finally uninstalled Visual Studio completely and re-installed it and it worked.

Community
  • 1
  • 1
DP001
  • 371
  • 2
  • 7
  • Yupp i guess microsoft is missing sumthing with this installer. Previous solutions do not work anymore. Only reinstalling helps. – Gogol May 07 '16 at 19:13
2

I claim no credit, but this worked for me, taken from here - https://social.msdn.microsoft.com

Open Windows Explorer, and navigate to \Common7\IDE (by default is C:\Program Files \Microsoft Visual Studio 14.0\Common7\IDE);

  1. Delete the ItemTemplatesCache, ProjectTemplatesCache folder;

  2. Open Visual Studio Command Prompt under Start menu -> All Programs -> Microsoft Visual Studio 2015 -> Visual Studio Tools (run it with Administrator privilege: right-click the program -> Run as administrator);

  3. Run the devenv /InstallVSTemplates switch;

  4. Run the devenv /Setup switch

Bourbia Brahim
  • 14,459
  • 4
  • 39
  • 52
user520100
  • 111
  • 6
1

This also happens after installing Visual Studio 2015 update 3, solved by restarting the machine.

Yoav Feuerstein
  • 1,925
  • 2
  • 22
  • 53
0

Like most developers having this issue with VS2015 I tried everything and each rabbit hole messed up my development environment worst then the prior. After three days and just at a point where I was going to have to turn my development box into IT for a reinstall of the OS I tried something found ON THIS MESSAGE THREAD and my jaw dropped when it worked. All I did was stop using the Web install and used their ISO download - a fresh install (after countless uninstalls) and a repair using the ISO version worked as I am accustomed to.

This suggests to me that the VS team is not being forthright to their handling of what appears to be a bad installation process and are remaining silent while we spin our wheels losing days of work - not good....

[UPDATE] It resolved the compiler could not be created error but I am now fighting an issue with the NuGet package manager not being installed. I'm uninstalling Update 2 to see if I can't get Update 1 to work...

BillKrat
  • 291
  • 2
  • 6
0

In my case it was because the .csproj was configured to use local IIS. I had made some changes to IIS and the website was no longer there. There was a warning in the output window. Editing the .csproj file to point to a new site, or re-creating the site will fix the issue.

0

For me deleting the entire project directory, re-cloning the project from Git and restarting Visual Studio (Community 2015) worked. On opening the re-cloned project in VS, it asks "The project "" is configured to use IIS Web Server which is not installed on this computer. Would you like to convert the project to use IIS Express?"

On opting Yes, VS sets the web server for the project to IIS Express and the project loads and builds fine.

This ends up changing the .csproj file to UseIISExpress and sets the IISUrl, which probably fixed the "Project could not be opened" issue.

Hemant
  • 41
  • 1
  • 5
0

I had the same issue. Nothing from here helps me.

I run the installation of Visual Studio again and update it. The installation shows me that VC++ libs and IIS Express were absent. This was solved my issue.

RredCat
  • 5,259
  • 5
  • 60
  • 100
0

this error occur because you have different version or different extension ex(professional then you setup community at same time ) of visual studio in your pc.

The Solve the problem go to add and remove programs

1-type visual studio

2-uninstall any visual studio tool (ex Microsoft visual studio tools for application 2017)

3-if you didn't find uninstall check modify then uninstall the tool

4-reinstall visual studio again**

Mohamed Fathallah
  • 1,274
  • 1
  • 15
  • 17