Giter Site home page Giter Site logo

Comments (5)

Mardoxx avatar Mardoxx commented on May 23, 2024

Can you provide more detail?

I would assume you mean it is kicking off in your Views saying something along the lines of The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0?

from x.pagedlist.

Jecoms avatar Jecoms commented on May 23, 2024

Yes. The exposed namespace is now also X.PagedList in the current version. None of the IEnumerable extensions are available in version 5.x. Is the only current solution to patch my .config files or is the current version targeting a different version of .NET MVC? I have no problem sticking with the <5 PagedList and PagedList.Mvc for the time being.

from x.pagedlist.

Mardoxx avatar Mardoxx commented on May 23, 2024

I had the same issue today upgrading from an old version. I believe this has something to do with including a PCL in your project. Not entirely sure. To fix it I updated X.PagedList, manually added the assembly reference to System.Runtime to the project's web.config', which allowed it to build succesfully, closed Visual Studio, deleted (renamed) the hidden.vsfolder in the soluton directory, then opened the project, deleted the entry inweb.configand it was back to compiling fine. I would guess you can just get away with deleting the.vs` folder.

The namespace has changed to X.PagedList somewhere down the line (you can always do a case sensitive find and replace using PagedList for using X.PagedList). The info page on GitHub hasn't been updated yet. The demo project uses X.PagedList

from x.pagedlist.

Jecoms avatar Jecoms commented on May 23, 2024

Well, just like the error suggested, I only needed to add the assembly reference to the compilation XML tag in the project web.config file. I still would like to know why this patch is needed. Is it something that VS will handle in the future or is it an issue with how the PCL was configured/targeted?

This is all I added (besides updating refs to X.PagedList) and it builds/runs fine now. This should be in a FAQ or the readme.

<assemblies>
<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</assemblies>

from x.pagedlist.

Mardoxx avatar Mardoxx commented on May 23, 2024

That works, but also deleting the .vs folder does too. Unsure about the internals so don't know why it does. Perhaps it's a bug in VS? Be nice to have some insight!

from x.pagedlist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.