Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing explanation of how to compile #3

Open
Macarse opened this issue Apr 23, 2012 · 6 comments
Open

Missing explanation of how to compile #3

Macarse opened this issue Apr 23, 2012 · 6 comments

Comments

@Macarse
Copy link

Macarse commented Apr 23, 2012

I can't find a way to compile this and make it available to be picked from:

MonoDevelop => Tools => Add-In Manager => Install from file...

@Macarse
Copy link
Author

Macarse commented Apr 23, 2012

I just followed this guide: http:https://monodevelop.com/Writing_an_add-in and created an mpack by:

  • Moving al *.dll files to Stylecop-Monodevelop-Addin/MonoDevelop.StyleCop
  • Run mdtool setup pack MonoDevelop.StyleCop.addin.xml -d:bin

This did work and I could pick the mpack from "install from file" but when I use MonoDevelop I am getting:

System.InvalidOperationException: Type 'MonoDevelop.StyleCop.RunStyleCopOnFileHandler' not found in add-in 'MonoDevelop.StyleCop,1.0'
at Mono.Addins.RuntimeAddin.GetType (System.String typeName, Boolean throwIfNotFound) [0x000f2] in /Users/levi/Code/unity/mono-addins/Mono.Addins/Mono.Addins/RuntimeAddin.cs:339
at MonoDevelop.Components.Commands.ActionCommand.get_DefaultHandlerType () [0x0001d] in /BuildAgent/work/93beeebf637645f/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/ActionCommand.cs:81
at MonoDevelop.Components.Commands.CommandManager.DefaultUpdateCommandInfo (MonoDevelop.Components.Commands.ActionCommand cmd, MonoDevelop.Components.Commands.CommandInfo info) [0x0000b] in /BuildAgent/work/93beeebf637645f/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:750
at MonoDevelop.Components.Commands.CommandManager.GetCommandInfo (System.Object commandId, MonoDevelop.Components.Commands.CommandTargetRoute targetRoute) [0x001a9] in /BuildAgent/work/93beeebf637645f/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:729

@franckleveque
Copy link
Owner

I follow exactly what I wrote in the wiki :

Retrieve last version of sources
Compile the obtained solution
Copy all the dll in the Release folder in your monodevelop addin directory.

By compile the solution, I mean:

  • Open the project in Monodevelop (MonoDevelop.StyleCop.sln)
  • Select in Project / Active configuration Release
  • Right click on the MonoDevelop.StyleCop project in the solution pad and click on build ...

It will create the binaries for the addin, you can found them by :

  • Right click on the MonoDevelop.StyleCop project in the solution pad and click on Open folder in explorer (I think it's the name of the entry but I'm not sure as mine is localized in french

Copy all the file you find in bin/Release and put them in the addin directory of monodevelop.

I didn't encounter any errors following this procedure. Be careful as the current addin is only compatible with Monodevelop 2.4 (It's the version my linux computer have) and not for the last versions of monodevelop (incompatible references to Monodevelop.Core and Monodevelop.Ide, might arise some more problems)

I will update the wiki with this more detailed explanation

@Macarse
Copy link
Author

Macarse commented Apr 24, 2012

Sorry for this, I am quite a newbie with mono.
I am using MonoDevelop 2.4.2 which comes with the version of Unity3d I am using, so I guess this should work.

It calls my attention that the error says: "/Users/levi/" which is definitely not my user. Is it yours?

One additional question. When you say: "It will create the binaries for the addin"
This will create the dll. I would like to create the mpack file to be added from the "Install from file..." menu.

@franckleveque
Copy link
Owner

Nope, it is not mine either.

About your second question, I never used the mpack to install the plugin. I directly copy the 4 dll needed in the addin folder.

The dll are : Monodevelop.Stylecop.dll which is the plugin, Microsoft.StyleCop.dll, Microsoft.StyleCop.CSharp.dll, Microsoft.StyleCop.CSharp.Rules.dll which are the stylecop engine and the associated rules.

If copy them in the addins directory, it will be activated once you restart monodevelop.

@Macarse
Copy link
Author

Macarse commented Apr 24, 2012

Ok, I copied the dlls you mentioned in your last comment.
What are the other dlls at Stylecop-Monodevelop-Addin/dll for?

I guess I am not using:

  • Microsoft.StyleCop.VSPackage.dll
  • NAnt.Core.dll
  • log4net.dll
  • Microsoft.StyleCop.dll
  • net.sf.dotnetcli.dll

Btw, copying the DLLs worked but now I am getting:

System.DllNotFoundException: /path/Contents/MacOS/../Frameworks/Mono.framework/Versions/2.6.7/lib/libgdiplus.dylib
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup

I will see how to fix it.

@Macarse
Copy link
Author

Macarse commented Apr 25, 2012

Well I just tried on 2.8.2. The first time it loads and when I hit Tools -> Run Stylecop on this file and it freezes.
When I open it for the second time inside the Add in setup it says:

"This add-in can't be loaded due to missing dependencies"

The following dependencies required by this add-in are not available:
Required: MonoDevelop.Ide v2.4, found 2.8.2
Required: MonoDevelop.Core v2.4, found v2.8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants