asp.net mvc - X.PagedList.MVC namespace not available following NuGet install -
i'm trying switch pagedlist x.pagedlist. i've used nuget uninstall pagedlist , pagedlist.mvc packages , install x.pagedlist , x.pagedlist.mvc.
when go update views, find myself in strange situation: can't seem reference pagedlist.mvc
namespace detailed in the example this:
@using x.pagedlist.mvc; @using x.pagedlist;
in visual studio , when debugging, gives following exception:
the type or namespace name 'mvc' not exist in namespace 'x.pagedlist' (are missing assembly reference?)
(as aside, if leave off using
, exceptions missing definitions, expected.)
is there problem nuget package? there way manually add assembly reference package installed via nuget?
so, in end did find hacky way work...
all needed manually add reference x.pagedlist.mvc.dll
. oddly, present in packages directory (.\packages\x.pagedlist.mvc.5.3.0.5300\lib\net46
) , has looks valid package file.
not sure why didn't happen automatically, i'm suspicious due conflict old pagedlist.mvc
package.
going leave question open week or 2 in case can weigh in little more insightful.
update: approach above worked locally, failed when deployed test. prompted bit more digging , resolution nuget working properly.
i used nuget package explorer find out x.pagedlist.mvc
targets more recent version of .net framework project adding (4.6 vs 4.5). bit disappointed install didn't fail more helpfully, @ least sorted now.
Comments
Post a Comment