“C# 2017 compiler could not be created” error mess

2019-02-13 03:17发布

I've Visual Studio 2017 community edition. I have a C# project created using Visual Studio 2015. When I try to open the project in VS 2017 I get an error message prompt:

--------------------- Microsoft Visual Studio


Project 'dataStructureInCSharp' could not be opened because the Visual C# 2017 compiler could not be created. Please re-install Visual Studio.

--------------------------- OK

I'm trying to obtain help if anyone else has faced similar issue. I feel going the uninstall and then reinstall route is very costly for me and would try that option last if I've got no other resort.

What I've done so far :

  • Tried starting visual studio with administrative privileges

But problem remained same.

I tried creating a new console project solution from scratch but in that case I get very same error and an additional error error also shown below:

enter image description here

System Environment: Windows 7 Ultimate Service Pack 1

2条回答
何必那么认真
2楼-- · 2019-02-13 03:44

You can try to close all VS 2017 instances and delete the folder %localappdata%\Microsoft\VisualStudio\15.0_xxxx\ComponentModelCache, then open VS to create a new Console project.

Or

please re-run the VS 2017 installer as administrator, click the icon beside ‘Launch’ button and choose ‘Repair’ to repair as shown below:

enter image description here

查看更多
可以哭但决不认输i
3楼-- · 2019-02-13 03:59

Just to brief the history of my problem, I had first installed Visual Studio(VS) 2017 community when it was in RC stage. This was first time when I saw the workload based UI of visual studio installation. Initially I simply chose .Net desktop development workload to get started as I was interested in creating only console applications to get my hands dirty.

Initially it was all working well. One fine day I added all other workloads I was interested in namely Universal Windows Platform Development, Azure Development, ASP.NET and web development,Node.js development, and Mobile development with .Net. I'm not sure if there any of the specific workloads to be blamed for the issue I've posted.

Just to avoid the case if RC and RTM release builds might not have messed up my entire environment, I simply uninstalled the entire stuff, rebooted my machine and installed it again from scratch from latest RTM release for Visual Studio Community.

I would strongly recommend that you first try possible solutions suggested by @Sara-MSFT before doing clean reinstall just in case if it works. It can save you couple of hours required in whole reinstallation process if it works.

查看更多
登录 后发表回答