ClangSharp icon indicating copy to clipboard operation
ClangSharp copied to clipboard

ClangSharpPInvokeGenerator crashes on startup due to System.CommandLine 2.0.0.0

Open GideonUng opened this issue 3 years ago • 1 comments

installing and running ClangSharpPInvokeGenerator results in

PS C:\...\Build> ClangSharpPInvokeGenerator
Unhandled exception. System.TypeInitializationException: The type initializer for 'ClangSharp.Program' threw an exception.
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at ClangSharp.Program..cctor()
   --- End of inner exception stack trace ---
   at ClangSharp.Program.<Main>(String[] args)

GideonUng avatar Sep 20 '22 12:09 GideonUng

Seems like its missing from the tool package. I'll work to get a v15.0.1 patch up.

I expect the PrivateAssets on the package is incorrect.

tannergooding avatar Sep 20 '22 18:09 tannergooding

Fixed with v15.0.1 now on NuGet.

tannergooding avatar Sep 29 '22 02:09 tannergooding

I would ensure that the README.md is updated each time you publish a new version as I ran into this exact issue by installing using the command in the REAMDE.me which still has --version 15.0.0.

ChrisKader avatar Oct 16 '22 05:10 ChrisKader