Solved

VB.Net Error setting auto increment in assembly version

Posted on 2006-10-23
8
1,688 Views
Last Modified: 2008-02-07
Hi All,

I get this error when setting the assembly version to autoincrement in vs2005.

the AssembyInfo.vb file has the following:

<Assembly: AssemblyVersion("1.0.0.*")>
<Assembly: AssemblyFileVersion("1.0.0.*")>

The error (warning) is:


Warning      3      Possible problem detected while building assembly 'ATMS': The version '1.0.0.*' specified for the 'file version' is not in the normal 'major.minor.build.revision' format      
0
Comment
Question by:nzfire
  • 4
  • 4
8 Comments
 
LVL 13

Expert Comment

by:newyuppie
ID: 17793497
is your assembly strong named?
0
 
LVL 1

Author Comment

by:nzfire
ID: 17799014
Hi newyuppie,

Am new to .Net and this will be my first major app in vb.net, so excuse the ignorance, but please could you give me a bit of a run-down on strongly naming an assembly. I've heard of it, but don't know how it works.

Thanks
0
 
LVL 1

Author Comment

by:nzfire
ID: 17799256
Hi Again All,

I have read up on strong assemblies, naming and signing and have signed my assembly.

I still get the error.

By the way, if I go into Sign the Assembly and create a new key from the option to create a key or browse for a key, a dialog box appears which allows you to name the key and set the password.

In that dialog box, the fields are enabled, but I cannot type anything in there, but the paste function works. ???? Any ideas?

Thanks again
0
 
LVL 13

Expert Comment

by:newyuppie
ID: 17799351
if you are using vb2005 its actually very easy. you need to go to project properties (rightclick on the prohect name on the SOlution Explorer to the right and select properties).

on this new window, on your left you get different panes. go to the Signing pane and check "Sign the assembly". Then on the dropdown list select <New...> and create a new key with a password you provide. then save and compile. see if this resolves the assembly version issue.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Author Comment

by:nzfire
ID: 17799392
Yep, done that again and this time specified one with a password, but still get the same warning.

I am wondering if it is something to do with the format of the version string.

Here is the bit of the assemblyinfo.vb file

' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.0.0.*")>
<Assembly: AssemblyFileVersion("1.0.0.*")>

<Assembly: NeutralResourcesLanguageAttribute("en-NZ")>
0
 
LVL 13

Accepted Solution

by:
newyuppie earned 500 total points
ID: 17799522
yeah apparently AssemblyFileVersion does not do well with *
nevertheless, you can use the * thing in AssemblyVersion without problems. and from what i understand, AssemblyFileVersion defaults to AssemblyVersion, so maybe you can remove the <Assembly: AssemblyFileVersion("1.0.0.*")> alltogether and only keep the <Assembly: AssemblyVersion("1.0.0.*")>.

does that help?


from MSDN documentation "Understanding and Using Assemblies and Namespaces in .NET"
Table 1. Standard assembly attributes

Attribute Meaning
AssemblyCompany Company shipping the assembly
AssemblyCopyright Copyright information
AssemblyCulture Enumeration indicating the target culture for the assembly
AssemblyDelaySign True to indicate that delayed signing is being used
AssemblyDescription Short description of the assembly
AssemblyFileVersion String specifying the Win32 file version. Defaults to the AssemblyVersion value.
AssemblyInformationalVersion Human-readable version; not used by the common language runtime
AssemblyKeyFile Name of the file containing keys for signing the assembly
AssemblyKeyName Key container containing a key pair to use for signing
AssemblyProduct Product Name
AssemblyTitle Friendly name for the assembly
AssemblyTrademark Trademark information
AssemblyVersion Version number expressed as a string.

You can also define your own custom attributes by inheriting from the System.Attribute class. These attributes will be available in the assembly manifest just like the attributes listed above.

0
 
LVL 1

Author Comment

by:nzfire
ID: 17799547
Newyuppie,

Warning is GONE!! Done by commenting out the <Assembly: AssemblyFileVersion("1.0.0.*")>

Thanks a million. I've learnt a lot from a silly little thing like that!
0
 
LVL 13

Expert Comment

by:newyuppie
ID: 17799574
glad it worked out! i learn a lot too from researching for little things too!
thanks for the grade

NY
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 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

19 Experts available now in Live!

Get 1:1 Help Now