Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet add package Microsoft.EntityFrameworkCore.SQLite failed #13366

Closed
CeciAc opened this issue Jul 17, 2019 · 5 comments
Closed

dotnet add package Microsoft.EntityFrameworkCore.SQLite failed #13366

CeciAc opened this issue Jul 17, 2019 · 5 comments

Comments

@CeciAc
Copy link

CeciAc commented Jul 17, 2019

@junk123321 commented on Tue Jul 16 2019

Run below command in tutorial
dotnet add package Microsoft.EntityFrameworkCore.SQLite
has below problem
The content at 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0' is not valid XML.

D:\aspnetcore\aspnetcoreapp>dotnet add package Microsoft.EntityFrameworkCore.SQLite
  Writing C:\Users\someone\AppData\Local\Temp\tmpB994.tmp
info : Adding PackageReference for package 'Microsoft.EntityFrameworkCore.SQLite' into project 'D:\aspnetcore\aspnetcoreapp\aspnetcoreapp.csproj'.
info : Restoring packages for D:\aspnetcore\aspnetcoreapp\aspnetcoreapp.csproj...
info :   GET http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0
info :   CACHE https://api.nuget.org/v3-flatcontainer/microsoft.entityframeworkcore.sqlite/index.json
info :   CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0
info :   OK http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0 3257ms
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0'.
log  : The content at 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0' is not valid XML.
log  :   For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
info :   GET http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0
info :   OK http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0 1793ms
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0'.
log  : The content at 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0' is not valid XML.
log  :   For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
info :   GET http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0
info :   OK http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0 1829ms
error: Failed to retrieve information about 'Microsoft.EntityFrameworkCore.SQLite' from remote source 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0'.
error:   The content at 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SQLite'&semVerLevel=2.0.0' is not valid XML.
error:   For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.


@junk123321 commented on Tue Jul 16 2019

Another two commands have similar problems.
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
dotnet add package Microsoft.EntityFrameworkCore.Design

D:\aspnetcore\aspnetcoreapp>dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
  Writing C:\Users\someone\AppData\Local\Temp\tmp65DA.tmp
info : Adding PackageReference for package 'Microsoft.VisualStudio.Web.CodeGeneration.Design' into project 'D:\aspnetcore\aspnetcoreapp\aspnetcoreapp.csproj'.
info : Restoring packages for D:\aspnetcore\aspnetcoreapp\aspnetcoreapp.csproj...
info :   GET http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0
info :   CACHE https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.design/index.json
info :   CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0
info :   OK http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0 3324ms
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0'.
log  : The content at 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0' is not valid XML.
log  :   For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
info :   GET http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0
info :   OK http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0 1704ms
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0'.
log  : The content at 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0' is not valid XML.
log  :   For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
info :   GET http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0
info :   OK http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0 1273ms
error: Failed to retrieve information about 'Microsoft.VisualStudio.Web.CodeGeneration.Design' from remote source 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0'.
error:   The content at 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.VisualStudio.Web.CodeGeneration.Design'&semVerLevel=2.0.0' is not valid XML.
error:   For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.

D:\aspnetcore\aspnetcoreapp>dotnet add package Microsoft.EntityFrameworkCore.Design
  Writing C:\Users\someone\AppData\Local\Temp\tmp4EB2.tmp
info : Adding PackageReference for package 'Microsoft.EntityFrameworkCore.Design' into project 'D:\aspnetcore\aspnetcoreapp\aspnetcoreapp.csproj'.
info : Restoring packages for D:\aspnetcore\aspnetcoreapp\aspnetcoreapp.csproj...
info :   GET http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0
info :   CACHE https://api.nuget.org/v3-flatcontainer/microsoft.entityframeworkcore.design/index.json
info :   CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0
info :   OK http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0 3663ms
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0'.
log  : The content at 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0' is not valid XML.
log  :   For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
info :   GET http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0
info :   OK http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0 1676ms
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0'.
log  : The content at 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0' is not valid XML.
log  :   For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
info :   GET http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0
info :   OK http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0 1585ms
error: Failed to retrieve information about 'Microsoft.EntityFrameworkCore.Design' from remote source 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0'.
error:   The content at 'http://go.microsoft.com/fwlink/?LinkID=206669/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Design'&semVerLevel=2.0.0' is not valid XML.
error:   For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.

@junk123321 commented on Wed Jul 17 2019

pkg version must be specified as below, then it works.

dotnet add package Microsoft.EntityFrameworkCore.Sqlite --version 2.2.6
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design --version 2.2.3
dotnet add package Microsoft.EntityFrameworkCore.Design --version 2.2.6


@junk123321 commented on Wed Jul 17 2019

pls update doc accordingly to avoid misleading new guys. :)


@srvbpigh commented on Wed Jul 17 2019

Hello, @junk123321

Thank you for your feedback.

We are actively reviewing your comments and will get back to you soon.

Kind regards,
Microsoft DOCS International Team

@CeciAc
Copy link
Author

CeciAc commented Jul 17, 2019

Hi team,
In the last comment the user makes a suggestion on the code
best

@guardrex
Copy link
Collaborator

guardrex commented Jul 17, 2019

Hi @CeciAc!

Looks like a tooling bug to me because the version has been optional. Either that or the 🧀 moved and they changed the command syntax. Perhaps, it should be opened as an engineering issue before changing anything that we have. We have ~20 instances of the command around the docs without specifying a version. cc: @Rick-Anderson If so, we'd ask here 👉 https://github.com/NuGet/Home/issues

@guardrex
Copy link
Collaborator

guardrex commented Jul 17, 2019

Side question for you @junk123321 ... you're sure that you don't have a global.json file (or nuget.config) around in the directory tree at or above the project? If so, that might foul the package discovery.

btw-- What SDK version are you using?

@guardrex
Copy link
Collaborator

One more thing comes to mind @junk123321 ... you might be in a broken package cache state. Try executing this command to nuke the package cache ...

dotnet nuget locals --clear all

... then try the command from the topic again (without the version) and see if it works.

@Rick-Anderson
Copy link
Contributor

This can fail for several reason as @guardrex mentions. This is not a doc bug. Given we have thousands of customers reporting success on this, it's almost a certainty this is not a bug.

Another two commands have similar problems.
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
dotnet add package Microsoft.EntityFrameworkCore.Design

Follow the suggestions of @guardrex and do some searching on SO to figure out what you've done wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants