MicroRuleEngine icon indicating copy to clipboard operation
MicroRuleEngine copied to clipboard

NuGet package missing assembly

Open mguinness opened this issue 4 years ago • 4 comments

Thanks for creating a great library. I tried to use the NuGet package at https://www.nuget.org/packages/MRE/ but it doesn't include an assembly (only the source code) which limits it's usability. Can a new package be published that includes an assembly? Thanks in advance.

mguinness avatar Jan 22 '21 05:01 mguinness

I think this can be achieved by modifying CreatePackage.bat to below. I have an ASP.NET Core project that I'd like to include this in and I think there would be others that would find this useful too. I'll share the repo here after it's created as it demonstrates the power of BRE in an application and might help popularize this excellent library.

mkdir lib
mkdir lib\net461
mkdir lib\netstandard2.1
mkdir content
mkdir content\MRE

copy ..\MicroRuleEngine\bin\Release\net461 lib\net461
copy ..\MicroRuleEngine\bin\Release\netstandard2.1 lib\netstandard2.1
copy ..\MicroRuleEngine\MRE.cs content\MRE

nuget pack MRE.nuspec -Exclude *.bat
nuget push MRE.1.0.4.nupkg -Source https://api.nuget.org/v3/index.json
pause

mguinness avatar Jan 22 '21 22:01 mguinness

@runxc1 Another option is to Publish NuGet package with GitHub Actions instead of using a batch file. One benefit would be that updated packages can be pushed to NuGet by repo contributors if you are busy/unavailable.

mguinness avatar Jan 25 '21 19:01 mguinness

So I wouldn't be opposed to having a separate Nuget that contains a compiled version of the MRE for those that need it but probably wouldn't want to alter the current package.

runxc1 avatar Jan 27 '21 16:01 runxc1

Thanks for your reply. I've just asked the package owner of MicroRuleEngine (which is no longer used) if they would add another owner so that a new package can be published there.

Could you explain how the existing package is used? My understanding it that the initial install copies the MRE.cs file into the project, but doesn't for subsequent package updates.

I tried this using VS 2019 in a new .NET Core project, but the MRE.cs was never copied into the project - it appears a NuGet change for Content Files stops this from happening?

mguinness avatar Jan 27 '21 19:01 mguinness