Yogesh,
You can load files from your dll. Here are the steps:
1) Add the file to your dll. Right click on the file in Visual Studio
and choose Properties. You need to set the "Build Action" property to
"Embedded Resource".
2) Compile the assembly; this will embed the file into your dll.
3) To load the assembly, you can do Assembly.Load(); This will give
you an Assembly reference. Note if you are loading the xsl file from
within the same assembly, you can use Assembly.GetExecutingAssembly().
4) Use the assembly reference to get a stream to the xsl file. You can
do this by calling the GetManifestResourceStream() method. Here is an
example:
Assembly.GetExecutingAssembly.GetManifestResourceStream("com.abc.file.xsl");
Note that you have to supply the fully qualified file name.
sayed
[quoted text, click to view] "Yoges" <yogesh.patange@thehartford.com> wrote in message news:<u#1c#NOoEHA.1712@tk2msftngp13.phx.gbl>...
> Hi,
>
> I my .Net Class library project I have added the .xsl file. I need to get
> the contents of the file by loading the Assembly Dll. Is there any way to
> get the file contents.
>
>
> Thanks and Regards,