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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:31:03+00:00 2026-05-21T07:31:03+00:00

I have a C# project which when compiled on different machines generate dlls which

  • 0

I have a C# project which when compiled on different machines generate dlls which are not binary equal. So my question is why the generated dlls are different? and is there some way to get exactly same dll generated on different machines?

EDIT
Here is what i am trying to do. There are multiple client machines which get some code snippet from a server and compile it. After the dll is compiled, it get used over and over again on the client. If I could have the same DLLs generated on all machines then I can easily check that the DLL is not tampered with on the client side using cryptographic hash.

For some reasons the code has to be compiled at the client machine. Therefore digital signing is not an option.

  • 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-21T07:31:04+00:00Added an answer on May 21, 2026 at 7:31 am

    You cannot expect binaries to be same for any file recreated – let alone assemblies. All document metadata including data created, date modified will be different.

    If you need to compare, you need to sign the assembly (strong naming) and compare the public key token plus assembly version.


    UPDATE

    What you are doing is asking for trouble although I can understand sometimes this has to be done. If I were you, I would compile the binary on server and get the clients to download the binary and not the code. At the end of the day, clients might not have the C# compiler on their machine.

    To answer your question, if you insist on compiling on client, everytime you compile, create a local hash and store in registry, some file, etc and then compare that hash.


    UPDATE 2

    C# compiler never guarantees that it is going to create the same binary. Many things are created at the compiled time for example naming anonymous functions, backing value for automatic properties, anonymous methods, internal GUIDs… all of these will be created at compile time and while compiler uses a naming convention which names end up usually the same, it is not guaranteed.

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

Sidebar

Related Questions

I have a project which has a set of binary dependencies (assembly dlls for
I have a large C++ project, different parts of which are compiled in different
I have a project which contains different components that everyone works on. We have
I have a project which exposes object model to use by different types of
I have a project which has some post build events that do some copying
I have a program, which uses quickreports 5 to generate some reports. The program
I have a WPF project which compiles just fine. However, when I enable code
I have a project which is source controlled using Subversion and VisualSVN. Since the
I have a project which it's domain contain following classes: Courier Customer Food Order
I have a project which builds correctly from the command line. On one of

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.