-
Notifications
You must be signed in to change notification settings - Fork 46
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
Consume rules from a Nuget package #569
Comments
Do they need to be next to the |
They need to be in the same folder as the
That would be amazing! |
NuGet/Home#6301 seems helpful |
This also could be useful? https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#generatepathproperty (if the rules package contains the rules dll in the tools folder?) |
I guess we can define what we want to those "rules" packages to look like internally, so it shouldn't be an issue to put the rules assembly into the tools folder. We are also defining what "dacpac" packages look like and if I'm not mistaking we also put the |
Yes, I noticed that the .dacpac files are also in the tools folder, so we could potentially take advantage of the automatic property that points to it these days. |
We are using that already for resolving the PackageReference to the actual
|
Ah! Just proves how bad I am at MsBuild 😄 |
It is definitely not for the faint of heart ;), although I believe the documentation has improved a bit compared to a couple of years ago when you could barely find any. I could probably throw something together for this, but I'm fairly pressed for time at the time so I don't really know when I'll get around to it. |
@jmezach FYI - microsoft/DacFx#479 |
So I guess what we need to do is gather the paths of referenced analyzer packages within MSBuild and then pass that through to this property. |
Correct, hoping for some help with the msbuild part. 😅 |
Could it be as simple as this?
|
I guess that depends on what is in |
Let me try to give it a go, and I will find out 😅 |
Looks like it just works!!! I just need to repackage my rules nuget to target netstandard2.0 :-(
|
I cannot target netstandard2.0 with my rules assembly, as DacFX only supports netstandard2.1 and net6.0 |
What happens if you target |
@jmezach I will try that next! |
@jmezach @jeffrosenberg Do you think this could be possible in any way?
(The NuGet content must be extracted and copied to the SDK NuGet package tools folder before we run dacpactool)
The text was updated successfully, but these errors were encountered: