Giter Site home page Giter Site logo

Comments (5)

believelifeisfun avatar believelifeisfun commented on August 26, 2024

Going through the second time, I think I know "where" the issue started. In section 2, "Building a Data Access Service" intellisense is not finding the class "Restaurant" in OdeToFood.Core. The error CS0246: The type or Namespace name 'Restaurant' could not be found (are you missing a using directive or an assembly reference?). Unfortunately it also doesn't offer the option to add the namespace to OdeToFood.Core. I tried adding the namespace manually, but it doesn't seem to see the other project in the same solution.

Note that this is where these reference errors begin.

Good Fortune,
Richard

from odetofood.

believelifeisfun avatar believelifeisfun commented on August 26, 2024

I right-clicked on each project adding project references to both "OdeToFood" and "OdeToFood.Core" in the "OdeToFood.Data.csproj" file. Then I also added a single project reference to "OdeToFood" in the "OdeToFood.Core.csproj" file. I removed the problem line:

IEnumerable<Restaurant> GetAll();

And did a build on the solution. Everything works up to that point. But reading the line above, I can't seem to get this project to use the Restaurant class in "OdeToFood.Core".

Good Fortune,
Richard

from odetofood.

believelifeisfun avatar believelifeisfun commented on August 26, 2024

Note: to move on with the lesson, I moved the files in the OdeToFood.Core and OdeToFood.Data projects into folders under OdeToFood/Pages/.. and now intelisense easily finds the class and I'm able to move on. I would still appreciate any advice about why I couldn't reference the class from the separate projects.

Good Fortune,
Richard

from odetofood.

CePur avatar CePur commented on August 26, 2024

Unfortunately, Mr. Scott Allen has passed away recently.

from odetofood.

StayFN avatar StayFN commented on August 26, 2024

I just ran into the same Problem and needed to reference them manually. Also when trying to add them via Intellisense my Visual Studio went into an (probably) infinite loop.

Solution was also just to right click on the Projects and add the References manually. I think there are some shenanigans going on with IntelliSense.

Rip Mr. Scott

from odetofood.

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.