The new packages created for .net core 1.1 / Angular have a package incompatibility issue when nuget is doing the initial restore (Visual Studio 2017):
Package Microsoft.Composition 1.0.27 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.Composition 1.0.27 supports: portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
5 Answer(s)
-
0
OK, found the problem (through this post: <a class="postlink" href="https://github.com/dotnet/corefx/issues/18452">https://github.com/dotnet/corefx/issues/18452</a> )
You are including Microsoft.VisualStudio.Web.CodeGeneration.Design in the Host project. removing this package fixes the Nuget Restore.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Awesome! Thanks for sharing the solution!
Will this affect the core project's ability to generate MVC controllers?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Weird, I tested adding a Webapi Controller using right-click Add Controller. First thing Visual Studio 2017 did was put Microsoft.VisualStudio.Web.CodeGeneration.Design (and all it's multiple dependencies) back into the Host project. then I had to attempt to create a controller a second time to add the controller, which worked.
So.... remove it in order to get Nuget to restore the packages in the solution. then, if you wish to generate the controllers it will automatically add back in these dependencies.
Personally, I will create the controller myself as the scaffolding doesn't inherit from <yourapp>ControllerBase.
I'm not sure how this will impact builds using a CI process that automatically restores the Nuget packages.
Personally, I don't like including packages in my server app who's purpose is to support development time processes.
Fun :)
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi,
We fixed it by this commit <a class="postlink" href="https://github.com/aspnetboilerplate/aspnet-core-template/commit/7702de2ca92b8c424f25af059545674d8d8f9901#commitcomment-21915183">https://github.com/aspnetboilerplate/as ... t-21915183</a>.
Can you also try that in your project ?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
I have tested these changes, and has resolved the issue.
Thanks,
Brent
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)