Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 788
Ivan Smyrnov Avatar asked Jul 21 '16 10:07

Ivan Smyrnov


1 Answers

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.
like image 75
Takahiro Avatar answered Oct 23 '22 15:10

Takahiro