-
Notifications
You must be signed in to change notification settings - Fork 224
Retain paths to embedded resources #260
Comments
Are you looking for it to generate something like |
No. As I was talking with @davidfowl over at JabbR, the most useful (and probably simplest) thing to do would simply be to shove the relative path as the name. So I'd get |
Lolwut? Is that image some github markdown I don't know about, or was that on purpose? Also, for those wondering, there's no problem with having a |
It's Slash from Guns N' Roses 😄 |
Oh. Right. The point was, imagine if I have this stupid setup:
How on earth would you tell them apart if you just translate directory separator into a |
Though, that's ofcause highly theoretical (and moronic thing to do). A benefit of having the actual paths is that it allows you to actually "unpack" the embedded resources from a |
Yes I agree with this, I was just reverse-trolling 😄 The embedded FS is a reasonable scenario and I think we'll want to do things to support that. For example, here's Katana's "embedded file system" implementation, which is one possible direction we could go in for ASP.NET vNext: |
Yar, gonna assign this one to myself, as it's an easy fix. Will need to notify some other project owners about changes |
@Eilon As far as I can tell, if you take the function https://github.com/aspnet/KRuntime/blob/dev/src/Microsoft.Framework.Runtime/NuGet/Utility/PathUtility.cs#L63 and plug it in https://github.com/aspnet/KRuntime/blob/dev/src/Microsoft.Framework.Runtime.Roslyn/EmbeddedResourceProvider.cs#L16, you would get something that'd work with the |
We need to think about this a bit. The slashes would need to be consistent cross platform. I should be able to write an app that runs on both x-plat with the same logic for accessing resources |
Then use forslashes and treat them as urls? |
So we're going to hard code Example code for accessing a resource: assembly.GetManifestResourceStream("compiler/resources/foo.jpg") |
Seems like a lot of cruft... |
We could do, resources/*/ instead, we went with compiler instead to not conflict but I'm fine reverting that decision |
Yeah the |
Currently, if I do
k build
on a project with a few embedded resources, it doesn't care where those resources are. So if I haveAnd my
project.json
hasThe result ends up with 3 resources.
All the path-information is lost. I haven't tried to see what would happen if I were to add multiple files with the same name in different folders, but I can't imagine the result would be good.
The text was updated successfully, but these errors were encountered: