.NET Standard 1.2 - FileVersionInfo does not exist

0

Follow the code below:

public static string GetVersion()
{
    return FileVersionInfo
                     .GetVersionInfo(Assembly.GetExecutingAssembly().Location)
                     .ProductVersion;
}

I get error:

  
  • CS0103 The name "FileVersionInfo" does not exist in the current context
  •   
  • CS0117 "Assembly" does not contain a definition for "GetExecutingAssembly"
  •   

    I returned .NetStandard with the older version and get the above errors.

    Is there another alternative to get the package version?

        
    asked by anonymous 20.11.2018 / 16:13

    0 answers