mcintyre321 / EmbeddedResourceVirtualPathProvider

A custom VirtualPathProvider for IIS - load views and assets from Embedded Resources in referenced assemblies
http://www.adverseconditionals.com/2011/07/portable-aspnet-code-using.html
MIT License
63 stars 42 forks source link

hyphens and underscores #6

Closed miguelhughes closed 9 years ago

miguelhughes commented 10 years ago

Hi! great work on this plugin, very neccessary. Do you know if this supports embedded resources with files and folder names containing dashes "-" ? I have some, and looking at the generated dll, the hyphens seem to be converted to underscores "". I don't see any replacements in the code from back to - ... Have I got this correctly or am I missing something?

this post: http://social.msdn.microsoft.com/forums/vstudio/en-US/632d6914-8c90-450e-8ea0-fa60d2c3b6b6/manifest-name-for-embedded-resources Also reports this modification in the embedded resoure name. Are you familiar with this issue? Is there a workaround?

Thanks for your help!

mcintyre321 commented 10 years ago

Its been a long time since I write this, do I can't remember exactly, but I suspect that it's a limitation of Embedded Resource names. If I'm wrong, I'd happily accept a patch

sent from my mobile On 20 Feb 2014 22:10, "miguelhughes" notifications@github.com wrote:

Hi! great work on this plugin, very neccessary. Do you know if this supports embedded resources with files and folder names containing dashes "-" ? I have some, and looking at the generated dll, the hyphens seem to be converted to underscores "". I don't see any replacements in the code from back to - ... Have I got this correctly or am I missing something?

this post:

http://social.msdn.microsoft.com/forums/vstudio/en-US/632d6914-8c90-450e-8ea0-fa60d2c3b6b6/manifest-name-for-embedded-resources Also reports this modification in the embedded resoure name. Are you familiar with this issue? Is there a workaround?

Thanks for your help!

Reply to this email directly or view it on GitHubhttps://github.com/mcintyre321/EmbeddedResourceVirtualPathProvider/issues/6 .

miguelhughes commented 10 years ago

Hi! thanks for your quick reply. Yup, that's right, when the embedded resource name is generated, a lot of replacements are made. I only had time to test a fix for the "-" issue I was having, but the post above describes more replacements. If the folder name has digits, an underscore is prepended. The "@" is also escaped although I'm not sure how. I hope my patch helps make the plugin a little better!