Граф коммитов

83 Коммитов

Автор SHA1 Сообщение Дата
Matt Ward cda393844b Update terminology used in comments and one variable 2023-08-16 18:33:10 +01:00
Lluis Sanchez 4bec41e675 Convert to multi-target projects
Generate builds for .net 4.7.2 and .net 6 in a single
nuget package.
2022-01-19 19:22:17 +01:00
Lluis Sanchez 847c4a1b8c Move back to single targetting for now 2021-07-14 19:16:46 +02:00
Matt Ward 9426beb4c5 Sign assemblies
Fix warnings about assemblies not being strong named.
The internals visible to information was missing the
public key.
2021-02-19 13:50:11 +00:00
Matt Ward 91a93a3ead Build all projects to bin without target framework name
Set AppendTargetFrameworkToOutputPath to false in all projects
so everything builds into the same bin directory.
2021-02-19 12:33:53 +00:00
Matt Ward 8f1aafc9b2 CecilReflector projects now targets .NET Standard 2.0
It was targeting the .NET Framework.
2021-02-18 10:01:15 +00:00
Matt Ward 2a4824da0d Fix reference conflicts build warnings
Still have warnings about conflicts in mautil.
One warning about Mono.Addins not being strong named.
2021-02-09 11:36:42 +00:00
Mikkel Kruse Johnsen 481723b87a Removed AssemblyInfo.cs from Git and added InternalsVisibleTo to the project file. When reverted back to internal on functions/classes 2021-01-28 13:08:55 +01:00
Mikkel Kruse Johnsen c49fa850fc Update to new MSBuild format in project files. Changed Mono.Addins to .NETStandard2.0 2020-12-16 10:25:15 +01:00
Lluis Sanchez 25dd732a58 Fix several issues caused by assembly qualified names
In some cases we were using the assembly qualified name when the
type name was expected. Fixed type name parsing to make it
more robust.
2020-10-05 12:52:50 +02:00
Immo Landwerth 218902105d Assembly load optimizations
Don't look up CurrentAddin by assemblies loaded.
CurrentAddin - at least in tests - will use something like UnitTests.dll
which is not always loaded via the non-expensive check.
Use AssemblyName.GetName instead of adding new API
2020-10-05 12:52:49 +02:00
Marius Ungureanu a80b6dd2f4 Write AssemblyNames on scan so we can use it later 2020-10-05 12:52:49 +02:00
Marius Ungureanu 8978e8b8a2 [Localization] Optimize loading AddinLocalizers for the case where a custom localizer is supplied
This should avoid probing for a built-in localizer when a custom one is supplied.
2020-10-05 12:52:49 +02:00
Marius Ungureanu f1914c37e3 Mechanical change from ArrayList to List 2019-12-22 02:43:41 +02:00
Kirill Osenkov 3b7fbae279
Bump Cecil to 0.10.1.
MonoDevelop has switched to Cecil 0.10.1.
2019-01-13 16:43:21 -08:00
Marius Ungureanu e3e18ff78f Bump cecil 2018-08-02 18:26:50 +03:00
Marius Ungureanu 5cfbf77e5c [Mono.Addins] Fixup Mono.Addins so that inside MonoDevelop
it will target 4.6.1, rather than 4.5.

This should fix a few binding redirects issues we have when building MD
2018-08-02 18:26:50 +03:00
Marius Ungureanu bdf3af237a
Fix possible build error in CecilReflector
Uncovered by https://github.com/mono/monodevelop/issues/4237

```
"/home/pi/sources/monodevelop/main/Main.sln" (default target) (1) ->
"/home/pi/sources/monodevelop/main/src/core/MonoDevelop.Startup/MonoDevelop.Startup.csproj" (default target) (13) ->
"/home/pi/sources/monodevelop/main/external/mono-addins/Mono.Addins.CecilReflector/Mono.Addins.CecilReflector.csproj" (default target) (14:2) ->
  Mono.Addins.CecilReflector/Reflector.cs(373,3): error CS0012: The type `System.Collections.Generic.ISet`1<T>' is defined in an assembly that is not referenced. Consider adding a reference to assembly `System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' [/home/pi/sources/monodevelop/main/external/mono-addins/Mono.Addins.CecilReflector/Mono.Addins.CecilReflector.csproj]
