I have Project A which depends on Project B.
In Project B I am including additional files in the build out like this:
<ItemGroup>
<None Include="jsfiles/**/*" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
In Project B, I'm loading the files like this:
File.ReadAllText("jsfiles/foo.js");
This copies the files successfully into the out directory. But when I include Project B in Project A, the runtime is resolving files relative to the root of Project A and not the output directory. Because the files don't exist in Project A's root (but they do exist in Project A's output dir), they aren't found.
What's the proper way to load the files in Project B so that it still work when Project B is included in Project A?
Basically, I'm just looking for the right way to include additional resources in a project.