473,396 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Embed xsd in C# project

Hello,
I'm using an xml schema (xsd file) to validate input xml. This xsd is
used by the C# dll and must be distributed with it. The xsd isn't
modified. So I would like to embed it in the DLL so that I don't have to
worry about the path where the file is stored... How do I embed the xsd
file into my DLL? I know how to get the file back from resource using
Assembly.GetExecutingAssembly() and
assembly.GetManifestResourceStream(...) but I don't know how to create
the resource.

Thanks,
David.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
2 7578
David wrote:
Hello,
I'm using an xml schema (xsd file) to validate input xml. This xsd is
used by the C# dll and must be distributed with it. The xsd isn't
modified. So I would like to embed it in the DLL so that I don't have to
worry about the path where the file is stored... How do I embed the xsd
file into my DLL? I know how to get the file back from resource using
Assembly.GetExecutingAssembly() and
assembly.GetManifestResourceStream(...) but I don't know how to create
the resource.


IN VS, select the file to be embedded in the Project Explorer. Look now
to the Properties window, and change the "Build Action" to Embedded
Resource.

Voila!! :-)

Chris
Nov 16 '05 #2
Merci!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lore Leuneog | last post by:
Hello. I want to embed the framework setup with my project setup. Does any body know where in the (Visual Studio .net) Setup-Project I can set the option to install the framework first? Thank...
7
by: axis | last post by:
What I want to do is pretty simple: I have a bunch of icons in my application project (visual studio .net 2003), and I want to embed those in the executable, and access them through code. I've...
3
by: Jason Gogela | last post by:
Salutations, I was wondering why I get an error using the "embed" property in asp.NET when inserting Flash into my project. Though the page renders fine using it, I bothers me deeply that the use...
2
by: Rob Dob | last post by:
Hi, How do I go about installing another Web Site Project inside my existing VS2005 website project. I currently have both a forum WSP and my main WSP application within the same solution. Both...
2
by: Robert | last post by:
Dear all, I want to embed a motorola s file in my exe file using Visual C++.net, and then I can use the data in the Motorola file. How should I do? I am urgently need your help. Thanks a lot.
0
by: =?Utf-8?B?Tml5YXpp?= | last post by:
Hi all, Does anyone know how to embed the Excel file in VB.NET 2005 Resources? Here is what I am doing at the moment: 1) In my VB.NET 2005 project code I load the excel with it path into...
14
by: jim | last post by:
OK...Don't ask why - it'll just make ya mad. It makes me mad just thinking about it. I swear....if I didn't need this job, I'd tell 'em where to embed their webbrowser control. But, since I do...
0
by: VigneshS | last post by:
Hi, I am a newbie to Globalization and Localisation Concepts. I tried almost all the methods of the Globalization concepts. But i cannot be able to embed a text file within a Resource. ...
4
by: Wu | last post by:
Hello, I have to embed a flash in a html email by csharp. Don't you know how to do it? I found some source in code project, but the activeX does not able to run at default security level. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.