在使用.Net Core安装Update 3 RTM后,VS 2015无法加载任何项目 [英] VS 2015 fails to load any project after installing Update 3 RTM with .Net Core

查看:143
本文介绍了在使用.Net Core安装Update 3 RTM后,VS 2015无法加载任何项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

情景:


1。我有VS 2015 Enterpise更新3


2。由于工作上的限制,我无法安装VS 2017


3。我想从VS 2015运行.Net Core


4。我安装了Dotnet Core  dotnet-1.1.1-sdk-win-x32.exe


5。仍然VS 2015无法创建.Net核心项目


6。我已经安装了DotNetCore.1.0.1-VS2015Tools.Preview2.0.3.exe


之后VS 2015能够创建新的.Net核心项目。但是,在安装之后它无法加载任何旧项目。


它说:"全局元素配置已经被声明"。


但是我的Web.config中没有重复。


也不在我的Machine.config中


我试图完全删除VS 2015。并重申了它。仍然得到相同的错误


我尝试使用  https://github.com/Microsoft/VisualStudioUninstaller/releases

$ b $从我的机器清理所有VS 2015足迹b

完全卸载后我又安装了它并且应用了NO update NO patch nothing。


在app.config或web.config中仍然出现相同的错误:"global"元素配置已经被声明为"


然后当我点击F5并试图让他解决方案时,IIS快递会给我一条消息


HTTP错误500.19 - 内部服务器错误


无法访问请求的页面,因为页面的相关配置数据无效。


更多信息:


读取Web服务器或Web应用程序的配置文件时出现此错误。在某些情况下,事件日志可能包含有关导致此错误的原因的更多信息。




如果您看到文本"有一个重复的'system.web.extensions / scripting / scriptResourceHandler'部分已定义",则此错误是因为您在.NET Framework 4中运行基于.NET Framework 3.5的应用程序。如果您是运行WebMatrix,
来解决此问题,转到Settings节点将.NET Framework版本设置为".NET 2"。您还可以从web.config文件中删除多余的部分。 



web.config中绝对没有重复但仍然我收到此错误消息= /


解决方案

嗨Ricardo,


感谢您在MSDN论坛上发帖。


>>之后VS 2015能够创建新的.Net核心项目。


如果它在创建新项目时工作正常,则表明您的VS设置没有任何问题,模板完全正常。


>>但是在安装后它无法加载任何旧项目。 它说:"全局元素配置已经被声明"。


根据错误消息,来自
Visual Studio文档
,请尝试以下步骤:


1。在XML编辑器中打开一个文件。


2。在文档属性窗口中,单击"架构"字段上的按钮。


将显示"XML架构"对话框。该对话框列出架构缓存中具有.xsd扩展名的所有模式(包括catalog.xml文件中引用的模式),以及当前解决方案中的任何模式,在Visual Studio中打开,在
中引用xsd:schemaLocation属性,或在Schemas属性中引用。


3。通过执行以下操作之一,选择要用于验证的架构:

  选择XML Schemas对话框中列出的模式,单击Use column,然后选择Use this schema。 

  选择XML Schemas对话框中列出的多个模式,右键单击并选择Use this schema。


4。单击确定。


此外,此论坛正在讨论VS设置和安装,因为您的问题与.net核心配置文件和Web应用程序有很大关系,我建议您可以邮寄
https://forums.asp.net/1255.aspx/1? ASP + NET + Core 论坛提供专业和专注的支持。


感谢您的理解与合作。


最好的问候,


Scenario:

1. I have VS 2015 Enterpise with Update 3

2. I can't install VS 2017 due to restrictions at work

3. I wanted to run .Net Core from VS 2015

4. I've installed Dotnet Core dotnet-1.1.1-sdk-win-x32.exe

5. Still VS 2015 wasn't able to create .Net core Projects

6. I've installed  DotNetCore.1.0.1-VS2015Tools.Preview2.0.3.exe

After that VS 2015 as able to create new .Net Core Projects. However it fails to load any old project after this install.

It's saying that : "global element Configuration has already been declared".

but there is NO duplication in my Web.config.

nor in my Machine.config

I tried to remove VS 2015 completely. And resintalled it. Still getting the same error

I tried to cleanup all VS 2015 foot print from my Machine using https://github.com/Microsoft/VisualStudioUninstaller/releases

After the completely uninstall I've installed it again and applied NO update NO patch nothing.

Still getting the same error in app.config or web.config: "global element Configuration has already been declared"

Then when I click F5 and try to runt he solution IIS express returns me a message

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

More Information:

This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.

If you see the text "There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined", this error is because you are running a .NET Framework 3.5-based application in .NET Framework 4. If you are running WebMatrix, to resolve this problem, go to the Settings node to set the .NET Framework version to ".NET 2". You can also remove the extra sections from the web.config file. 

THERE is absolutely NO duplication in the web.config but still I'm getting this error message =/

解决方案

Hi Ricardo,

Thank you for posting in MSDN forum.

>>After that VS 2015 as able to create new .Net Core Projects.

If it works fine on creating new project, it indicates that there is nothing wrong with your VS setup, the template is completely ok.

>>However it fails to load any old project after this install.It's saying that : "global element Configuration has already been declared".

According to the error message, from the Visual Studio documentation, please try with following steps:

1. Open a file in the XML editor.

2. In the document properties window, click the button on the Schemas field.

The XML Schemas dialog box is displayed. The dialog box lists all schemas with an .xsd extension in the schema cache (including schemas referenced in the catalog.xml file), and also any schema that is in the current solution, open in Visual Studio, referenced in an xsd:schemaLocation attribute, or referenced in the Schemas property.

3. Select the schemas to use for validation by doing one of the following:
   Select a schema listed in the XML Schemas dialog, click the Use column, and then select Use this schema. 
   Select multiple schemas listed in the XML Schemas dialog, right-click and select Use this schema.

4. Click OK.

In addition, this forum is talking about VS setup and installation, as your issue is much related to the .net core configuration file and Web application, I suggest you could post in https://forums.asp.net/1255.aspx/1?ASP+NET+Core forum for a much professional and dedicated support.

Thank you for your understanding and cooperation.

Best Regards,


这篇关于在使用.Net Core安装Update 3 RTM后,VS 2015无法加载任何项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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