I see GetManifestResourceStream return null in a xsl c# extension function. The same code works as expected when run in C# project. Code below.
I ran into a post mentioning ReflectionPermissionFlag.MemberAccess, but it is not clear to me how this has an effect, or how to apply it in this case.
Any ideas?
<msxsl:script language="C#" implements-prefix="user"><![CDATA[ public string parse_myfile(string id) { string desc = "bad"; try { using (System.IO.Stream strm = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("myproj.resources.myfile.txt")) using (System.IO.StreamReader file = new System.IO.StreamReader(strm)) { desc = "good"; } } catch (Exception e) { var t = e.GetType(); while (t != null) { Console.WriteLine(t.AssemblyQualifiedName); t = t.BaseType; } } return desc; } ]]></msxsl:script>