Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

compiler help

 

Is there a way to version .dll's created using the command-line visual basic compiler, vbc?

Edited by mskeel
Posted

The solution

 

use vbc or csc to compile your code into a module and link using al by hand. During the linking phase you can change versioning, company name, description, copyrights etc...

 

an example. I have a class I want to turn into a dll, myClass.vb

 

compile

 

C:\> vbc -target:module -optimize+ -myClass.vb

 

This will output the file myClass.netmodule

 

link

 

C:\> al myClass.netmodule -target:library -fileversion:1.4.7.8 -out:mclib.dll -company:"Gott" -product:"My library with versioning"

 

You can mess with any fields you want... look at the linker help: al -?. And you can link more than one file at a time for even better modularization and configuration management...which is really what all of this is about. I guess the next question would be...make files?

  • *Gurus*
Posted

Or just apply the following attributes to your code:

<assembly:AssemblyProduct("")>
<assembly:AssemblyTitle(")>
<assembly:AssemblyCompany("")>
<assembly:AssemblyVersion("1.0.0.0")>
<assembly:AssemblyFileVersion("1.0.0.0")>
<assembly:AssemblyCopyright("Copyright (C) 2004")>

Posted

Much easier - Thanks...

 

That is a lot easier than the crazy linking combined with a batchfile for versioning libraries...

 

Also, you have to be sure to include system.reflection for these <assembly> things to work.

 

Much Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...