Giter Site home page Giter Site logo

mono / mono-addins Goto Github PK

View Code? Open in Web Editor NEW
164.0 34.0 92.0 4.44 MB

Mono.Addins is a generic framework for creating extensible applications, and for creating add-ins which extend those applications.

License: MIT License

C# 99.65% Roff 0.18% Shell 0.17%

mono-addins's Introduction

Mono.Addins is a framework for creating extensible applications, and for creating libraries which extend those applications.

Mono.Addins has been designed to be easy to use and useful for a wide range of applications: from simple applications with small extensibility needs, to complex applications which need support for large add-in structures.

The main features of Mono.Addins are:

  • Supports descriptions of add-ins using custom attributes (for simple and common extensions) or using an xml manifest (for more complex extensibility needs).
  • Support for add-in hierarchies, where add-ins may depend on other add-ins.
  • Lazy loading of add-ins.
  • Provides an API for accessing to add-in descriptions, which will allow building development and documentation tools for handling add-ins.
  • Dynamic activation / deactivation of add-ins at run time.
  • Allows sharing add-in registries between applications, and defining arbitrary add-in locations.
  • Allows implementing extensible libraries.
  • Supports add-in localization.
  • In addition to the basic add-in engine, it provides a Setup library to be used by applications which want to offer basic add-in management features to users, such as enabling/disabling add-ins, or installing add-ins from on-line repositories.

Building

Open Mono.Addins.sln and build.

Documentation

Extensive documentation is available in this project's wiki.

mono-addins's People

Contributors

alanmcgovern avatar alanyog avatar davidkarlas avatar dependabot[bot] avatar directhex avatar diva avatar garuma avatar jbevain avatar jpobst avatar jstedfast avatar kirillosenkov avatar knocte avatar lukaszunity avatar manish avatar mdh1418 avatar mhutch avatar mikkeljohnsen avatar mkestner avatar mrward avatar netonjm avatar philantrop avatar radical avatar robpvn avatar sandyarmstrong avatar sevoku avatar slluis avatar terrajobst avatar therzok avatar vargaz avatar weltall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mono-addins's Issues

Compilation error

Hi,

I would like to compile mono-addins as it is a requirement of Monodevelop.

It gives me the following compilation error after executing commands:

git clone https://github.com/mono/mono-addins
./autogen.sh --prefix=/usr/local
make

Have I missed something? Thank you!

make[1]: Entering directory /opt/mono-3/mono-addins/Mono.Addins.Gui' sed -e "s/@ASSEMBLY_NAME@/Mono.Addins.Gui/" -e "s/@POLICY@/0.2/" ../policy.config > policy.0.2.config /usr/local/bin/al -link:policy.0.2.config -out:policy.0.2.Mono.Addins.Gui.dll -keyfile:../mono-addins.snk ALINK: warning A99999: Path 'policy.0.2.config' in the resource name is not supported. Using just file name 'policy.0.2.config' sed -e "s/@ASSEMBLY_NAME@/Mono.Addins.Gui/" -e "s/@POLICY@/0.3/" ../policy.config > policy.0.3.config /usr/local/bin/al -link:policy.0.3.config -out:policy.0.3.Mono.Addins.Gui.dll -keyfile:../mono-addins.snk ALINK: warning A99999: Path 'policy.0.3.config' in the resource name is not supported. Using just file name 'policy.0.3.config' sed -e "s/@ASSEMBLY_NAME@/Mono.Addins.Gui/" -e "s/@POLICY@/0.4/" ../policy.config > policy.0.4.config /usr/local/bin/al -link:policy.0.4.config -out:policy.0.4.Mono.Addins.Gui.dll -keyfile:../mono-addins.snk ALINK: warning A99999: Path 'policy.0.4.config' in the resource name is not supported. Using just file name 'policy.0.4.config' sed -e "s/@ASSEMBLY_NAME@/Mono.Addins.Gui/" -e "s/@POLICY@/0.5/" ../policy.config > policy.0.5.config /usr/local/bin/al -link:policy.0.5.config -out:policy.0.5.Mono.Addins.Gui.dll -keyfile:../mono-addins.snk ALINK: warning A99999: Path 'policy.0.5.config' in the resource name is not supported. Using just file name 'policy.0.5.config' sed -e "s/@ASSEMBLY_NAME@/Mono.Addins.Gui/" -e "s/@POLICY@/0.6/" ../policy.config > policy.0.6.config /usr/local/bin/al -link:policy.0.6.config -out:policy.0.6.Mono.Addins.Gui.dll -keyfile:../mono-addins.snk ALINK: warning A99999: Path 'policy.0.6.config' in the resource name is not supported. Using just file name 'policy.0.6.config' Building Mono.Addins.Gui.csproj Mono.Addins.Gui/AddinManagerDialog.cs(187,24): error CS0506:Mono.Addins.Gui.AddinManagerDialog.Dispose()': cannot override inherited member GLib.Object.Dispose()' because it is not marked virtual, abstract or override Mono.Addins.Gui/AddinTreeWidget.cs(52,25): error CS0012: The typeGLib.IIcon' is defined in an assembly that is not referenced. Consider adding a reference to assembly gio-sharp, Version=3.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' Mono.Addins.Gui/ManageSitesDialog.cs(67,24): error CS0506:Mono.Addins.Gui.ManageSitesDialog.Dispose()': cannot override inherited member GLib.Object.Dispose()' because it is not marked virtual, abstract or override Mono.Addins.Gui/NewSiteDialog.cs(46,24): error CS0506:Mono.Addins.Gui.NewSiteDialog.Dispose()': cannot override inherited member GLib.Object.Dispose()' because it is not marked virtual, abstract or override gtk-gui/generated.cs(53,11): error CS0234: The type or namespace nameSizeRequestedArgs' does not exist in the namespace Gtk'. Are you missing an assembly reference? Mono.Addins.Gui/HeaderBox.cs(98,27): error CS0115:Mono.Addins.Gui.HeaderBox.OnSizeRequested(ref Gtk.Requisition)' is marked as an override but no suitable method found to override
Mono.Addins.Gui/HeaderBox.cs(125,27): error CS0115: Mono.Addins.Gui.HeaderBox.OnExposeEvent(Gdk.EventExpose)' is marked as an override but no suitable method found to override Mono.Addins.Gui/HoverImageButton.cs(83,44): warning CS0618:Gtk.Style' is obsolete: Replaced by StyleContext' Mono.Addins.Gui/HoverImageButton.cs(150,33): error CS0115:Mono.Addins.Gui.HoverImageButton.OnExposeEvent(Gdk.EventExpose)' is marked as an override but no suitable method found to override
make[1]: *** [csproj_build] Error 1
make[1]: Leaving directory /opt/mono-3/mono-addins/Mono.Addins.Gui' make: *** [all-recursive] Error 1 root@phoenix:/opt/mono-3/mono-addins# Mono.Addins.Gui/AddinManagerDialog.cs(187,24): error CS0506:Mono.Addins.Gui.AddinManagerDialog.Dispose()': cannot override inherited member GLib.Object.Dispose()' because it is not marked virtual, abstract or override bash: syntax error near unexpected token187,24'

