Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XelToCsv won't launch 1.4.9 #22

Open
mdumdei opened this issue Oct 2, 2022 · 6 comments
Open

XelToCsv won't launch 1.4.9 #22

mdumdei opened this issue Oct 2, 2022 · 6 comments

Comments

@mdumdei
Copy link

mdumdei commented Oct 2, 2022

Revision: I used gacutil /i and pushed both versions into the GAC. I had to pull down 1.9.71.2 from Nuget - at least I think I had to pull it down - didn't see that rev DLL in the download. It worked after that. I copied the XelToCsv EXE out of the folder and also had to push NLog into the GAC for it to work outside the install folder. Not sure if any of this is unexpected. Great tools - will put them to good use.

In 1.4.9, the XelToCsv doesn't run:
C:\Program Files\XESmartTarget>XelToCsv.exe

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'CommandLine, Version=1.9.71.2, Culture=neutral, PublicKeyToken=de6f01bd326f8c32' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at XelToCsv.Program.Main(String[] args)

XESmartTarget is using version 2.8.0 of the CommandLine package. I think it is causing GAC issues with the mismatch??

@IanMoroney
Copy link

IanMoroney commented Jun 9, 2023

@spaghettidba , i'm also getting a similar issue after installing 1.5.3 on windows.
I tried doing a regsvr32 on CommandLine.dll to see if it was that, but it looks like that dll doesn't need registering.

Any ideas how to solve this problem? I'm unable to run XelToCsv.exe

I added the XESmartTarget folder to the PATH.

C:\Program Files\XESmartTarget> .\XelToCsv.exe

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'CommandLine, Version=1.9.71.2, 
Culture=neutral, PublicKeyToken=de6f01bd326f8c32' or one of its dependencies. 
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at XelToCsv.Program.Main(String[] args)

@spaghettidba
Copy link
Owner

OK, I have a new release that should fix that. Sorry it took me this long
https://github.com/spaghettidba/XESmartTarget/releases/tag/v1.5.4

@mdumdei
Copy link
Author

mdumdei commented Jun 11, 2023 via email

@IanMoroney
Copy link

Info - XelToCsv.Program : XelToCsv, Version=1.5.4.0, Culture=neutral, PublicKeyToken=null 1.5.4
Info - XelToCsv.Program : Converting https://storageaccount.blob.core.windows.net/sqldbauditlogs/servername/databasename/SqlDbAuditing_ServerAudit/2023-06-32/32_36_32_254_56.xel to test22.csv
Error - XelToCsv.Program : Conversion Error
Error - XelToCsv.Program : System.ArgumentException: filename
   at Microsoft.SqlServer.XEvent.Linq.Internal.XEventFileReaderMessageHandler.NotifyInvalidParameter(XEventFileReaderMessageHandler* , UInt16* paramName, UInt64 value)
   at XE_FileReader<XE_FileReaderDefaultPolicy>.SetIsSequentialScan(XE_FileReader<XE_FileReaderDefaultPolicy>* , Int32 )   at Microsoft.SqlServer.XEvent.Linq.Internal.XEventInteropFileReader..ctor(String[] fileList, String[] mdFiles)
   at Microsoft.SqlServer.XEvent.Linq.XEventFileProvider`1..ctor(QueryableXEventData queryable, String[] fileList, String[] metadataFiles)
   at Microsoft.SqlServer.XEvent.Linq.QueryableXEventData..ctor(String fileName)
   at XESmartTarget.Core.Utils.XELFileCSVAdapter.Convert() in C:\GitHub\XESmartTarget\XESmartTarget.Core\Utils\XELFileCSVAdapter.cs:line 34
   at XelToCsv.Program.Convert(String sourceFile, String destinationFile) in C:\GitHub\XESmartTarget\XelToCsv\Program.cs:line 56
Info - XelToCsv.Program : Conversion finished at 12/06/2023 10:51:50
Info - XelToCsv.Program : 0.1550185 seconds taken

I'd expect that the response being given to XelToCsv.exe is:

<?xml
version="1.0" encoding="utf-8"?>
<Error>
    <Code>PublicAccessNotPermitted</Code>
    <Message>Public access is not permitted on this storage account.
RequestId:7c0fa3c6-d99f-4c31-993c-5325dba89ad9
Time:2023-06-12T09:55:42.0066658Z</Message>
</Error>

but maybe it's not handling that response correctly?

@IanMoroney
Copy link

When run on a local file, it worked fine this time:

xeltocsv -s testfile.xel -d test23.csv
Info - XelToCsv.Program : XelToCsv, Version=1.5.4.0, Culture=neutral, PublicKeyToken=null 1.5.4
Info - XelToCsv.Program : Converting testfile.xel to test23.csv
Info - XelToCsv.Program : Conversion finished at 12/06/2023 10:58:26
Info - XelToCsv.Program : 2.6795824 seconds taken

@spaghettidba
Copy link
Owner

Hey, thanks for the feedback! I don't think XelToCsv can read a file on a blob storage directly, I'm afraid you will have to download it first. Sorry about that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants