Comments (5)
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.
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.
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.
Unfortunately, Mr. Scott Allen has passed away recently.
from odetofood.
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)
- Typo: Backslash vs Forward Slash in List.cshtml HOT 1
- Using TempData - Cookie Policy options. HOT 1
- Following readme: aspnet-codegenerator has no generators HOT 4
- value of input field does not change when back button is pressed HOT 1
- Dependencies error of OdeToFood
- https://app.pluralsight.com/course-player?clipId=58755e16-696e-4291-86d8-609e9f0da5af HOT 2
- How to run this in VS Code?
- error code CS0246 HOT 2
- Error Code CS0311 HOT 1
- Editing the In memory data is not working HOT 1
- Install SQL Server on Mac doesn't work
- Module 2 Cannot launch browser with Visual Studio Code HOT 1
- Module 7: You seem awfully certain Visual Studio users have npm installed HOT 3
- default view component doesn't link correctly + HOT 1
- OdeToFood.png HOT 1
- Can't able to scaffold Api controller HOT 1
- Secion 8 : Building a custom middleware needs updating for NET6
- Typo
- Unable to resolve service for type 'Data.IRestaurantsData' while attempting to activate 'OdeToFood.Pages.Restaurants.ListModel'.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odetofood.