Main Site Documentation

Project - Allowing Enumeration on Resources


#1

I just posted Allowing Enumeration on Resources on Codeshare. Feel free to discuss and make suggestions here.


#2

That is a nice contribution…


#3

Thanks. My intent is to try to use the embedded resources to store the javascript, html, and image files for a CC3000 based wifi webserver. This way I can just drop new javascript and html files right into the resources of the project, edit them right in Visual Studio, and when I deploy, the updates get pushed onto the device with any app updates. This could be really great. And it should work well for web server files that don’t need to be changed once deployed.

At this point I am really just experimenting to see if it can be done at all. When I got the code generator modified successfully, I got very optimistic and posted it. But, I have yet to test it with any large files. Fingers are crossed.


#4

As I was reading this, I remembered a post I did sometime back. Another solution, rather than requiring a rebuild of the tools would be to use a T4 template that generates the list you need.

Below is a link to the quick and dirty template I put together at that stage, it generated string names for each resource, but it could easily be modified to do other things. The advantage would be that it works with current and later versions of the tooling ( hopefully :slight_smile: )

https://www.ghielectronics.com/community/forum/topic?id=10182&page=1#msg101027


#5

very cool idea…


#6

@ taylorza - Ah yes, I remember T4 templates. Totally forgot about them for this. Yes, that solves the exact same problem without modifying the Framework. I might just switch to that solution. However, the Designer file generated by the Framework does really suck and I would like to permanently fix that in future versions of .NET MF. It would be nice if it just did this stuff out of the box.

Considering the slow pace of change of .NET MF, we should not shy away from making changes like this that are non-breaking.