Solved

VB.Net Error setting auto increment in assembly version

Posted on 2006-10-23
8
1,705 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

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