That’s a bit strange. I know that Unity does some shennanigans to modify paths to packages, so that might be what’s kicking in, see here.
That might be the problem, or it might be something else. This is probably an issue on Visual Studio’s side, I just tried in Rider, and the corresponding refactoring there (“Move to Another File”) works just as expected in a local package.
Yeah, I was hoping this would count as a bug for the Visual Studio Editor package. At least the .csproj generation resolves the paths for the source files fine. But I guess since the csproj is inside the project directory, not the package directory, that’s what VS uses for these features.
Interesting that Rider does this correctly. Would be curious how a csproj looks like when using Rider (I assume these IDE integration packages are responsible for the generation).
But you’re right this is more likely a Visual Studio issue then. Still, if someone knows of a way to override something for VS to use the right path, let me know.
Nope, Unity does that! Unity doesn’t use them itself (though that will change in the future), but they’re generated for the use of IDEs. You can set what gets generated under Preferences/External tools.
That made me realize that that might be the issue. Open that and make sure that all the packages are checked in that list, and hit “Regenerate project files”. It might be that that makes the information VS needs be included.