Question about embedded resource

Posted on 2004-11-16
Last Modified: 2010-04-15
Hello sirs,

I have a project for a .DLL in .NET that has an XML file as embedded resource. Is it possible to update/substitute this embedded resource in the DLL without having to re-compile the project? If yes, how?

Thanks in advance,

Question by:leodippolito
    1 Comment
    LVL 6

    Accepted Solution

    If you want to change your XML file without recomplied your project, please put your XML file to a dll resource only (your code should be in another dll).

    1. You can use reseditor in the samples of VS .Net to make your resource from XML file. The reseditor is in:
    C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Samples\Tutorials\resourcesandlocalization\reseditor

    2. After reseditor made your resource, use Assembly Link tool to make your dll resource. The command is:
    al /t:lib /embed:"c:\a1.resources" /embed:"c:\a2.resources" /out:"c:\a.resources.dll" /fileversion:"1.0" /productv:"1.0" /comp:"Your company" /descr:"Your description" /copy:"Copyright (c) 2004" /prod:"Product ID" /v:"1.0"

    + a1.resources and a2.resources is resource file created by reseditor.

    3. Now you have a.resource.dll, you can use ResourceManager Class to read your resource. Whenever you want to change you XML file, you only need to change a.resource.dll


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now