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

  • Home
  • SEARCH
  • 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 8436615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:13:37+00:00 2026-06-10T07:13:37+00:00

I have a GUID in my assembly information that is auto created when the

  • 0

I have a GUID in my assembly information that is auto created when the project is created.
The current system requires a matching GUID on the database so it can identify the solution.

(Yeah, it’s VB.net)

 <Assembly: Guid("43aca7cb-9360-4642-adc5-6d29b4732bed")> 

What I’m doing is manually copying this GUID into the webconfig as a Setting for the solution, which adds it to the Settings.Designer.vb file.

Ala

  <setting name="ApplicationId" serializeAs="String">
    <value>43aca7cb-9360-4642-adc5-6d29b4732bed</value>
  </setting>

From there it get’s passed on to the database or wherever. It’s not much hassle to do this, and the GUID shouldn’t ever change, but I can’t help but think it would be tidier if I didn’t have to copy the GUID string in each Solution, but had something that referenced the Assembly value directly.

Is this possible?

Thanks for any info.

  • 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-10T07:13:38+00:00Added an answer on June 10, 2026 at 7:13 am

    Something like:

     var assemblyName = "System"; // assembly to get the guid
    
     var assembly = AppDomain.CurrentDomain
            .GetAssemblies()
            .FirstOrDefault(a => a.GetName().Name == assemblyName);
    
     var attr = assembly
            .GetCustomAttributes(false)
            .OfType<GuidAttribute>()
            .FirstOrDefault();
    
     var guid = attr.Value;
    

    But IMO seems better to keep the guid in the web.config, because it is “hard coded” there.

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

Sidebar

Related Questions

Hi I have a project that was created in a previous version to 3.5.
Ok I have a GUID f5cc4100-f1b4-4af6-9e9e-224b0eb74166 and I am inserting it to MySQL database
I feel like GUID/UUID questions have been done to death here, but I can't
I have the code that reflects enum (DictionaryType) option to Guid in very straight-forward
If I right click my project and look up Assembly Information... in Properties, there
I have assembly A that depends (statically) on type T (reference type, a class)
I need to access the assembly of my project in C#. I can see
I have an InteropUserControl in a .NET assembly that works fine in other operating
I have a project that uses a few 3rd party DLLs, and am working
i have created a table where i used unique identifier(GUID) as a primary key

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.