Got error with visual studio 2015

Dhananjay Siwach 26 Reputation points
2021-03-25T09:29:01.05+00:00

Hi,

I want use MIME lib in my project to find the file extension but when I am going to install by visual studio 2015 after install I have got following error. please help me out.

error : Invalid static method invocation syntax: "[System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux))". The type "System.Runtime.InteropServices.RuntimeInformation" is either not available for execution in an MSBuild property function or could not be found

81496-error.png

Developer technologies | .NET | Other
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,686 Reputation points Microsoft External Staff
    2021-03-25T13:53:20.263+00:00

    Hi @DhananjaySiwach-3715 ,

    Welcome to Microsoft Q&A forum.

    Looks like this issue is caused from “Mime” side, please try to contact the author of this NuGet Package.

    I suggest you try to uninstall(if you have successfully installed it) and then reinstall it again. If this issue appeared during the installation, please directly try to reinstall it again.

    Best Regards,
    Tianyu

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.