These are chat archives for mono/monodevelop

31st
Jan 2018
g
@germgerm
Jan 31 20:25
@PedroLarouca_twitter Thanks but that is no help. 1- I can't get it to build, are there prerequisites ? 2 - is this an example of an extension or an extension library ?
g
@germgerm
Jan 31 20:46
Building: DynamicToolboxItems (Debug)
Build started 2018-01-31 3:35:19 PM.
__________________________________________________
Project "/home/gerry/Projects/Test/SampleAddins/DynamicToolboxItems/DynamicToolboxItems.csproj" (Build target(s)):

Target ResolveMonoDevelopLocations:
    MDConfigDir:   /home/gerry/.config/MonoDevelop/7.0
    MDAddinsDir:   /home/gerry/.local/share/MonoDevelop/7.0/LocalInstall/Addins
    MDBinDir:      /usr/local/lib/monodevelop/bin
    MDTargetFrameworkVersion:   v4.6.1
Target _MDResolveAddinReferences:
    Updating addin database at /home/gerry/Projects/Test/SampleAddins/DynamicToolboxItems/obj/Debug/net461/mdam/db
    /home/gerry/.nuget/packages/monodevelop.addins/0.4.1/build/MonoDevelop.Addins.targets(125,5): error : Add-in scan operation failed: System.IO.IOException: Error 4
...
    /home/gerry/.nuget/packages/monodevelop.addins/0.4.1/build/MonoDevelop.Addins.targets(125,5): error :   at Mono.Addins.Database.AddinDatabase.RunScannerProcess (Mono.Addins.IProgressStatus monitor) [0x00041] in <986f8be547534289b2a0232bc26702be>:0 
    /home/gerry/.nuget/packages/monodevelop.addins/0.4.1/build/MonoDevelop.Addins.targets(125,5): error : The add-in database could not be updated. It may be due to file corruption. Try running the setup repair utility
Done building target "_MDResolveAddinReferences" in project "DynamicToolboxItems.csproj" -- FAILED.

Done building project "DynamicToolboxItems.csproj" -- FAILED.

Build FAILED.
There is addins.monodevelop.com which could be used in the past to get your addins distributed/published in the official addin catalog of VS for Mac/MonoDevelop/Xamarin Studio but since several months it doesn't work correctly anymore
A few projects seem to get build but for my project it doesn't work anymore and so I can't get a new version out via the official channels which sucks
g
@germgerm
Jan 31 20:59
@DarkCloud14 Thanks but I get the same result with the DateInserter example
Building: Mine (Debug)
Build started 2018-01-31 3:58:20 PM.
__________________________________________________
Project "/home/gerry/Projects/Test/SampleAddins/Mine/Mine.csproj" (Build target(s)):

Target ResolveMonoDevelopLocations:
    MDConfigDir:   /home/gerry/.config/MonoDevelop/7.0
    MDAddinsDir:   /home/gerry/.local/share/MonoDevelop/7.0/LocalInstall/Addins
    MDBinDir:      /usr/local/lib/monodevelop/bin
    MDTargetFrameworkVersion:   v4.6.1
Target _MDResolveAddinReferences:
    Updating addin database at /home/gerry/Projects/Test/SampleAddins/Mine/obj/Debug/net461/mdam/db
    /home/gerry/.nuget/packages/monodevelop.addins/0.4.1/build/MonoDevelop.Addins.targets(125,5): error : Add-in scan operation failed: System.IO.IOException: Error 4
...
    /home/gerry/.nuget/packages/monodevelop.addins/0.4.1/build/MonoDevelop.Addins.targets(125,5): error :   at Mono.Addins.Database.AddinDatabase.RunScannerProcess (Mono.Addins.IProgressStatus monitor) [0x00041] in <986f8be547534289b2a0232bc26702be>:0 
    /home/gerry/.nuget/packages/monodevelop.addins/0.4.1/build/MonoDevelop.Addins.targets(125,5): error : The add-in database could not be updated. It may be due to file corruption. Try running the setup repair utility
Done building target "_MDResolveAddinReferences" in project "Mine.csproj" -- FAILED.

Done building project "Mine.csproj" -- FAILED.
g
@germgerm
Jan 31 21:14
Additionally :
using MonoDevelop.Components.Commands;
using MonoDevelop.Ide;
using MonoDevelop.Ide.Gui;
 -> Error: The type or namespace name 'MonoDevelop' could not be found ( are you missing a using statement or an assembly reference ?)


public enum DateInserterCommands
{
    InsertDate,
}   
-> Error: Predefined 'System.Enum' is not defined or imported.
I am not concerned with publishing at this point, this is for internal use.
Alexander Jochum
@DarkCloud14
Jan 31 21:58
@germgerm unfortunately I'm not sure if I can help with the problems you've but what I did to at least get the DateInserter example working/compiling was the following
First I followed the migration steps found here: https://mhut.ch/addinmaker/1.2
Then I modified InsertDateHandler.cs so I can get it compiled as the references for MD 7.0 aren't correct anymore
Find the modified code of InsertDateHandler.cs here: https://pastebin.com/RJ8UVGZ9
From the message about the AddinDatabase I would guess the local addin database is corrupt
Alexander Jochum
@DarkCloud14
Jan 31 22:07
if you don't have to many addins installed you can try to delete the following two directories while MonoDevelop is closed
Alexander Jochum
@DarkCloud14
Jan 31 22:14
~/.local/share/MonoDevelop/7.0/LocalInstall and ~/.config/MonoDevelop/7.0/repository-cache and one more I forgot ~/.cache/MonoDevelop/7.0/
Then start MonoDevelop again and install MonoDevelop.AddinMaker addin again and try to get things compiled again
Hopefully the add-in database error is gone now.
Else you may also try to install a newer monodevelop version
g
@germgerm
Jan 31 22:17

The project.csproj that the AddinMaker creates doesn't even contain the items that the migration steps mention - there is no ProjectTypeGuid or TargetFrameworkVersion or pretty much anything that is included in a standard project file :

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net45</TargetFramework>
    <RootNamespace>DateInserter</RootNamespace>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="MonoDevelop.Addins" Version="0.2.3" />
  </ItemGroup>
</Project>

Maybe its just me but without some kind of documentation specific to AddinMaker this just seems very broken.

Alexander Jochum
@DarkCloud14
Jan 31 22:19
Did you download the example project https://github.com/mjh4/AddIns/tree/master/DateInserter sourcecode ??
I think you're trying the steps described in the urls I posted am I right?
g
@germgerm
Jan 31 22:20
No I used the AddinMaker to setup the project
Alexander Jochum
@DarkCloud14
Jan 31 22:20
Yeah then you don't need to migrate
Ok the code changes etc. I posted were necessary if you downloaded the code above..
g
@germgerm
Jan 31 22:22
Ya - I figured - wouldn't expect the lastest AddinMaker to generate code that needed any migration. But would expect it to work :worried:
Alexander Jochum
@DarkCloud14
Jan 31 22:26
have you tried to remove the directories I mentioned above
Somehow I think there is something corrupted on your site
g
@germgerm
Jan 31 22:30
@DarkCloud14 As instructed, compiling DateSelector :
Building: DynamicToolboxItems (Debug)
Build started 2018-01-31 5:27:10 PM.
__________________________________________________
Project "/home/gerry/Projects/Test/SampleAddins/DynamicToolboxItems/DynamicToolboxItems.csproj" (Build target(s)):

Target ResolveMonoDevelopLocations:
    MDConfigDir:   /home/gerry/.config/MonoDevelop/7.0
    MDAddinsDir:   /home/gerry/.local/share/MonoDevelop/7.0/LocalInstall/Addins
    MDBinDir:      /usr/local/lib/monodevelop/bin
    /home/gerry/.nuget/packages/monodevelop.addins/0.4.1/build/MonoDevelop.Addins.targets(105,5): error MSB4018: The "GetMonoDevelopTargetFramework" task failed unexpectedly.
    /home/gerry/.nuget/packages/monodevelop.addins/0.4.1/build/MonoDevelop.Addins.targets(105,5): error MSB4018: System.IO.IOException: Too many open files
... 
    /home/gerry/.nuget/packages/monodevelop.addins/0.4.1/build/MonoDevelop.Addins.targets(105,5): error MSB4018:   at MonoDevelop.Addins.Tasks.GetMonoDevelopTargetFramework.Execute () [0x00030] in <4375dd5d3b2940b9889d9deeff02b9cf>:0 
    /home/gerry/.nuget/packages/monodevelop.addins/0.4.1/build/MonoDevelop.Addins.targets(105,5): error MSB4018:   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in <75cf81f9e79c4309b9cb3d9a1e0dde06>:0 
    /home/gerry/.nuget/packages/monodevelop.addins/0.4.1/build/MonoDevelop.Addins.targets(105,5): error MSB4018:   at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x0022d] in <75cf81f9e79c4309b9cb3d9a1e0dde06>:0 
Done building target "ResolveMonoDevelopLocations" in project "DynamicToolboxItems.csproj" -- FAILED.

Done building project "DynamicToolboxItems.csproj" -- FAILED.

Build FAILED.
Creating a new extension project - the file listed does exist as xx.csproj.g.props :
Building: xx (Debug)
Build started 2018-01-31 5:29:06 PM.
/usr/lib/mono/xbuild/15.0/Microsoft.Common.props(63,3): error MSB4019: The imported project "/home/gerry/Projects/Test/SampleAddins/xx/obj/xx.csproj.*.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.13

---------------------- Done ----------------------

Build: 1 error, 0 warnings
Alexander Jochum
@DarkCloud14
Jan 31 22:33
Which Mono version do you have? Maybe an update of that and using a newer MonoDevelop version using one of the installers found here: https://github.com/cra0zy/monodevelop-run-installer will help
How did you install MonoDevelop 7.0?! Did you build it from source or used an installer like above/installed via package manager?1
g
@germgerm
Jan 31 22:35
MD 7.4.0.839 - from source
mono 5.4.1.7
Alexander Jochum
@DarkCloud14
Jan 31 22:37
Can you test the MonoDevelop 7.3.3.5-1 installer of the site above, maybe something during compilation went wrong?!
I just tested with that version
g
@germgerm
Jan 31 22:41
Will try it tomorrow - thanks
Alexander Jochum
@DarkCloud14
Jan 31 22:43
If nothings works you can try to get in touch with the dev of MonoDevelop.AddinMaker (https://github.com/mhutch/MonoDevelop.AddinMaker)
Alexander Jochum
@DarkCloud14
Jan 31 23:53
@germgerm sorry I made a mistake, I tested with an older MD version (7.0.1.24-2) in my linux vm and for that version only an older MonoDevelop.AddinMaker is available.
After installing version 7.3.3.5-1 and the latest AddinMaker version I get the same errors as you when I create a new project or try to compile a old project.
Looks like a bug of AddinMaker maybe there is already an issue, haven't looked..
If you don't need to use the latest MonoDevelop version and just want to get into addin programming you could of course go back to an older MD version with an older AddinMaker version...