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

nuget package #23

Open
potatoqualitee opened this issue Oct 13, 2022 · 7 comments
Open

nuget package #23

potatoqualitee opened this issue Oct 13, 2022 · 7 comments

Comments

@potatoqualitee
Copy link

Hello! Would love a nuget package for XESmartTarget on nuget.org

merci 🍝

@spaghettidba
Copy link
Owner

I'm looking into it and it's a bloodbath.
Let me see how to do it, it might take some time

@potatoqualitee
Copy link
Author

LOL, figures

@wsmelton
Copy link

In the interim @spaghettidba if we could obtain the DLL via your releases on GitHub would help. Adding it as an asset for those of us that don't want to run the MSI to get it.

@spaghettidba
Copy link
Owner

Hey Shawn, I wish it was this simple!
I tried to create a nuget package, but it's very complicated and beyond my abilities. I read multiple guides on the topic but I'm unable to produce the package. It's something I definitely want to do, but as of now I'm stuck.
However, I think we have multiple problems here:

  1. There are two different versions for x86 and x64. I know that 99% of the time it's going to be x64, but if you include the DLL in dbatools you will have to choose which one to include, or include both.
  2. XESmartTarget has dependencies: if you don't install it, you have to take care of your dependencies by yourself.
  3. There are more dependencies that are not included in the XESmartTarget MSI, like the C++ redistributable runtime (again you have to choose the correct bitness)
    I can include the x86 and x64 DLLs in the releases page. Would that take you further, considering the points I raised?

@wsmelton
Copy link

Windows 10+ including Server OS I have not come across a generic install with any customer that some application or service has not already installed multiple C++ redistributable versions. I have no concern dealing with that dependency separate. e.g., this is my primary device, and I don't even have Visual Studio or SSMS installed on this machine:

image

The architecture side your build process should take care of that for us if you are able to get it published. When I do dotnet build and create that output path it includes both (if required) but in most cases a single DLL can be used for both architectures. Unless there is something about .NET I'm missing or just have not coded for before.

The build process you I recall VS has a build setting to automatically create a Nuget package on build. I can try testing that to see if I can get it to build and publish something to my account if needed. (I'd have to get a VM built with VS on it, what version is your project using?)

@spaghettidba
Copy link
Owner

The problem is that XESmartTarget uses native DLLs from Microsoft and they have their own x86 / x64 versions.
Regarding c++ redistributable, the native DLLs used by the Extended Events API are available only in the 2013 version: 2015 or higher will not work. I don't know why, but this is beyond my understanding.
I tried to follow that guide to build my project and create a package, but it's a legacy project (started on VS 2017) and some things don't work. It seems like nuget pack won't use SharedAssemblyInfo. I'm trying to figure out how to proceed. Not easy (at least for me)

@spaghettidba
Copy link
Owner

OK, I worked on this a bit and got two .nupkg files, one for x86 and one for x64.
I don't really know what to do with these. Could you please verify this is what you expect (see attached zip file)?
XESmartTarget.Core.1.5.3.zip

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