Dependency Injection/Add-In Dependencies

Forgive me if this is a well travelled and well answered question, I must be searching for the wrong thing.

If a plugin/Add-In takes arguments in the constructor, e.g.: a logger: ILogger, is that ILogger declared as a dependency in the XML/Attribute? I am a little unclear how one injects code into the add-ins that are discovered/loaded in.

I am using Ninject in my App if that makes that any difference, not sure if the ILogger type would get auto resolved on instantiation

Mono.Addins on net6

Hi all, does Mono.Addins work on net6 platform. It goes an error, and it worked fine ion older platform (net472), but not net6 platform. Has anyone done it? It supports net standard 2.0, should support net6. Thanks

Got following errors:
System.InvalidOperationException: Add-in engine not initialized.
at Mono.Addins.AddinEngine.CheckInitialized()
at Mono.Addins.AddinEngine.get_Registry()
at Mono.Addins.AddinEngine.CheckHostAssembly(Assembly asm)
at Mono.Addins.AddinEngine.ValidateAddinRoots()
at Mono.Addins.AddinEngine.GetAddin(String id)
at Mono.Addins.TreeNode.ResetCachedData()
at Mono.Addins.TreeNode.ResetCachedData()
at Mono.Addins.TreeNode.ResetCachedData()
at Mono.Addins.ExtensionContext.ResetCachedData()
at Mono.Addins.AddinEngine.ResetCachedData()
at Mono.Addins.Database.AddinDatabase.ResetCachedData()
at Mono.Addins.Database.AddinDatabase.Shutdown()
at Mono.Addins.AddinRegistry.Dispose()
at Mono.Addins.AddinEngine.Shutdown()
at Mono.Addins.AddinManager.Shutdown()

Support for .NET Core

Hi there,

are there any plans to make Mono.Addins compatible with .NET Core?

Thanks,
christian

MonoAddin .NET6

Hi All,

We have recently upgraded our project from .net 4.7.2 to .NET6. We are using MonoAddin (net standard 2.0). One of the testcase is failing when we try to
List result = new List(
MonoAddinsHelper.GetConfiguredExtensionNodes(
MonoAddinsHelper.SelectedConfigurations,
"/Widgets",
false
)
result is empty
When I try to debug the MonoAddin source code I found that SelectedConfigurations is empty.
Also SelectableConfigurations is empty
var nodes = AddinManager.GetExtensionNodes(SelectableAddinConfigurationExtensionPoint);
1
And further Children property is empty
2

3
4

AddChildNode in TreeNode.cs is not called

I think it is a bug? or guide me to solve the issue?

Thank You

Loading reference Assemblies for Addin with AssemblyResolve

My application is using "AppDomain.CurrentDomain.AssemblyResolve" to load reference Assemblies in a Framework directory. Mono.Addins do not seem to call my "AssemblyResolve", because it is using an internal "AssemblyResolve".

How do I tell Mono.Addins to look for reference Assemblies in my Framework directory ?
This is on Windows (7, 10).

I used to have Mono installed in my Framework and using that for running my application. I'm trying to change to use MS .NET Framework. But the Addins will not load, giving me a "Assembly not found: ".

Solution Folder from the xpt.xml

I'm trying to create a add-in that have a solution folder to aggregate one or more projects from the xpt.xml. Can't find any documentation about that.

Example:
xpto.sln (in the root)

  • solutionfolder1
    --project1
    --project2
    ---solutionfolder2
    ----project3
    ----project4

Can someone point me to the correct direction? @slluis can you help?

Allow IAssemblyReflector to be properly disposable

On a Mac the default open file limit is 256. You can workaround it by using ulimit -S -n 24000. However we think Mono.Addins is not disposing of handles created by a Cecil-based implementation of IAssemblyReflector.

If my understanding of this is correct, we should probably make IAssemblyReflector inherit IDisposable and properly call Dispose() on it when we're done.

http://source.monodevelop.com/#Mono.Addins/Mono.Addins.Database/IAssemblyReflector.cs,41
http://source.monodevelop.com/#MonoDevelop.Addins.Tasks/AddinTask.cs,80

Issue with '#' in startupDirectory name

If the startup directory has a '#' symbol in (i.e: "C:\Foo\C#\App"), the plugin scanning fails due to the use of the System.Uri class in Mono.Addins.AddinEngine to process paths - Anything after the '#' is interpreted as URL parameters.
Platform: Win7, x64, .NET 4.0

Unknown extension node attributes are ignored

Unknown extension node attributes are ignored. It's easy to typo an attribute and not notice it, and this can be very painful to debug for a consumer.

Even if custom nodes read attributes programmatically, they should still declare them on the class for docs and basic validation. We should warn on undeclared attributes regardless, and MA consumers can go fix up their custom nodes.

Mono-Addins 1.3.5 make install rule is failing

Version 1.3.5 is building correctly but failing to install:

root@darkstar:/tmp/slackbuilds/mono-addins/mono-addins-c636f258d0a724e7c0de447ea717d18cb90bfb17# make DESTDIR=/tmp/package-mono-addins install
Making install in Mono.Addins
make[1]: Entering directory '/tmp/slackbuilds/mono-addins/mono-addins-c636f258d0a724e7c0de447ea717d18cb90bfb17/Mono.Addins'
make[2]: Entering directory '/tmp/slackbuilds/mono-addins/mono-addins-c636f258d0a724e7c0de447ea717d18cb90bfb17/Mono.Addins'
/usr/bin/gacutil /i ../bin/Mono.Addins.dll /f /package mono-addins /root /tmp/package-mono-addins/usr/local/lib || exit 1;
Failure adding assembly ../bin/Mono.Addins.dll to the cache: Strong name cannot be verified for delay-signed assembly
Makefile:552: recipe for target 'gac-install' failed
make[2]: *** [gac-install] Error 1
make[2]: Leaving directory '/tmp/slackbuilds/mono-addins/mono-addins-c636f258d0a724e7c0de447ea717d18cb90bfb17/Mono.Addins'
Makefile:429: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/tmp/slackbuilds/mono-addins/mono-addins-c636f258d0a724e7c0de447ea717d18cb90bfb17/Mono.Addins'
Makefile:350: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

Note that DESTDIR is used for linux packing.

AddinManager.Registry.Update failed when add new addin

I call AddinManager.Registry.Update just after
AddinManager.Initialize. The problem is that the application doesn't
see any new addins until the application has been stopped and
restarted. Even those old addins which have be found. In monodevelop, I found it will call AddinManager.Registry.Rebuild when failed, I also try this way, but it doesn't work for me, if every time I delete the adding config directory, it will be OK.
Is this behavior by design or am I doing something wrong?
Thanks.

ZipFile objects are not automatically disposed after use

There are instances of new ZipFile being used in Mono.Addins.Setup that are not automatically disposed, causing file handles to be held much longer than necessary.

AddinPackage.cs (93)
AddinPackage.cs (137) <- This one is fine because the FileStream is disposed, but for the sake of consistency
SetupService.cs (584)

(Lines as of commit 70e9d43)

This is an issue when you want to cleanup mpacks after SetupService.Install is called, but have to wait until the ZipFile handles get disposed (or the application exits), which is undesirable.

File is being used by another process when Updating an extension using Mono.Addins.Setup

I have an addin which is being updated at run time. I am using Mono.Addins.Setup.

The SetupService class has either Install() method or Uninstall(), but not Update()

I looked through the TextEditor sample and found that it is using Install() as an alternative to update.

I tried using that. I have an addin with single dll and addin.info xml file in single zip archive.

The name of dll file never changes with new releases. When I call Install() in order to update the addin, I get "Cannot access file.dll. Another process is using this"

If you need more info, please let me know I can provide that.

Am I using the wrong method to update the addin ? Should the new version of addin have different dll file name ?

error CS0518: The predefined type `System.*' is not defined or imported

Hello! I am trying to build mono-addins and I get errors :

configure --enable-gui
make 
make: Entering directory `/usr/src/RPM/BUILD/mono-addins-1.3'
Making all in Mono.Addins
make[1]: Entering directory `/usr/src/RPM/BUILD/mono-addins-1.3/Mono.Addins'
sed -e "s/@ASSEMBLY_NAME@/Mono.Addins/" -e "s/@POLICY@/0.2/" ../policy.config > policy.0.2.config
/usr/bin/al -link:policy.0.2.config -out:policy.0.2.Mono.Addins.dll -keyfile:../mono-addins.snk
ALINK: warning A99999: Path 'policy.0.2.config' in the resource name is not supported. Using just file name 'policy.0.2.config'
sed -e "s/@ASSEMBLY_NAME@/Mono.Addins/" -e "s/@POLICY@/0.3/" ../policy.config > policy.0.3.config
/usr/bin/al -link:policy.0.3.config -out:policy.0.3.Mono.Addins.dll -keyfile:../mono-addins.snk
ALINK: warning A99999: Path 'policy.0.3.config' in the resource name is not supported. Using just file name 'policy.0.3.config'
sed -e "s/@ASSEMBLY_NAME@/Mono.Addins/" -e "s/@POLICY@/0.4/" ../policy.config > policy.0.4.config
/usr/bin/al -link:policy.0.4.config -out:policy.0.4.Mono.Addins.dll -keyfile:../mono-addins.snk
ALINK: warning A99999: Path 'policy.0.4.config' in the resource name is not supported. Using just file name 'policy.0.4.config'
sed -e "s/@ASSEMBLY_NAME@/Mono.Addins/" -e "s/@POLICY@/0.5/" ../policy.config > policy.0.5.config
/usr/bin/al -link:policy.0.5.config -out:policy.0.5.Mono.Addins.dll -keyfile:../mono-addins.snk
ALINK: warning A99999: Path 'policy.0.5.config' in the resource name is not supported. Using just file name 'policy.0.5.config'
sed -e "s/@ASSEMBLY_NAME@/Mono.Addins/" -e "s/@POLICY@/0.6/" ../policy.config > policy.0.6.config
/usr/bin/al -link:policy.0.6.config -out:policy.0.6.Mono.Addins.dll -keyfile:../mono-addins.snk
ALINK: warning A99999: Path 'policy.0.6.config' in the resource name is not supported. Using just file name 'policy.0.6.config'
Building Mono.Addins.csproj
CSC: error CS0518: The predefined type `System.Object' is not defined or imported
CSC: error CS0518: The predefined type `System.ValueType' is not defined or imported
CSC: error CS0518: The predefined type `System.Attribute' is not defined or imported
CSC: error CS0518: The predefined type `System.Int32' is not defined or imported
CSC: error CS0518: The predefined type `System.UInt32' is not defined or imported
CSC: error CS0518: The predefined type `System.Int64' is not defined or imported
CSC: error CS0518: The predefined type `System.UInt64' is not defined or imported
CSC: error CS0518: The predefined type `System.Single' is not defined or imported
CSC: error CS0518: The predefined type `System.Double' is not defined or imported
CSC: error CS0518: The predefined type `System.Char' is not defined or imported
CSC: error CS0518: The predefined type `System.Int16' is not defined or imported
CSC: error CS0518: The predefined type `System.Decimal' is not defined or imported
CSC: error CS0518: The predefined type `System.Boolean' is not defined or imported
CSC: error CS0518: The predefined type `System.SByte' is not defined or imported
CSC: error CS0518: The predefined type `System.Byte' is not defined or imported
CSC: error CS0518: The predefined type `System.UInt16' is not defined or imported
CSC: error CS0518: The predefined type `System.String' is not defined or imported
CSC: error CS0518: The predefined type `System.Enum' is not defined or imported
CSC: error CS0518: The predefined type `System.Delegate' is not defined or imported
CSC: error CS0518: The predefined type `System.MulticastDelegate' is not defined or imported
CSC: error CS0518: The predefined type `System.Void' is not defined or imported
CSC: error CS0518: The predefined type `System.Array' is not defined or imported
CSC: error CS0518: The predefined type `System.Type' is not defined or imported
CSC: error CS0518: The predefined type `System.Collections.IEnumerator' is not defined or imported
CSC: error CS0518: The predefined type `System.Collections.IEnumerable' is not defined or imported
CSC: error CS0518: The predefined type `System.IDisposable' is not defined or imported
CSC: error CS0518: The predefined type `System.IntPtr' is not defined or imported
CSC: error CS0518: The predefined type `System.UIntPtr' is not defined or imported
CSC: error CS0518: The predefined type `System.RuntimeFieldHandle' is not defined or imported
CSC: error CS0518: The predefined type `System.RuntimeTypeHandle' is not defined or imported
CSC: error CS0518: The predefined type `System.Exception' is not defined or imported

mono-addins will not build against mono 5.0.1.1

Hi,

I'm rebuilding mono-addins after upgrading mono to 5.0.1.1, and it failed on this line:

Making install in Mono.Addins
make[1]: Entering directory '/tmp/SBo/mono-addins-mono-addins-1.3.3/Mono.Addins'
make[2]: Entering directory '/tmp/SBo/mono-addins-mono-addins-1.3.3/Mono.Addins'
/usr/bin/gacutil /i ../bin/Mono.Addins.dll /f /package mono-addins /root /tmp/SBo/package-mono-addins/usr/lib || exit 1;
Failure adding assembly ../bin/Mono.Addins.dll to the cache: Strong name cannot be verified for delay-signed assembly
Makefile:552: recipe for target 'gac-install' failed
make[2]: *** [gac-install] Error 1
make[2]: Leaving directory '/tmp/SBo/mono-addins-mono-addins-1.3.3/Mono.Addins'
Makefile:429: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/tmp/SBo/mono-addins-mono-addins-1.3.3/Mono.Addins'
Makefile:350: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

Tested on Slackware 14.2 with GCC 5.3.0 and here's the dependencies i have installed

ORBit2-2.14.19-x86_64-3
fsharp-4.0.1.20-x86_64-1
gnome-mime-data-2.18.0-x86_64-2
gnome-sharp-2.24.5-x86_64-1
gnome-vfs-2.24.4-x86_64-3
gtk-sharp-2.12.43-x86_64-1
jdk-8u131-x86_64-1
libbonobo-2.32.1-x86_64-3
libbonoboui-2.24.5-x86_64-1
libgdiplus-5.4-x86_64-1
libgnome-2.32.1-x86_64-2
libgnomecanvas-2.30.3-x86_64-1
libgnomeui-2.24.5-x86_64-1
mono-5.0.1.1-x86_64-1
nuget-3.5.0-noarch-1
referenceassemblies-pcl-20140414-noarch-1

Failed to run after migrating to netstandard2.1 and net6.0

Hi Guys,

We had TargetFramework set to net472, and the Mono.Addins works perfectly.

<PackageReference Include="Mono.Addins" Version="1.3.13" />

However, we are migrating to net6 project. it failed to load the dependencies although we did not change any code and addins. Do you guys know any reason? Thanks

The errors are as following:
WARNING: [Client12Addins.Bootstrap,1.0] Could not load some add-in assemblies: Format of the executable (.exe) or library (.dll) is invalid.
WARNING: The add-in 'Client12Addins.DotK.Application,1.0' could not be updated because some of its dependencies are missing or not compatible:
missing: Client12Addins.Bootstrap,1.0

In Bootstrap project which is a net6.0 project, we have:

In the other project which is a netstandard2.1 project, we have this

Monodevelop on an embedded Linux

Good day!

I'm trying to compile Monodevelop on/for an embedded/minimal Linux, and stuck at getting an msbuild to work:

make[3]: Entering directory '/update/download/mono-addins-mono-addins-1.3.3/Mono.Addins'
/usr/local/bin/gacutil /i ../bin/Mono.Addins.dll /f /package mono-addins /root /update/software/mono-addins-mono-addins-1.3.3/usr/local/lib || exit 1;
Failure adding assembly ../bin/Mono.Addins.dll to the cache: Strong name cannot be verified for delay-signed assembly
make[3]: *** [Makefile:555: gac-install] Error 1
make[3]: Leaving directory '/update/download/mono-addins-mono-addins-1.3.3/Mono.Addins'
make[2]: *** [Makefile:432: install-am] Error 2
make[2]: Leaving directory '/update/download/mono-addins-mono-addins-1.3.3/Mono.Addins'
make[1]: *** [Makefile:350: install-recursive] Error 1
make[1]: Leaving directory '/update/download/mono-addins-mono-addins-1.3.3'
make: *** [Makefile:655: install-strip] Error 2

This means, #73 (comment) isn't any help because I don't have a working msbuild yet. How can I get an msbuild without an msbuild?

Default ID based on class name

When an extension node registers a class, it would be nice if the node's default ID was the fully qualified class name. This would mean that a lot more nodes would have meaningful IDs for insertbefore/insertafter.

Make AddinEngine.AddinLoaded, AddinEngine.AddinUnloaded and Addin.AddinLoadError not static

Currently, the fact that the mentioned events are static prevents using these events together with multiple AddinEngines.

If the same addin (or two addins with the same id) is loaded into two different AddinEngines, the AddinLoaded event will be raised two times, but it is impossible to decide where the event came from
(except from hacking together a detection based on if the addin is now contained in an AddinEngine it wasn't contained in before).

Unfortunately, it isn't clear how to do this in a fully backwards compatible fashion (although people can just switch to using AddinManager.AddinLoaded instead of AddinEngine.AddinLoaded`` etc.)

Mono.Addins Localizer attribute causes exception when saving addin description

Using the Localizer tag directly in source code (aka [assembly: AddinLocalizer (typeof (LocalizerType))]) causes the following exception when trying to pack an addin:

System.NullReferenceException: Object reference not set to an instance of an object
    at System.Xml.XmlNode.SplitName (System.String name, System.String& prefix, System.String& localName) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Dom/XmlNode.cs:1074
    at System.Xml.XmlDocument.CreateElement (System.String name) [0x0000c] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Dom/XmlDocument.cs:533
    at Mono.Addins.Description.ExtensionNodeDescription.SaveXml (System.Xml.XmlElement parent) [0x00008] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins.Description/ExtensionNodeDescription.cs:200
    at Mono.Addins.Description.AddinDescription.SaveXml () [0x0028c] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins.Description/AddinDescription.cs:835
    at Mono.Addins.Description.AddinDescription.Save () [0x00013] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins.Description/AddinDescription.cs:753
    at Mono.Addins.Description.AddinDescription.Save (System.String fileName) [0x00007] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins.Description/AddinDescription.cs:736
    at Mono.Addins.Database.AddinDatabase.ParseAddin (Mono.Addins.IProgressStatus progressStatus, System.String domain, System.String file, System.String outFile, System.Boolean inProcess) [0x00109] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins.Database/AddinDatabase.cs:1463
    at Mono.Addins.AddinRegistry.ParseAddin (Mono.Addins.IProgressStatus progressStatus, System.String file, System.String outFile) [0x00000] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/AddinRegistry.cs:701
    at Mono.Addins.Database.RemoteSetupDomain.GetAddinDescription (Mono.Addins.IProgressStatus monitor, System.String registryPath, System.String startupDir, System.String addinsDir, System.String databaseDir, System.String file, System.String outFile) [0x00012] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins.Database/SetupDomain.cs:131
    at (wrapper remoting-invoke-with-check) Mono.Addins.Database.RemoteSetupDomain:GetAddinDescription (Mono.Addins.IProgressStatus,string,string,string,string,string,string)
    at (wrapper xdomain-dispatch) Mono.Addins.Database.RemoteSetupDomain:GetAddinDescription (object,byte[]&,byte[]&,string,string,string,string,string,string)

The problem seems to be that the extension node is created without a proper name causing this issue: https://github.com/mono/mono-addins/blob/master/Mono.Addins/Mono.Addins.Database/AddinScanner.cs#L844-L860

msc not found

➜  mono-addins which mcs
/usr/bin/mcs
➜  mono-addins LC_ALL=C makepkg -si
==> Making package: mono-addins 1.1-1 (Sat Sep  2 13:41:29 CEST 2017)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found mono-addins-1.1.tar.gz
==> Validating source files with md5sums...
    mono-addins-1.1.tar.gz ... Passed
==> Extracting sources...
  -> Extracting mono-addins-1.1.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
I am going to run ./configure with no arguments - if you wish 
to pass any to it, please specify them on the ./autogen.sh command line.
Running aclocal -I .  ...
Running automake --gnu  ...
configure.ac:88: warning: omit leading './' from config file names such as './mono-addins.spec';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Mono.Addins/mono-addins.pc';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Mono.Addins.Gui/mono-addins-gui.pc';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Mono.Addins.Setup/mono-addins-setup.pc';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Mono.Addins.MSBuild/mono-addins-msbuild.pc';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './policy.config';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Mono.Addins.Gui/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Mono.Addins.Setup/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Mono.Addins/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Mono.Addins.CecilReflector/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Mono.Addins.MSBuild/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './mautil/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './mautil/mautil';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './docs/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Test/HelloWorldExtension/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Test/FileContentExtension/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Test/UnitTests/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Test/CommandExtension/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Test/SystemInfoExtension/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Test/FileExtender/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
configure.ac:88: warning: omit leading './' from config file names such as './Test/Makefile';
configure.ac:88: remake rules might be subtly broken otherwise
xbuild.include:59: warning: EXTRA_DIST multiply defined in condition TRUE ...
./Mono.Addins.CecilReflector/Makefile.am:8:   'xbuild.include' included from here
Makefile.include:30: ... 'EXTRA_DIST' previously defined here
./Mono.Addins.CecilReflector/Makefile.am:7:   'Makefile.include' included from here
xbuild.include:59: warning: EXTRA_DIST multiply defined in condition ENABLE_GUI ...
./Mono.Addins.Gui/Makefile.am:12:   'xbuild.include' included from here
Makefile.include:30: ... 'EXTRA_DIST' previously defined here
./Mono.Addins.Gui/Makefile.am:11:   'Makefile.include' included from here
xbuild.include:59: warning: EXTRA_DIST multiply defined in condition TRUE ...
./Mono.Addins.MSBuild/Makefile.am:10:   'xbuild.include' included from here
Makefile.include:30: ... 'EXTRA_DIST' previously defined here
./Mono.Addins.MSBuild/Makefile.am:9:   'Makefile.include' included from here
xbuild.include:59: warning: EXTRA_DIST multiply defined in condition TRUE ...
./Mono.Addins.Setup/Makefile.am:9:   'xbuild.include' included from here
Makefile.include:30: ... 'EXTRA_DIST' previously defined here
./Mono.Addins.Setup/Makefile.am:8:   'Makefile.include' included from here
xbuild.include:59: warning: EXTRA_DIST multiply defined in condition TRUE ...
./Mono.Addins/Makefile.am:10:   'xbuild.include' included from here
Makefile.include:30: ... 'EXTRA_DIST' previously defined here
./Mono.Addins/Makefile.am:9:   'Makefile.include' included from here
xbuild.include:59: warning: EXTRA_DIST multiply defined in condition TRUE ...
./mautil/Makefile.am:9:   'xbuild.include' included from here
Makefile.include:30: ... 'EXTRA_DIST' previously defined here
./mautil/Makefile.am:8:   'Makefile.include' included from here
Running autoconf ...
Running ./configure ...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1001' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for pkg-config... /usr/bin/pkg-config
checking for gmcs... no
configure: error: mcs Not found
==> ERROR: A failure occurred in build().
    Aborting...

This is the build script is used: https://gist.github.com/ShalokShalom/ca5a1950aba64101bdeb99a1fada5596

Support executable addin files

Since we are trapped in a world where mpack is zip, and zip as a format inherently has no support for permission handling, we ought to bypass this by adding an optional way to define an AddinFile as executable, such that when an addin file is installed, Mono.Addins can fix up the permissions post-hoc to allow execution.

This allows for shipping shell scripts, or other executable binaries, on Mac/Linux, inside mpack files.

Propsal:

[assembly: ImportAddinFile("scripts/myscript.sh")]

into

[assembly: ImportAddinFile("scripts/myscript.sh", true)]

Rethink Mono.Addins addin repo installer gui

Basically, without impacting too much on the addins format we would have this to have less problems with addins MonoDevelop doesn't maintain:

  • Installed tab - Which would contain only installed and enabled addins. Disabling an addin would make it go to Not Installed.
  • Updates tab.
  • Gallery tab - which would contain disabled and not installed addins. Basically, there would be an extra icon informing the user that an internet connection is needed to be able to install an addin, and disabled addins would just be installed with one simple enable toggle.

Addins doesn't discover addins correctly in mono64 as it does in mono32

Mac OS X Catalina left 32 bit applications behind and as a result, I've been exploring updating some code that uses Addins... but I'm finding that it's not discovering it correctly. Run the Sample Code in Addins and see how it behaves running under mono64. It can't find the addins in question.

I've been trying to debug the issue but I haven't been succeeding.

Optimize AddinDependsOn

A few problems are found in AddinDependsOn:

  • Each time we visit every addin, we don't save the visited data. Thus, on every scan, we re-create the visited table, visiting every addin more than once. In the case of 4 addins being loaded for one extension point, and 100 addins in the registry, we may well end up visiting all the nodes 400 times.

  • There's also the linear scan in place, not sure what other data structure could be used to remedy the issue there, as it is a chunked sorted list.

screen shot 2018-02-10 at 15 24 41

Create a default XML Schema Definition for IntelliSense

As a developer, I would like for IntelliSense to work in Visual Studio (or other editors) when editing an addin's XML file. In order to do so, we would need a base XSD file which supports the primary functions of an addin's xml manifest.

If not included in the Mono.Addins project, could it be a wiki page?

Example - MonoAddins.xsd

An actively updated example can be found at, MonoAddins.xsd

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="MonoAddins"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="https://github.com/mono/mono-addins/MonoAddins.xsd"
    attributeFormDefault="unqualified"
    elementFormDefault="qualified">
  <xs:element name="Addin">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Runtime" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Import" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:attribute name="Assembly" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Dependencies" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Addin" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:attribute name="Id" type="xs:string" use="required" />
                  <xs:attribute name="Version" type="xs:decimal" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="ExtensionPoint" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="ExtensionNode">
                <xs:complexType>
                  <xs:attribute name="Name" type="xs:string" use="required" />
                  <xs:attribute name="ObjectType" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="Path" type="xs:string" use="required" />
          </xs:complexType>
        </xs:element>
        <xs:element name="Extension" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:attribute name="Path" type="xs:string" use="required" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="Id" type="xs:string" use="required" />
      <xs:attribute name="Namespace" type="xs:string" use="required" />
      <xs:attribute name="Version" type="xs:decimal" use="required" />
      <xs:attribute name="Name" type="xs:string" use="optional" />
      <xs:attribute name="Author" type="xs:string" use="optional" />
      <xs:attribute name="CompatVersion" type="xs:decimal" use="optional" />
      <xs:attribute name="Category" type="xs:string" use="optional" />
      <xs:attribute name="Description" type="xs:string" use="optional" />
      <xs:attribute name="IsRoot" type="xs:boolean" use="optional" />
      <xs:attribute name="DefaultEnabled" type="xs:boolean" use="optional" />
    </xs:complexType>
  </xs:element>
</xs:schema>

[Engine] Detailed addin load reporting

ReportAddinLoad only reports the addin id which is being loaded.

To allow for finer grained control and automated verifying of load reasons, we should supply:
a) the load reason - loaded as dependency or loaded directly (i.e. extension objects)
b) the load phase - whether the addin is loaded just as metadata or fully loaded in memory

how hot update addins?

I have some questions about this project:
1.how hot update addins?
2.manage addins enable or disable
3.this design for mono or can be used with winform(window)

3q!

Question about ConsoleProgressStatus as subclass of System.MarshalByRefObject

Hello. We are using Mono.Addins 1.3.7.
One of our users reported a problem that is logged as:

First error message:

Add-in scan operation failed. The runtime may have encountered an error while trying to load an assembly.

Second error message:

Add-in scan operation failed System.Runtime.Remoting.RemotingException: The argument type 'System.MarshalByRefObject' cannot be converted into parameter type 'Mono.Addins.IProgressStatus'. ---> System.InvalidCastException: Object must implement IConvertible.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at System.Runtime.Remoting.Messaging.Message.CoerceArg(Object value, Type pt)

Apparently what is happening is:

  1. An Exception is thrown in RemoteSetupDomain.Scan (for an unknown reason).
  2. The Exception is catched in AddinDatabase.RunScannerProcess , and the first error message is logged.
  3. A second Exception (InvalidCastException) occurs in that same catch, more precisely when the following is executed:
scanMonitor = new ConsoleProgressStatus (true);

I see that on 14-Jul-2021, the commit 847c4a1#diff-5aaae4188077feb93880e8c3d56ce290c4da0e26d1179300cb71e6e9eed33e7f makes ConsoleProgressStatus a subclass of MarshalByRefObject only under the following condition: "#if NETFRAMEWORK" .

My questions:

  1. Would you mind telling me if that change is meant to solve the InvalidCastException that I described?
  2. Would it be possible for you to give me some hint on how I can reproduce (as a Mono.Addins 1.3.7 user) the InvalidCastException that I described? (since all I have is a log file from a final user).
  3. The DLL I am using is "Mono.Addins.1.3.7\lib\net45\Mono.Addins.dll" , with TargetFramework(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")] . I understand that by upgrading to the latest version (with the preprocessor directive), the ConsoleProgressStatus would still be a subclass of MarshalByRefObject . Am I right?

Thank you very much. Any hint or advice would be much appreciated.
Kind regards.

Possibility of allowing the usage particular (context using) Gettext methods

I'm working on a project that uses Contextual messages, and am using this library for extensibility. Internally the project uses the Gettext.NET library, which has support for the GetParticular* methods. Having interfaces exposing localizer methods for those would be useful for allowing addins to easily use them.

GetStringHashCode needs to normalize path case on Windows

On Windows, depending on whether you type cd /d C:\temp or cd /d c:\temp you're going to end up in either C:\> or c:\> command prompt. In other words, the casing of the drive letter is what you typed when you switched to it.

The case of the drive letter propagates all the way to here:
https://github.com/mono/mono-addins/blob/master/Mono.Addins/Mono.Addins.Database/FileDatabase.cs#L472

So when we compute the hash of the file path the casing of the drive letter in that path will be what your command prompt was at the time of starting the process. This will result in failing to hit the cache if the path is different and weird errors with addins unable to be installed.

Huge props to @ToddGrun who figured out the root cause.

mono-addins build On MAC OS GTK# error

Chinese language
你好,我已经安装了MonoFramework-MDK-4.xxxxx.xamarin.universal的Mac版本,在编译mono-addins的时候,./configure --enable-gui 提示
configure:error:gtk is need for GUI features,install it or use --disable-gui, 我看了MonoFramework里面是包含GTK#的,请问这个我还需要安装或者配置什么参数吗?

Exception on list-update and update

mautil always crashes when looking for updates:
$ ../../mono-addins/mono-addins/bin/mautil.exe -p . -reg F:/dev/registry list-update
Looking for updates...
Available add-in updates:
System.NullReferenceException: Object reference not set to an instance of an object.
at Mono.Addins.Setup.SetupTool.IsHidden(Addin ainfo) in F:\dev\mono-addins\mono-addins\Mono.Addins.Setup\Mono.Addins.Setup\SetupTool.cs:line 291
at Mono.Addins.Setup.SetupTool.ListUpdates(String[] args) in F:\dev\mono-addins\mono-addins\Mono.Addins.Setup\Mono.Addins.Setup\SetupTool.cs:line 357
at Mono.Addins.Setup.SetupTool.Run(String[] args) in F:\dev\mono-addins\mono-addins\Mono.Addins.Setup\Mono.Addins.Setup\SetupTool.cs:line 149
at mautil.MainClass.Main(String[] args) in F:\dev\mono-addins\mono-addins\mautil\Main.cs:line 110

I think I know why. In both SetupTool.cs ListUpdates(...) and SetupTool.cs Update(...) you have:
Addin sinfo = registry.GetAddin (addin.Addin.Id);

But addin.Addin.Id returns the full Id with the version number, so things like MyAddin,0.8.1.0.1

I believe you need to search for LocalId instead, so
Addin sinfo = registry.GetAddin (addin.Addin.LocalId);

I tried it and it fixed the issue. Since it's so simple to fix, I'm not sending up a pull request.

AddinScanner throw exception

CustomExtensionAttributes.cs

the property 'Addin' getter method throw an exception when the property 'ExtensionNode' is null

RunPendingUninstalls not cleaning up empty directories

In situations where addins are frequently added, removed, and updated, the addins directory tends to fill up with empty directories between application restarts rather quickly. Each one of these directories is then scanned on Registry.Update, potentially causing slowdowns once a lot of them exist.

Perhaps AddinDatabase.RunPendingUninstalls can try deleting the containing folder the addin file being removed was stored in, keeping things a lot more tidy for end users, and avoiding a massive directory of empty folders.

Something as simple as:

if (canUninstall) {
	foreach (string file in adn.Files.OrderByDescending(s => s).ToList()) {
		var dir = Path.GetDirectoryName(file);
		if (dir != null) {
			try {
				Directory.Delete(dir);
			}
			catch {
			}
		}
	}
	Configuration.UnregisterForUninstall (adn.AddinId);
	changesDone = true;
}

to replace the previous code of:

if (canUninstall) {
	Configuration.UnregisterForUninstall (adn.AddinId);
	changesDone = true;
}

Seems to do the trick, but I'm not sure if that code is compatible with all the targets of Mono.Addins, so just throwing out an example.

I'm not familiar with the possible directory structure for multi-assembly addins, but in my simple testing I just had a single file in a directory so it worked as intended. Maybe a recursive delete can be done regardless if the directory is empty or not, but I'm not sure of the implications of that, or if that's even desirable. I can't think of any case where empty directories of uninstalled addins are desirable though!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.