22 Replies
Your code? Your file path?
So I run the project
and I get this specific error:
System.IO.FileNotFoundException: 'Could not find file 'D:\Universitate\dotNet\bin\Debug\net8.0\Assets\player.json'.'
Well, does that file exist?
yea
Show your code
Does it exist, really? At this exact location? With this exact name?
i get the error from var json
What get passed to this function
I would give you details, but this is for uni, I just pulled this
and I have to implement whatever, like it's sort of a project made by our teacher and we have to add features
so yeah, idk more than this
Show me a screenshot of the file existing at this location
I have a suspicion that the file exists, yes, but elsewhere
Like, say, in the project root
And it's not set to be copied over to the bin directory
oooohhhh

Doesn't look much like this path, does it?
yeah:)))
So, assuming you use VS, right-click the
Assets
directory, open its properties, and set it to be copied
Always, or if newer
Either worksum

from where?
Right-click on it
You should have a
Properties
in the settings
Alternatively, set it for each individual filegot it
thanks
it works
$close
If you have no further questions, please use /close to mark the forum thread as answered