none
Console App creates a dll - ??? RRS feed

  • Question

  • I created this Console App

    Option Strict On
    Imports System
    Imports System.Diagnostics
    
    Module Program
        Sub Main(args As String())
    
            Dim Robo As String = "C:\Windows\System32\robocopy.exe"
            If args.Count > 0 AndAlso IO.File.Exists(args(0)) Then
                Robo = args(0)
            End If
            If IO.File.Exists(Robo) Then
                Console.WriteLine("Examining " & Robo & Environment.NewLine)
                Console.WriteLine("File Information:")
                With FileVersionInfo.GetVersionInfo(Robo)
                    Console.WriteLine("Version = " & .FileVersion)
                    Console.WriteLine("Major   = " & .FileMajorPart.ToString)
                    Console.WriteLine("Minor   = " & .FileMinorPart.ToString)
                    Console.WriteLine("Build   = " & .FileBuildPart.ToString)
                    Console.WriteLine("Private = " & .FilePrivatePart.ToString)
                    Console.WriteLine()
                    Console.WriteLine("Product Information:")
                    Console.WriteLine()
                    Console.WriteLine("Version = " & .ProductVersion)
                    Console.WriteLine("Major   = " & .ProductMajorPart.ToString)
                    Console.WriteLine("Minor   = " & .ProductMinorPart.ToString)
                    Console.WriteLine("Build   = " & .ProductBuildPart.ToString)
                    Console.WriteLine("Private = " & .ProductPrivatePart.ToString)
                End With
    
            Else
                Console.WriteLine("No file found to analyze")
            End If
            Console.WriteLine("Done, press ENTER")
            Console.ReadLine()
        End Sub
    End Module
    

    After the Build I see this in the folder:

     Directory of C:\Users\devon\source\repos\FileVersion\bin\Release\netcoreapp3.0
    
    10/28/2019  09:12 AM    <DIR>          .
    10/28/2019  09:12 AM    <DIR>          ..
    10/28/2019  06:48 AM               425 FileVersion.deps.json
    10/28/2019  09:26 AM             6,144 FileVersion.dll
    10/28/2019  09:26 AM           159,744 FileVersion.exe
    10/28/2019  09:26 AM               788 FileVersion.pdb
    10/28/2019  06:48 AM               236 FileVersion.runtimeconfig.dev.json
    10/28/2019  06:48 AM               154 FileVersion.runtimeconfig.json

    Is the creation of a dll file new? 
    I also wonder why there is a mismatch on some programs, like robocopy -

    Examining C:\Windows\System32\robocopy.exe File Information:

    Version = 10.0.18362.1 (WinBuild.160101.0800) Major = 6 Minor = 2 Build = 18362 Private = 1 Product Information: Version = 10.0.18362.1 Major = 10 Minor = 0 Build = 18362 Private = 1 Done, press ENTER



    Monday, October 28, 2019 4:40 PM

Answers

All replies

  • > I also wonder why there is a mismatch on some programs.

    It's not a mismatch.  The robocopy utility is at version 6.2, but it's part of the product "Windows 10" which is 10.0.18362.


    Tim Roberts | Driver MVP Emeritus | Providenza &amp; Boekelheide, Inc.

    Monday, October 28, 2019 5:02 PM
  • What confuses me is that the "full" file version shows as 10.0.18362.1 but the individual file version parts do not.
    Monday, October 28, 2019 5:13 PM
  • You are aware that you created a Net Core application and not a .Net one.


    Success
    Cor

    • Marked as answer by Devon_Nullman Monday, October 28, 2019 11:03 PM
    Monday, October 28, 2019 5:42 PM
  • No, but I am now - thank you Cor.
    Monday, October 28, 2019 7:27 PM