Getting this website dll version

Posted on 2006-03-27
Last Modified: 2008-02-01
Hi All!

Using 1.1 i did:
                        Version ver = Assembly.GetExecutingAssembly().GetName().Version;
                        lbVersion.Text = ver.Major + "." + ver.Minor + "." + ver.Build;

but in 2.0 it results in "0.0.0"

one thing that i could note is the name of the dll. this is a random name. not the name that i normally use.

Any ideas?
Question by:FLUXWIRE
    LVL 22

    Expert Comment

    See if this link is helpful:

    -- Jason

    Author Comment

    Nop. It looks like a solution but in a normal web project into vs2005 there is a assemblyinfo.cs file inside the Properties folder. If you click in the project property pages , you can manipulate the version number.

    As i convert the system from vs2003 to vs2005, the assemblyinfo.cs is moved to App_Code folder and i could not put it into the compilerOptions. The compiler did not find it.

    I try to put the assemblyinfo.cs into many places, but i got the "not found" in the compilation.


    Author Comment


    To be used as solution for this question.

    This problem was solved with the new visual studio template, the web application project. With this template, the assemblyinfo works like 1.1.


    Accepted Solution

    PAQed with points refunded (500)

    Community Support Moderator

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Join & Write a Comment

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now