Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 692361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:38:34+00:00 2026-05-14T02:38:34+00:00

I’d like to build an MSI installer that installs a managed DLL and makes

  • 0

I’d like to build an MSI installer that installs a managed DLL and makes it accessible to users from Visual Studio’s “Add References” menu in Solution Explorer. I believe I am supposed to add a key into the Windows registry but I cannot see how to tell the VS project for the MSI to do this at install.

How is this done and where should I look for tutorials on this kind of thing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:38:34+00:00Added an answer on May 14, 2026 at 2:38 am

    Go to the following registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders
    

    Add a subkey (the name of which doesn’t matter, but might as well be descriptive) whose default value is the folder containing your assemblies, and you should be good to go.

    How to add the required key using WiX

    This is a stripped-down fragment of WiX code for creating the required key and setting its default value to the folder in which your assemblies were installed. This is not a complete WiX installer and cannot be pasted directly — I have removed Guid attributes and shown only the Directory, Component and Feature declarations. Once you’ve seen some complete WiX code it should be reasonably clear how to merge these bits in.

    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
      <!-- Path from WiX file to the DLL(s) you're installing -->
      <?define BuildPath="..\Bin\Release" ?>
      <!-- The base key path - note no HKLM -->
      <?define AssemblyFolders = "Software\Microsoft\.NETFramework\AssemblyFolders" ?>
    
      <Product>
        <Directory Id="TARGETDIR" Name="SourceDir">
          <Directory Id="ProgramFilesFolder">
            <Directory Id="CompanyFolder" Name="YourCompany">
              <Directory Id="INSTALLLOCATION" Name="Your Product">
                <!-- Id="AssemblyFolder" captures the location where the DLL gets installed -->
                <Directory Id="AssemblyFolder" Name="Bin">
                  <Component Id="AssemblyComponent">
                    <!-- This is the bit that copies the assembly file -->
                    <File Id="YourDll.dll" Checksum="yes" Source="$(var.BuildPath)YourDll.dll" />
                  </Component>
                  <Component Id="ControlRegistrationComponent">
                    <!-- This is the bit that creates the registry key -->
                    <RegistryKey Action="createAndRemoveOnUninstall" Root="HKLM" Key="$(var.AssemblyFolders)\Your Product Name">
                      <!-- Square brackets result in a reference -- so the install folder gets picked up -->
                      <RegistryValue Action="write" Value="[AssemblyFolder]" Type="string" />
                    </RegistryKey>
                  </Component>
                </Directory>
              </Directory>
            </Directory>
          </Directory>
        </Directory>
    
        <Feature Id="PRODUCTROOTFEATURE">
          <!-- This causes the assembly to be installed -->
          <ComponentRef Id="AssemblyComponent" />
          <!-- This causes the registry key to be created -->
          <ComponentRef Id="ControlRegistrationComponent" />
        </Feature>
    
      </Product>
    </Wix>
    

    To build the MSI once you’ve got a full WiX script, you can use a batch file, the core of which looks like this:

    candle.exe "%WXS_NAME%.wxs" -out "%WXS_NAME%.wixobj"
    light.exe "%WXS_NAME%.wixobj" -out "%WXS_NAME%.msi"
    

    where %WXS_NAME% is the name of the WiX .wxs source file.

    (I realise this probably looks a bit cryptic but (a) there are lots of WiX samples, tutorials and reference material out there to help you get started and (b) the Votive add-in for Visual Studio may shield you from some of the guts anyway.)

    To automatically build the MSI, use the Votive add-in (part of WiX), or a post-build step, or a MSBuild build script. We use a build script because we usually want to build the MSI only as part of our automated build — doing it in a post-build step would slow down development builds — but your mileage may vary.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.