I'm trying to make a web api in C#, and there was an error. There are two solutions I'm using for this (I was following two separate tutorials) and I imported one into the other to make sure the classes were available. This was working fine for a while, but now the changes I made to the imported files aren't updating; the code is crashing on an empty line where I'm pretty sure there was a errant line of code before, leading me to think somehow the compiler isn't getting my new code.
When I run the debugger and step into these external files, I get the alert that "Source File: (dir of imported class) Module: \Appdata\Local\Temp\Temporary\ASP.NET Files\vs...\FormUI.exe (the project I'm importing) Process: [18324] issexpress.exe The source file is different from when the module was built. Would you like the debugger to use it anyway?" Selecting yes gives what I assume is old code (but VS displays the new code, leading to a crash on what seems to be a empty line), while selecting no lets me select the file manually. Doing so just repeats the prompt.
I've tried following this and clean/rebuilding to no avail.
Solution
In my %LocalAppData%\Microsoft\WebsiteCache folder, I found there was a duplicate a folder named after my solution. After cutting the properties from the duplicate and pasting it into the original (which was empty), my code worked again. I suspect this happened due to me adding the project to another solution and then removing it after consideration.