ReSharper nuget plugin size limitation?

Hi,

I have a question regarding ReSharper plugins in form of nuget packages. Is there a limitation on the size for nuget packages that can be uploaded to the ReSharper gallery? I'm trying to upload a nuget package for YouCantSpell, but the upload doesn't work. The package size is ~16 MB and the upload always stops somewhere between 70% and 80% with a server error ("502 - Web server received an invalid response while acting as a gateway or proxy server.").

Thanks,
Markus

3 comments
Comment actions Permalink

Hi Markus!

There are no limits for package size.
Did you try to upload package from another network?
Did you try upload it by nuget push command?

Slava.

0
Comment actions Permalink

Hi,

you were right. Apparently it was an issue on my end (which is weird, as I did not encounter any such issues the last couple of years).
But I tried the upload from another location and it worked without any problems. So thanks for the suggestion of trying another network.

Bye,
Markus

0
Comment actions Permalink

Glad it's working. File size wasn't really considered when designing extensions, and zip doesn't handle multiple copies as well as you'd expect (I'd have thought it would recognised that the files are exactly the same and compressed them smarter).

Here's something you could try - put the version specific assemblies in the v8.x\plugins folders, and put all of the other files in vAny\plugins. This means you only have one copy of the dictionary and business logic dlls, which will significantly reduce the size of the package. I haven't tried this, so can't promise it will work, but ReSharper *should* be able to load the plugin correctly. A "plugin" is a set of files, and when we get the files from the extension package, we get all files from a set of paths within the package, from most specific version down to the files in vAny\plugins. So, ReSharper should still get the list of all assemblies as a single "plugin", and it should be able to load correctly. You'll need to ensure that the dictionary can be loaded - if it's being loaded with a relative path, perhaps loading it relative to the version independent assembly.

Another alternative to reducing file size could be to have multiple packages, one core package with just the plugin, and other packages for the dictionaries. Each dictionary package would depend on the plugin library, so would ensure that the plugin was loaded, and it would allow the user to have just the dictionaries they require. Finding the dictionaries would be a little trickier - in your plugin, you would subscribe to the observable collection of extensions, and ask each extension for any files in the package under the "YouCantSpell" folder. Most will return an empty list, but your dictionary packages could return the appropriate files.

Just some ideas...

Matt

0

Please sign in to leave a comment.