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 7811757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:17:00+00:00 2026-06-02T04:17:00+00:00

I have a standard class library project with a set of classes that I

  • 0

I have a standard “class library” project with a set of classes that I use to import in almost all my new projects.

The way I work is creating a new Solution with an empty project, which is my main project, and then I add to the solution the mentioned class library project, this way I can see both projects in the Soluction Explorer and even see the library code or update it if needed. Then I write the code in my main project and I compile.

This lead me to have 2 files when I compile: file *.exe and stdlib.dll

Some cases I use the lib for very small tools that I want to redistribute in a easy and clean why, so I would like to embed the stdlib.dll generated from my class library project into my *.exe file.

I’m pretty sure there must be a why to do this in my Microsoft Visual Basic 2010 Express but I don’t know how.

Any Suggestion?

  • 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-06-02T04:17:01+00:00Added an answer on June 2, 2026 at 4:17 am

    Here is a more ‘step-by-step’ version of Alex’s procedure to embedding the assembly.

    1. Add the desired assembly (stdlib.dll) to the project’s resources.
      Go to the Resources tab of the Project Properties and choose Add Resource > Add Existing File…
    2. Switch to the Application tab and click on the View Application Events button.
    3. Add this code to the ApplicationEvents.vb code that opens.

      Private Sub AppStart(ByVal sender As Object, 
        ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
          AddHandler AppDomain.CurrentDomain.AssemblyResolve, AddressOf ResolveAssemblies
      End Sub
      
      Private Function ResolveAssemblies(sender As Object, e As System.ResolveEventArgs) As Reflection.Assembly
          Dim desiredAssembly = New Reflection.AssemblyName(e.Name)
      
          If desiredAssembly.Name = "the name of your assembly" Then
              Return Reflection.Assembly.Load(My.Resources.STDLIB) 'replace with your assembly's resource name
          Else
              Return Nothing
          End If
      End Function 
      
    4. Now compile your project and you’ll have the dependent assembly incorporated into the output as a single file.

    Note that sometimes you may have the dependent assembly in the output folder. This is because VS is preconfigured to copy all dependent assemblies to the output path. You can override this by going to the References tab of the project’s properties and then set the Copy Local property of the dependent assembly to False. This will stop the assembly from being copied to the output directory.

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

Sidebar

Related Questions

i have written a library with some classes that make use of qt object
I have a standard windows server that inherits from the ServiceBase class. On the
I have a standard active record model with an attributes that is required: class
My problem: require_once '/includes/aws-sdk-1.5.2/sdk.class.php'; My environment: I have a pretty standard PHP site that
I have two Android projects, a 'library project' containing a custom layout, and an
I have standard class library infrastructure assembly which i reference in my main application.
Assume you have set of web apps that use various versions of a common
I have a solution that contains two projects. One project is an ASP.NET Web
For example: I have to use the date class in my project, but i
We have a class library, written in Java (Standard Edition or MIDP 2.0, we

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.