C
C#2mo ago
Hatred An8el

✅ 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
Salman
Salman2mo ago
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#
Hatred An8el
Hatred An8elOP2mo ago
No description
No description
No description
No description
Salman
Salman2mo ago
oh so different projects then you need to reference the project
Hatred An8el
Hatred An8elOP2mo ago
the third screen shows that in the dependancies management, i ticked the second project
Salman
Salman2mo ago
hm so the project is already referenced
Hatred An8el
Hatred An8elOP2mo ago
yup, i'm totally confused and i don't think it is possible to make the API in the same project as the rest
Salman
Salman2mo ago
btw instead of cube4.Nouvells... can you just do Nouvells and then try importing it ?
Hatred An8el
Hatred An8elOP2mo ago
wdym ?
Salman
Salman2mo ago
what does the error say on the top line ?
Hatred An8el
Hatred An8elOP2mo ago
like this ?
No description
Salman
Salman2mo ago
not here but in your classes in cube4 I meant
Hatred An8el
Hatred An8elOP2mo ago
ow, 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"
Salman
Salman2mo ago
Hm..I'm not sure tbh. I'd let someone else take the case
Hatred An8el
Hatred An8elOP2mo ago
do you know someone who can take care of this ? i'm a bit in a hurry, its for a school project
Salman
Salman2mo ago
wait for at least 5-7 minutes, if someone doesn't show up then can share your thread link in #chat
Hatred An8el
Hatred An8elOP2mo ago
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 ?
Salman
Salman2mo ago
Yes
Hatred An8el
Hatred An8elOP2mo ago
ok, i'll try welp, it didnt exploded so i think it is good
Salman
Salman2mo ago
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
Hatred An8el
Hatred An8elOP2mo ago
thx mate
sibber
sibber2mo ago
$close @Hatred An8el
MODiX
MODiX2mo ago
If you have no further questions, please use /close to mark the forum thread as answered
Want results from more Discord servers?
Add your server