Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to include .XSLT file in an assembly
Message
General information
Forum:
ASP.NET
Category:
XML
Miscellaneous
Thread ID:
00713117
Message ID:
00713655
Views:
19
>The only thing I can think of (unless someone else has a better idea) is to use resources. Resources can be compiled and embedded into a DLL using the Resgen and AL tools. It looks like there is also a way to do this in VS.NET by adding it to your project and changing the build property to Embedded Resource.
>
Hi David, Hi Rick

Your suggestion about using a resource was right. Just setting the Build Action property of the XSLT file to "Embebbed resource", pastes it inside the assembly.

For retrieving it, the following code does the trick:
Stream stm = Assembly.GetExecutingAssembly()
	   .GetManifestResourceStream(this.GetType(),"MyFile.Xslt");
XmlDocument doc = new XmlDocument();
doc.Load(stm);
Thanks again
Jose
------------------
Jose Marcenaro
Tercer Planeta - Argentina
http://www.tercerplaneta.com
Previous
Reply
Map
View

Click here to load this message in the networking platform