简体   繁体   English

Visual Studio 2012程序包管理器控制台名称不能以'<'字符开头

[英]Visual studio 2012 package manager console Name cannot begin with the '<' character

Has anyone run into this issue before or can help find out where the source of this error is coming from? 有没有人遇到过这个问题,或者可以帮助找出此错误的来源? When I load the project (and it only occurs on this project, none of my others), PM gives me this error in console: 当我加载项目时(它仅在该项目上发生,其他都不发生),PM在控制台中给了我这个错误:

Name cannot begin with the '<' character, hexadecimal value 0x3C. 名称不能以'<'字符(十六进制值0x3C)开头。 Line 1, position 2. 第1行,位置2。

I'm running MVC4 for .net 4 in Visual Studio 2012. This only started to occur after I updated nuget package manager. 我在Visual Studio 2012中为.net 4运行MVC4。只有在更新nuget程序包管理器之后,这种情况才会开始发生。 As a result, I can't run any EF migrations commands to update database. 结果,我无法运行任何EF迁移命令来更新数据库。

PMC displays the error immediately upon launching the project. PMC在启动项目后立即显示错误。 I tried to select 'manage nuget packages' on my domain and web projects. 我试图在我的域和Web项目中选择“管理nuget软件包”。 Domain project worked fine, but I see this same error in the 'Installed packages' and 'Updates' tabs for the web project. 域项目运行正常,但在Web项目的“已安装软件包”和“更新”选项卡中看到了相同的错误。 If I remove the entries from the packages.config, then it doesn't show the error anymore and says none. 如果我从packages.config中删除条目,那么它不再显示错误,并且不显示任何错误。 However, I still cannot run any commands on PMC other than install-package. 但是,除了安装软件包,我仍然无法在PMC上运行任何命令。 Even trying to run update-package will give me: 甚至尝试运行update-package都会给我:

update-package : Name cannot begin with the '<' character, hexadecimal value 0x3C. update-package:名称不能以'<'字符开头,十六进制值0x3C。 Line 1, position 2. 第1行,位置2。

I tried to go through all the xml, settings, and xml files I could find but haven't found any anomalies or corruptions. 我试图浏览所有我可以找到但没有发现任何异常或损坏的xml,设置和xml文件。 Does anyone know how I can trace this error? 有人知道我如何追踪这个错误吗?

When you initially open a solution in Visual Studio, any installed packages will run the "Init.ps1" script within the package (if it has one). 最初在Visual Studio中打开解决方案时,所有已安装的程序包都将在程序包中运行“ Init.ps1”脚本(如果有)。

Sounds like the EF package might be the culprit, and from memory I know it has an Init.ps1, so might be worth removing that package entirely (manually, just delete everything) and reinstalling it. 听起来像EF软件包可能是罪魁祸首,从内存中我知道它具有Init.ps1,因此可能值得完全删除该软件包(手动删除所有内容)并重新安装。

For me this was happening because of the Topshelf (I think version 3.1.2) package. 对我而言,这是由于Topshelf(我认为版本3.1.2)软件包引起的。 It was resolved by deleting it from the Packages folder and then rebuilding and allowing Nuget to re-fetch it. 通过从Packages文件夹中删除它,然后重建并允许Nuget重新获取它,可以解决该问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 XmlDocument.LoadXML名称不能以“ &lt;”字符开头 - XmlDocument.LoadXML Name cannot begin with the '<' character 无法将AjaxContrlToolkit添加到Visual Studio 2012中的工具箱 - Cannot add AjaxContrlToolkit into Toolbox in Visual Studio 2012 Visual Studio 2012无法加载程序集 - Visual studio 2012 cannot load assembly 无法在Visual Studio 2012中显示.svg文件(IIS Express) - Cannot display .svg files in Visual Studio 2012 (IIS Express) Visual Studio 2012无法将&#39;bool&#39;转换为&#39;System.Boolean&#39; - Visual Studio 2012 cannot convert from 'bool' to 'System.Boolean' 无法在Visual Studio Express 2012中创建新的SQL数据表 - Cannot create new SQL data tables in Visual Studio Express 2012 在Visual Studio 2012 Express for Web中找不到“附加到进程”选项 - Cannot find “Attach to Process” option in Visual Studio 2012 Express for Web Visual Studio 2012和Umbraco 7 - Visual Studio 2012 and Umbraco 7 奇怪 ASP.NET Razor 页面错误 Javascript For loop: Name cannot begin with the character - Weird ASP.NET Razor page error in Javascript For loop: Name cannot begin with the character Visual Studio 2012 ASP.NET设计页无法识别印地语字符 - Hindi character not recognized by Visual Studio 2012 ASP.NET Design Page
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM