This project is read-only.

NuGet package?

Topics: Developer Forum, Project Management Forum
Nov 23, 2011 at 11:49 PM
Edited Dec 30, 2011 at 12:54 AM

I am using Scintilla.NET in one of my project and I though that it would be extremely convenient if there was a NuGet Package for Scintilla.NET. Would that be possible to create such a package?

Apr 20, 2012 at 6:57 PM

Agreed. With Nuget, first time install and subsequent updates becomes child's play! +1 for this!

Sep 6, 2012 at 2:46 PM

PLEASE add a Nuget package for this!

Sep 6, 2012 at 7:28 PM

I've looked into this before but ran into a problem with referencing the native SciLexer.dll library. In our installation documentation we instruct our users to add the location of the SciLexer.dll to their path. Last I checked NuGet was not able to make that kind of change out of the box.

Can someone confirm?

 

Thanks,
Jacob

Sep 10, 2012 at 12:31 PM

Jacob - I don't think I fully understand. With nuget packages everything should be local, i.e. the scintillanet.dll as well as SciLexer.dll should both be placed in a local directoy (following Nuget's package convetion 'packages/Scintilla.NET' - or anything similar). ScintillaNet.dll should be referenced automatically by Visual Studio.

Sep 11, 2012 at 5:11 PM

Everything you said is correct but there is an additional step required for developing with ScintillaNET--that is adding the SciLexer.dll to your search path. By default VS will not look in the 'packages/Scintilla.NET' (or similar) directory for unmanaged libraries (like SciLexer.dll) because VS doesn't run from that directory.

The SciLexer.dll has to be loaded into the VS process when developing otherwise when you attempt to drop the Scintilla control onto your Form designer you'll get a nasty error. Put another way, this is a limitation with the way VS finds DLLs, not with NuGet or managed .NET assemblies.

That is why the instructions in our documentation (linked above) are to add the library path to your environment.

I would love some help if you would like to experiment with it.

 

Thanks,
Jacob 

Sep 30, 2012 at 12:26 PM

Thank you for clarification. Now I think I understand what could the problem be. I will experiment with it and if I come with some solution - I will definitely let you know about it.

Thanks,
Maciej

Oct 15, 2014 at 3:32 PM
Hi

you can realize your nuget package anyway. When you create a nuget package, you can specify a folder where your lexer files are. This folder will be included into the nuget package. When a client references the Nuget ScintillaNET package only the scintillanet.dll will be referenced. Developer then have to create a post-build definition (e.g. copy "$(ProjectDir)..\packages\ScintillaNET.2.6.0.0\runtime\SciLexer.dll" "$(TargetDir)") to copy the correct lexer from the extracted nuget package.


A possible nuget spec could look like this:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
    <metadata>
        <id>ScintillaNET</id>
        <version>2.6.0.0</version>
        <authors>see: https://scintillanet.codeplex.com/team/view</authors>
        <licenseUrl>https://scintillanet.codeplex.com/license</licenseUrl>
        <projectUrl>https://scintillanet.codeplex.com/</projectUrl>
        <requireLicenseAcceptance>false</requireLicenseAcceptance>
        <description>ScintillaNET is a powerful text editing control for Windows Forms applications and a managed wrapper around the versatile Scintilla component.</description>
    </metadata>
    <files>
        <file src="lib\ScintillaNET.dll" target="lib\ScintillaNET.dll" />
        <file src="lib\ScintillaNET.pdb" target="lib\ScintillaNET.pdb" />
        <file src="lib\ScintillaNET.xml" target="lib\ScintillaNET.xml" />
        <file src="lexer\SciLexer.dll" target="lexer\SciLexer.dll" />
        <file src="lexer\SciLexer64.dll" target="lexer\SciLexer64.dll" />
    </files>
</package>
Jan 30, 2015 at 2:19 PM
Holy thread necro, batman! Anyways... don't forget 32 / 64-bit issues, not sure how that's covered in the example above.

I would like to see this on NuGet just to keep distribution of the OSS project I work on simpler.

Awesome project; thanks much!
Jan 31, 2015 at 11:45 PM
For anyone who comes across this thread in the future, you should know that I've figured out a way to package ScintillaNET as a NuGet package (including the unmanaged DLLs we need to distribute), however, there is already a package named "ScintillaNET" in the NuGet repository that is NOT maintained by us. I've attempted to work with the NuGet team to get this package removed or control of it given to us. You can follow the discussion here: https://nuget.codeplex.com/discussions/562170.

Jacob
Mar 9, 2015 at 2:57 AM
Edited Mar 9, 2015 at 3:08 AM
This is being tracked as workitem #33096.

If possible could you please release a final .NET 2 version including the new functionality babysitting the unmanaged DLLs... I submitted a patch (patch ID 17310) with the few minor tweaks I needed.
Apr 29, 2015 at 6:48 AM
Development of ScintillaNET has moved to GitHub and NuGet is now supported:
https://github.com/jacobslusser/ScintillaNET