It's not a question of "why is this not allowed?", it's more of a question of "why is this feature not implemented?", which is very different.
From the results from your other question you can see that it's possible to copy the contents of a embedded resource to a local file, and then call Process.Start
to execute it. This works the same as the feature you are requesting, so executing an embedded resource is allowed but you have to do a bit of legwork to get it to work the way you want it to.
I don't know how MS decides what features are added to .net, but I assume this one isn't available directly from embedded resources is because of some combination of the following reasons:
- It's not what embedded resources were designed for
- If you need to do it, it's still possible to implement it yourself (as per your other question)
- Encouraging developers to store and run executables as embedded resources sounds like it would be a security headache from a design standpoint
- There's not much demand for it
- They never thought about it