简体   繁体   中英

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:

I'm running MVC4 for .net 4 in Visual Studio 2012. This only started to occur after I updated nuget package manager. As a result, I can't run any EF migrations commands to update database.

PMC displays the error immediately upon launching the project. I tried to select 'manage nuget packages' on my domain and web projects. Domain project worked fine, but I see this same error in the 'Installed packages' and 'Updates' tabs for the web project. If I remove the entries from the packages.config, then it doesn't show the error anymore and says none. However, I still cannot run any commands on PMC other than install-package. Even trying to run update-package will give me:

I tried to go through all the xml, settings, and xml files I could find but haven't found any anomalies or corruptions. 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).

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.

For me this was happening because of the Topshelf (I think version 3.1.2) package. It was resolved by deleting it from the Packages folder and then rebuilding and allowing Nuget to re-fetch it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM