✅ How does dependencies works ?
Hi guys, i'm having issues using dependancies to build an "API Rest". To be more precise, i'm trying to implement a Dbcontext file in which i'm trying to get DbSet function to work using files that are in another project, but the dependancies are confusing me. Even if i follow exactly guides and AI advices, i still manage to fail it
23 Replies
You just use namespaces in which the files are in that you want to import. I think you need to look more into namespaces system in C#
oh so different projects
then you need to reference the project
the third screen shows that in the dependancies management, i ticked the second project
hm so the project is already referenced
yup, i'm totally confused
and i don't think it is possible to make the API in the same project as the rest
btw instead of
cube4.Nouvells...
can you just do Nouvells
and then try importing it ?wdym ?
what does the error say on the top line ?
like this ?
not here but in your classes in
cube4
I meantow, lemme check
so i modified it on all the files from cube4.Nouvelles_Classes to Nouvelles_Classes but still i cant refer it
the error message for using is that it is "impossible to find (is there an using error or and assembly error"
Hm..I'm not sure tbh. I'd let someone else take the case
do you know someone who can take care of this ? i'm a bit in a hurry, its for a school project
wait for at least 5-7 minutes, if someone doesn't show up then can share your thread link in #chat
ok, thanks
just a last thing, do you think it could work if i just move my folder with my files in the API project ?
Yes
ok, i'll try
welp, it didnt exploded so i think it is good
This one also it looks better:
https://stackoverflow.com/questions/2306652/how-can-i-refer-to-a-project-from-another-one-in-c
Stack Overflow
How can I refer to a project from another one in c#?
I added a project, Project2, to my solution. It already had another project lets say Project 1. How can I call classes and methods from project2 into project1?
What I did:
I have Project 1 and its
thx mate
$close @Hatred An8el
If you have no further questions, please use /close to mark the forum thread as answered