473,583 Members | 4,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.GetExe cutingAssembly( ) and
assembly.GetMan ifestResourceSt ream(...) 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 7601
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.GetExe cutingAssembly( ) and
assembly.GetMan ifestResourceSt ream(...) 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
1681
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 you Lore
7
4298
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 spent an hour browsing MSDN, and I still don't have a clear picture of how to do it. Documentation talks about ResourceManagers and other stuff, but...
3
2615
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 of said tag returns an error in the code view. Is there a replacement for this? I haven't been able to find anything on the subject. Macromedia says...
2
2047
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 compile and run without error. However they are separate applications and I would like to have them together in order to make use of my...
2
2978
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
3936
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 string as: ------------------------------------------------------------------------------------------------ Dim fileNameXL As String =...
14
1897
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 need it, here are my questions... Can I embed an IE activex control in a webpage? I basically would like to be able to embed the same component...
0
1529
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. My need is to open a solution programmatically, select a Project within, and get a source resource file. Then, select a number of cultures and create...
4
1894
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. Please advice. Wu
0
7825
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7933
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5700
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5372
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3816
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3841
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1155
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.