简体   繁体   中英

dotnet restore fail “Unable to resolve 'PCLLibrary' for '.NETCoreApp,Version=v1.0'.”

I have PCL project('PCLLibrary') used in .NET CORE 1.0 project all works fine from Visual Studion, bu fails when I try to do dotnet restore from command line. I need it to build it on teamcity.

Errors in D:\\WebExternal\\WebExternal\\src\\Web\\project.json Unable to resolve 'PCLLibrary' for '.NETCoreApp,Version=v1.0'.

I was trying to google it but didn't found any helpfull results. Please, help me.

Here you can get the project

To test execute command "dotnet restore" from folder, which contains project.json

Move your PCLLibrary into src, it will work.

And some other improvements:

  • In your webapplications3's project.json, the PCLLibrray should be moved to root dependencies section rather than frameworks'dependencies. it's not a framework dependency.
  • And In you PCLLibrary, NETStandard.Library should be moved to frameworks dependencies.

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