```
2018-03-22 17:54:41 +02:00
Lluis Sanchez ce49847463 Move required package metadata to Versions.props 2018-02-14 00:29:39 +01:00
Lluis Sanchez f11524ee2a Update metadata 2018-02-14 00:17:06 +01:00
David Karlaš ccd3fc710d bump Mono.Cecil to 0.10.0-beta6 2017-10-02 14:39:43 +02:00
Ankit 99d7e3ad73 Fix bxc #58815 build breakage
The VSMac 2017-08 branch build breaks with mono 5.6.0.x:

Using "ReportAssetsLogMessages" task from assembly "/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk/build/../tools/net46/Microsoft.NET.Build.Tasks.dll".
Task "ReportAssetsLogMessages"
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(323,5): error MSB4018: The "ReportAssetsLogMessages" task failed unexpectedly. [/Users/ludovic/Xamarin/monodevelop/main/external/RefactoringEssentials/RefactoringEssentials.2017/RefactoringEssentials.csproj]
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(323,5): error MSB4018: System.TypeLoadException: Could not resolve type with token 0100005b (from typeref, class/assembly NuGet.ProjectModel.IAssetsLogMessage, NuGet.ProjectModel, Version=4.3.0.5, Culture=neutral, PublicKeyToken=31bf3856ad364e35) [/Users/ludovic/Xamarin/monodevelop/main/external/RefactoringEssentials/RefactoringEssentials.2017/RefactoringEssentials.csproj]
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(323,5): error MSB4018:   at Microsoft.NET.Build.Tasks.TaskBase.Execute () [0x00000] in <01420900fd004c128de2d2ee31bad624>:0  [/Users/ludovic/Xamarin/monodevelop/main/external/RefactoringEssentials/RefactoringEssentials.2017/RefactoringEssentials.csproj]
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(323,5): error MSB4018:   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in <765502eb2f884ce79731edeb4b0517fb>:0  [/Users/ludovic/Xamarin/monodevelop/main/external/RefactoringEssentials/RefactoringEssentials.2017/RefactoringEssentials.csproj]
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(323,5): error MSB4018:   at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x0022d] in <765502eb2f884ce79731edeb4b0517fb>:0  [/Users/ludovic/Xamarin/monodevelop/main/external/RefactoringEssentials/RefactoringEssentials.2017/RefactoringEssentials.csproj]

The missing token token 0100005b (from typeref, class/assembly NuGet.ProjectModel.IAssetsLogMessage, NuGet.ProjectModel, Version=4.3.0.5)
is referenced from the `Microsoft.NET.Build.Tasks.dll`. The
`NuGet.ProjectModel.dll` next to the tasks assembly has the type
available. But looking at assembly loader logs, it turns out that the
assembly is actually being loaded via a raw byte[] instead of from the
file.

More digging reveals that this is being done by
`Costura.AssemblyLoader`[1] which was loading the assembly from embedded
resources in `NuGet.Build.Packaging.Tasks.dll` assembly:

    1e70e0: costura.nuget.projectmodel.dll.zip (size 55791)

And this seems to be out of sync with the nuget assemblies bundled with
the `Microsoft.NET.Build.Tasks.dll`.

`NuGet.Build.Packaging.Tasks`'s `ReadLegacyDependencies` targets gets
triggered because `Mono.Addins.csproj` has `PackOnBuild=true` for
Release builds. Hence, the issue is never seen in debug builds.

The `Costura` change was reverted in the nuget package upstream[2] but
that was committed after `v0.1.276`, which is the version being used currently.

So, we bump to latest version of the package - `v0.2.0`.

--
1. https://github.com/Fody/Costura
2. 7838a0a95f
2017-09-23 12:58:14 -04:00
Lluis Sanchez eda15b2f8c Fix feedback 2017-08-11 15:07:31 +02:00
Lluis Sanchez f01f228415 Optimize the cecil reflector
The reflector now takes into account that some assemblies only have to
be loaded if they reference Mono.Addins. For example, when looking for
a subclass of Mono.Addins.ExtensionNode, only assemblies that have a
Mono.Addins reference can define such class.
This optimization can be applied in several cases and reduces the
number of assemblies that are loaded.

An UnloadAssembly method has also been added, and it is used to unload
potential add-in assemblies when there is an error while scanning.
2017-08-11 12:17:34 +02:00
Mikayla Hutchinson 771a2c1001 Generate a nupkg for CecilReflector 2017-05-30 20:57:30 -04:00
Mikayla Hutchinson f4c797f1a3 Modernize the solution a bit 2017-05-30 19:27:31 -04:00
Marius Ungureanu 3eaec13cfc Merge pull request #69 from mono/optimize-scanning
[Perf] Optimize assembly scanning by not doing unnecessary work
2017-05-29 04:02:29 -07:00
Marius Ungureanu 2837ebcd43 [Perf] Avoid scanning another time for a type definition. 2017-05-26 23:40:19 +03:00
Marius Ungureanu 292f05e26c [Cecil] Optimize reflector loading by improving cache hit/misses ratio.
new cache - init->dispose millis
CECILREFLECTOR: 46791/47087
CECILREFLECTOR TIME: 1318ms

old cache - init->dispose millis
CECILREFLECTOR: 46680/47087
CECILREFLECTOR TIME: 3120ms
2017-05-23 19:58:36 +03:00
Lluis Sanchez c24244d7b1 Local-copy cecil in CecilReflector
It is required for running the reflector.
2017-05-15 15:59:57 +02:00
Marius Ungureanu 32d7c2ae3a [Reflector] Fix InvalidCastException in reflector.
Also moved to a dictionary for type safety.
2017-05-15 15:44:15 +03:00
Marius Ungureanu 9b0e56f671 [Build] Use nugets from the solution dir.
Fixes building in-repo and in MD repo.
2017-05-15 14:31:29 +03:00
Marius Ungureanu 1e2e32aad7 Bump cecil. 2017-05-11 19:59:44 +03:00
Marius Ungureanu d37fde9724 Track Cecil API changes. 2017-03-14 19:33:36 +02:00
Marius Ungureanu a28c1bcc5b [Cecil] Delete source copy. 2017-03-14 19:32:41 +02:00
Andres G. Aragoneses a3efa4ca9f build: fix build with xbuild 12.0 engine (mono 4.2.1)
If anyone tried to build mono-addins with the xbuild 12.0 engine [1]
that comes with mono 4.2.1 [2] (quite widespread given that it's the
version bundled with Ubuntu 16.04.x LTS), the build would not
work [3].

[1] $ xbuild --version
XBuild Engine Version 12.0
Mono, Version 4.2.1.0
Copyright (C) 2005-2013 Various Mono authors

[2] $ mono --version
Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	LLVM:          supported, not enabled.
	GC:            sgen

[3]
$ ./autogen.sh
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  ...
<snip />
$ make
Making all in Mono.Addins
make[1]: Entering directory '/home/andres/Documents/Code/OpenSource/mono-addins/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
Makefile:571: recipe for target 'csproj_build' failed
make[1]: *** [csproj_build] Error 1
make[1]: Leaving directory '/home/andres/Documents/Code/OpenSource/mono-addins/Mono.Addins'
Makefile:351: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
2016-09-17 13:12:28 +08:00
Marius Ungureanu 60d87622dc Update release configurations. 2015-09-21 15:49:05 +03:00
Sean Gilliam 3d0cca1d3c Fixed a few typos 2015-04-06 13:28:38 -05:00
Lluis Sanchez d1dfa3e086 Flush projects 2014-11-19 19:11:49 +01:00
Lluis Sanchez 0a1c0a06ed Fix issue when scanning AddinFlagsAttribute
.NET is more strict than Mono when resolving a type constructor.
Mono can resolve a constructor with an enum parameter by providing
an integer as parameter value. .NET fails in that case.
2013-09-18 19:31:48 +02:00
Alan McGovern 32ac38a32e [Cecil] Try to ignore unloadable dependencies
Sometimes dependent assemblies cannot be loaded. This scenario does not
always mean the addin is broken, so wrap a try/catch around scanning
dependent assemblies and log/ignore any failures.
2013-08-26 12:27:09 -04:00
Lluis Sanchez f1363fb747 Fix assembly resolution issue 2013-07-16 21:39:40 +02:00
Stefano Angeleri ddef929dc5 Updated Cecil from upstream. 2013-06-11 08:33:49 +02:00
Alan McGovern 498da987e6 [build] Build against the 4.0 profile
This will allow the csproj files to be directly
usable in the monodevelop build. I've also changed
the gtk-sharp references to not require an exact version
to aid building on multiple platforms.
2012-10-18 04:31:53 +01:00
Lluis Sanchez 452a0527b7 Updated project version to VS 2010 2012-10-16 12:05:42 +02:00
Lluis Sanchez 43b4de80b2 Build the solution using xbuild 2012-07-19 16:01:46 +02:00
Lluis Sanchez 5c88e2195d Bump version to 1.0 2012-07-09 16:13:31 +02:00
Lluis Sanchez Gual acca779080 Remove some old files. 2011-02-25 14:55:06 +01:00
Lluis Sanchez Gual 5b0bccf90f Updated. 2011-02-24 00:46:44 +01:00
Lluis Sanchez Gual 4e15666fd2 Bump version to 0.6 2011-02-10 01:40:18 +01:00