Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. making auto serial number for each build of project

making auto serial number for each build of project

Scheduled Pinned Locked Moved C#
visual-studioquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kasraa00098000
    wrote on last edited by
    #1

    hi all, as I titled i'm going to make serial number or an special uniqe number for my project by every exe that I build of it, is there any way to make it dynamically? especialy in msbuild command?

    realJSOPR T 2 Replies Last reply
    0
    • K kasraa00098000

      hi all, as I titled i'm going to make serial number or an special uniqe number for my project by every exe that I build of it, is there any way to make it dynamically? especialy in msbuild command?

      realJSOPR Offline
      realJSOPR Offline
      realJSOP
      wrote on last edited by
      #2

      I found this with google: http://carso-owen.blogspot.com/2007/02/custom-serial-number-generator-in-c-net.html[^]

      .45 ACP - because shooting twice is just silly
      -----
      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

      J 1 Reply Last reply
      0
      • realJSOPR realJSOP

        I found this with google: http://carso-owen.blogspot.com/2007/02/custom-serial-number-generator-in-c-net.html[^]

        .45 ACP - because shooting twice is just silly
        -----
        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

        J Offline
        J Offline
        Jason Vetter
        wrote on last edited by
        #3

        System.Guid.NewGuid.ToString.ToUpper

        realJSOPR 1 Reply Last reply
        0
        • K kasraa00098000

          hi all, as I titled i'm going to make serial number or an special uniqe number for my project by every exe that I build of it, is there any way to make it dynamically? especialy in msbuild command?

          T Offline
          T Offline
          Tony Richards
          wrote on last edited by
          #4

          Would a unique assembly version number do the job? You can get one using:

          [assembly: AssemblyVersion("1.2.*.*")]

          See here for how the numbers are generated: http://msdn.microsoft.com/en-us/library/system.reflection.assemblyversionattribute.assemblyversionattribute(v=VS.71).aspx[^]

          1 Reply Last reply
          0
          • J Jason Vetter

            System.Guid.NewGuid.ToString.ToUpper

            realJSOPR Offline
            realJSOPR Offline
            realJSOP
            wrote on last edited by
            #5

            Yeah, I know, but the various parts of the serial may have special meaning. Since the OP didn't specify that, I thought I'd demonstrate that *anyone* can use google.

            .45 ACP - because shooting twice is just silly
            -----
            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups