Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2005

Tip: Looking for answers? Try searching our database.

AssemblyVersionAttribute not shown in Windows Explorer's Deatil View

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Zdenko - 19 May 2005 08:22 GMT
Hi all,

I have following line in AssemblyInfo.cpp file:

[assembly:AssemblyVersionAttribute("4.0.4000.29")];

When I build managed application, FileVersion column in Windows explorer is
empty.
When I build C# dll, it is displayed correctly.

How can I display Assembly attributes in Windows explorer?

BR
Zdenko
Sebastian Dau - 19 May 2005 08:45 GMT
You'll have to add a FileVersionRessource manually.
Right click in your project node and select add->Ressource, choose
Version and press ok.

There will appear a file version ressource node in the ressource windows
tree view
where you can change the file version.

In C# the assembly version automatically equals the file version.
It seems to be a bug that you can transver 2 different file versions along
with 1 managed c++ assembly.

Greetings, Sebastian Dau.

> Hi all,
>
[quoted text clipped - 10 lines]
> BR
> Zdenko
Zdenko - 19 May 2005 14:32 GMT
Thanks,
I was thinking that there is ".NET" way (using AssemblyInfo.cpp).

What is the purpose of AssemblyFileAttributes if it has to be specified in
resource?

Zdenko

> You'll have to add a FileVersionRessource manually.
> Right click in your project node and select add->Ressource, choose
[quoted text clipped - 24 lines]
>> BR
>> Zdenko
Tomas Restrepo \(MVP\) - 20 May 2005 00:20 GMT
Zdenko,

> Thanks,
> I was thinking that there is ".NET" way (using AssemblyInfo.cpp).
>
> What is the purpose of AssemblyFileAttributes if it has to be specified in
> resource?

Actually, the assembly file version is not the version of the file, but of
the assembly. It's just that, for convinience, C# and VB.NET will generate a
version resource with the same number for the executable (C++ currently does
not). But even on those, you can change the version number on the file to
make it different from the assembly file version via the
AssemblyInformationVersionAttribute (I think that's the name)

Signature

Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/

Sebastian Dau - 20 May 2005 14:01 GMT
Could you explain how to carry different file and assembly versions
in c# assemblies? We are very interested in this since we use this "feature"
for our mananged c++ assemblies.

Could you give me a more detailed advice Tomas?

Thanks in advance! Sebastian Dau

> Zdenko,
>
[quoted text clipped - 10 lines]
> file to make it different from the assembly file version via the
> AssemblyInformationVersionAttribute (I think that's the name)
Tomas Restrepo \(MVP\) - 21 May 2005 03:27 GMT
Sebastian,

> Could you explain how to carry different file and assembly versions
> in c# assemblies?

For C# assemblies, it is easy. The following sets the assembly version to
1.1.0.0 and the file version to 1.1.0.3222:

[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyInformationalVersion("1.1.0.3222")]

This is actually very similar to what the .NET framework assemblies do
(notice that all have a different assembly and file versions). Keep in mind,
though, that the file version is *not* taken into account by the .NET
runtime for component versioning.

> We are very interested in this since we use this "feature"
> for our mananged c++ assemblies.

Well, for that just use [AssemblyVersion] to set the assembly version and a
FIleVersion resource for the rest.

Signature

Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/

Sebastian Dau - 24 May 2005 07:54 GMT
Hello Tomas,

thanks for your response it appears to be exactly what I was looking for.
The man C++ way was known but non of us was aware of the
AssemblyInformationalVersion.

Thanks in advance, Sebastian Dau

> Sebastian,
>
[quoted text clipped - 17 lines]
> Well, for that just use [AssemblyVersion] to set the assembly version and
> a FIleVersion resource for the rest.
Sebastian Dau - 25 May 2005 12:43 GMT
Tomas,

in addition I'd like to let you know that the file version for c# assemblies
is not set through the AssemblyInformationalVersionAttribute but with the
AssemblyFileVersionAttribute.

Anyway, you did guide me into the right direction.
Thanks again! Sebastian Dau

> Sebastian,
>
[quoted text clipped - 17 lines]
> Well, for that just use [AssemblyVersion] to set the assembly version and
> a FIleVersion resource for the rest.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.