C
C#16mo ago
Pibbles

Visual Studio project reference not updating with new code

Basically I have 2 projects in separate solutions, API and Data (the projects) API usually references a package for the Data project, but I've removed that, and added my local Data project as a reference in both the API solution and project. But when I go through the API project, on parts where it's "using Data.Models", if I step into the classes, they aren't my local classes. It takes me to some CompilerGenerated class model when stepping into the Data.Models stuff
12 Replies
Angius
Angius16mo ago
Why would you have them under separate solutions...?
Pibbles
PibblesOP16mo ago
idk man I didn't make this I just have to live with it, work
Kouhai
Kouhai16mo ago
Make sure in the API project you're referencing the Data project and not the compiled dll/package for the Data project.
Pibbles
PibblesOP16mo ago
how would I test that? I mean by the looks of it I am so follow up, how would I fix that?
Kouhai
Kouhai16mo ago
Check your csproj file, does it have any references to a dll/package?
Pibbles
PibblesOP16mo ago
naw I always remove that manually when adding the new project ref I just found it ffs apparently there's another project in data and that project references the thing I want
Kouhai
Kouhai16mo ago
AMlaugh
Pibbles
PibblesOP16mo ago
I've spent more time trying to be able to test my code than I have writing it and definitely testing it
Kouhai
Kouhai16mo ago
It happens
Pibbles
PibblesOP16mo ago
ha nevermind it didn't work love it, well I'll keep looking into it
Kouhai
Kouhai16mo ago
Try to reference the Data project in just a new console template or smth
Pibbles
PibblesOP16mo ago
oh boy it finally actually really does work this time, code is just the best :)
Want results from more Discord servers?
Add your server