无法打开项目'TrialConsoleApp',因为无法创建Visual C#2015编译器。初始化部分“Microsoft.CodeAnalysis”时抛出异常 [英] Project 'TrialConsoleApp' could not be opened because the Visual C# 2015 compiler could not be created. An exception was thrown while initializing part "Microsoft.CodeAnalysis

查看:367
本文介绍了无法打开项目'TrialConsoleApp',因为无法创建Visual C#2015编译器。初始化部分“Microsoft.CodeAnalysis”时抛出异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team,


我正在尝试创建一个控制台应用程序,一旦我在对话框中单击"确定",我就得到了错误,



---------------------------
$
Microsoft Visual工作室

---------------------------
$
项目'TrialConsoleApp'不能因为无法创建Visual C#2015编译器而被打开。初始化部分"Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService"时抛出异常。

------------------------ ---

OK  

-------------------------- -

这不仅发生在这种情况,而且还发生在我打开现有解决方案/项目并尝试打开任何CS文件的所有应用程序。


寻找永久性解决方案。 


谢谢和问候,


Sanjeev Gharmode

解决方案

嗨Sanjeev,


感谢您在MSDN论坛上发帖。


请检查:
在更新3之后修复Visual Studio 2015
/ p>

原因:


Roslyn无法加载所需的程序集,然后整个VS崩溃。


解决方案:


已添加 System.Reflection.Metadata.dll 到GAC。


步骤:


1。下载最新版本(撰写本文时为3.4.4)来自 这里。

2.打开VS2015的开发者命令提示符,然后cd到下载软件包的lib文件夹。

3.再次重新打开你的VS以查看是否所有内容工作正常。


最好的问候,



Hi Team,

I am trying to create a console application and once I click on OK in the dialog box, I got and error,

---------------------------
Microsoft Visual Studio
---------------------------
Project 'TrialConsoleApp' could not be opened because the Visual C# 2015 compiler could not be created. An exception was thrown while initializing part "Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzerService".
---------------------------
OK   
---------------------------

This is happening not only for this, but for all the applications where I open the existing solution/project and try to open any CS files.

Looking for permanent resolution. 

Thanks and Regards,

Sanjeev Gharmode

解决方案

Hi Sanjeev,

Thank you for posting in MSDN forum.

Please check: Fixing Visual Studio 2015 after update 3

Reason:

Roslyn unable to load an assembly it needs, then the entire VS crashes.

Solution:

added System.Reflection.Metadata.dll to GAC.

Steps:

1. Download the latest version (3.4.4 at this time of writing) from  here.
2. Open your Developer command prompt for VS2015, and cd to the lib folder of downloaded package.
3. Re-open your VS again to check if everything works fine.

Best Regards,


这篇关于无法打开项目'TrialConsoleApp',因为无法创建Visual C#2015编译器。初始化部分“Microsoft.CodeAnalysis”时抛出异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