locked
Deployment Project and build version munbers RRS feed

  • Question

  • User-1087475003 posted

    Hi all,

     For my asp.net project I added a Web Deployment project and all work just perfectly expect that i can't increment build version like I would.

    In the "Output Assemblies" section I selected "Merge All output to a single assembly" and the new .dll is welll created . If I specify an assembly version number like 1.0.0.0, my dll will have these numbers. But what I would like right now is a way to manage this assembly numbers like with an incremental way or with the day of build.

     

     

    Tuesday, April 17, 2007 1:13 PM

Answers

All replies

  • User1754323106 posted
    i'd like to know that. it's pretty painful right now for me as I'm doing that maunally and at the end, I was too annoyed and now I'monly doing that for major releases.
    Tuesday, April 17, 2007 4:22 PM
  • User-1087475003 posted

    That's exactly want i DONT want to do !

    Is there a way of setting build number like 1.0.1.*  ?

    Or 1.0.1.(yyyyMMdd) or somthing like that ?

     

    Tuesday, April 17, 2007 5:05 PM
  • User-2066418186 posted

    To version a web deployment project, simply place the following code in the web.config file of the web project:

     <configuration>
      <system.codedom>
        <compilers>
          <compiler language="c#;cs;csharp" extension=".cs"
            type="Microsoft.CSharp.CSharpCodeProvider, System,
          Version=2.0.3600.0, Culture=neutral,
          PublicKeyToken=b77a5c561934e089" warningLevel="0"
            compilerOptions="[PATH]\AssemblyInfo.cs" />
        </compilers>
      </system.codedom>
    </configuration>

     Then, replace [PATH] with the location of your AssemblyInfo file. Ensure the warningLevel is only set to 0, if you set it any higher, you will get a Non CLS-Compliant error. Perhaps someone from microsoft can inform me if it is possible to alter the default naming schemes of the internal '__ASP' naming schema to create the component to be CLS-Compliant.

     
    Cheers.

     

    Tuesday, May 1, 2007 4:36 AM
  • User2911668 posted

    Hi,

    I tried using your solution. first of all it gave me errors for all the lines in assemblyinfo.cs file. When I commented those, I get version number as 0.0.0.0 when I try to print

    Assembly.GetExecutingAssembly().GetName().Version

    Let me know how I can use this. 

     

    Thursday, May 10, 2007 12:22 PM
  • User-563238995 posted

    This may be what you're looking for:

     http://weblogs.asp.net/bradleyb/archive/2005/12/02/432150.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, June 10, 2007 11:32 PM