Giter Club home page Giter Club logo

monodevelop-paket-addin's Introduction

Paket Support for MonoDevelop and Xamarin Studio

Provides Paket support for MonoDevelop and Xamarin Studio.

For more details see the Paket Support in Xamarin Studio blog post

Build Status

Mono .NET
Mono CI Build Status .NET CI Build Status

Features Overview

  • View dependencies and referenced NuGet packages in the Solution window.
  • Add, remove, update NuGet packages from the Solution window.
  • Install, restore, simplify NuGet packages from the Solution window.
  • Check for updated NuGet packages from the Solution window.
  • Syntax highlighting for all paket files.
  • Code completion whilst editing the paket.dependencies file.
  • Integrates with Xamarin Studio's unified search.
  • paket.dependencies and paket.template file templates.

Requirements

  • MonoDevelop 7 or Visual Studio for Mac 7

Installation

MonoDevelop

The addin is available from the MonoDevelop addin repository. To install the addin:

  • Open the Add-in Manager dialog.
  • Select the Gallery tab.
  • Select Xamarin Studio Add-in Repository (Alpha channel) from the drop down list.
  • Expand IDE extensions.
  • Select Paket.
  • Click the Refresh button if the addin is not visible.
  • Click Install... to install the addin.

Paket addin in the addin manager dialog

Visual Studio for Mac

The addin is available from my MonoDevelop Addins. To install the addin:

  • Open the Add-in Manager dialog.
  • Select the Gallery tab.
  • Open the Repository drop down list and select Manage Repositories.
  • Click the Add button.
  • Enter the url for the Visual Studio for Mac version.
  • Click OK.
  • Expand IDE extensions.
  • Select Paket.
  • Click the Refresh button if the addin is not visible.
  • Click Install... to install the addin.

Features

In the following sections the features are covered in more detail.

Adding a NuGet Package

To add a NuGet package using Paket, right click the project in the Solution window, and select Add - Add NuGet Packages using Paket.

The Add NuGet Packages using Paket menu is also available from the main Project menu.

Paket Dependencies Folder

The Paket Dependencies folder is shown in the Solution window if Xamarin Studio finds a paket.dependencies file in the same directory as the solution. The NuGet packages that are in the paket.dependencies file are shown under this folder.

Paket Dependencies folder in Solution window

Double clicking the folder will open the paket.dependencies file into the text editor. The Paket Dependencies folder also has a context menu where you can run Paket commands. From the context menu you can Add a NuGet Package as a dependency, install, restore, update, and simplify your dependencies, or check for updates.

To update a single NuGet package you can right click it and select Update. To remove the NuGet package as a dependency you can right click it and select Remove or press delete.

Paket References Folder

The Paket References folder is shown in the Solution window if Xamarin Studio finds a paket.references file in the same directory as the project. The NuGet packages that are in the paket.references file are shown under this folder. Double clicking the folder will open the paket.references file into the text editor.

Paket References folder in Solution window

Right clicking the Paket References folder allows you to add a NuGet package to the project. A NuGet package can be removed by right clicking it and selecting Remove or by pressing Delete.

Code Completion

When editing the paket.dependencies file you will get code completion as you type. You can also bring up the code completion list by pressing Ctrl+Enter.

paket.dependencies file keyword completion

Running Paket Commands

Paket commands can be run from the Unified search. If you type in paket you will see some of the Paket commands.

Paket commands in unified search

Syntax Highlighting

Syntax highlighting is available for all paket files - paket.dependencies, paket.references, paket.lock and paket.template.

paket.dependencies file syntax highlighting

monodevelop-paket-addin's People

Contributors

mrward avatar sideeffffect avatar tani avatar

Stargazers

 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

monodevelop-paket-addin's Issues

No packages in the repo

Hi!

Followed the instructions and added the alpha channel, hit refresh, but can't find any package at all at that channel, is it me or is something broken?

Best regards
Peppe

Update Paket

Could you please update to the newest version of Paket, please?
The newest version is 3.x as of today, while this extension works with 1.x.
That means that it e. g. can't work with "Dependency Groups" in paket.dependencies/paket.references.

Update paket to a more recent version

Hi,
We are using this plugin in Visual Studio for mac but the version shipped with the plugin is too old and it doesn't support things like "restriction: >= net45".
We tried to simply upgrade the paket.exe binary in the plugin but it does not seems to work.
Is it possible to upgrade paket to a more recent version?

Code completion fails when on last line

To reproduce:

  1. Open the paket.dependencies file.
  2. Move to the last line of the file. Create an empty line if necessary.
  3. Type in c and then press tab or enter.

Expected result:

The keyword content is completed and 'content:' is added to the file.
Nothing happens. Keywords that do not append a ':' at the end, such as nuget do work on the last line of the file. If there is another empty blank line at the end then code completion works.

In the IDE log:

Error in text editor extension chain
System.ArgumentException: offset >= TextLength
  at Mono.TextEditor.TextDocument.GetCharAt (Int32 offset) [0x0003c] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs:341 
  at Mono.TextEditor.TextEditorData.GetCharAt (Int32 offset) [0x00008] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorData.cs:1347 
  at MonoDevelop.SourceEditor.SourceEditorView.SetCompletionText (Mono.TextEditor.TextEditorData data, MonoDevelop.Ide.CodeCompletion.CodeCompletionContext ctx, System.String partial_word, System.String complete_word, Int32 wordOffset) [0x0004c] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs:1916 
  at MonoDevelop.SourceEditor.SourceEditorView.SetCompletionText (MonoDevelop.Ide.CodeCompletion.CodeCompletionContext ctx, System.String partial_word, System.String complete_word, Int32 wordOffset) [0x00021] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs:1979 
  at MonoDevelop.SourceEditor.SourceEditorView.SetCompletionText (MonoDevelop.Ide.CodeCompletion.CodeCompletionContext ctx, System.String partial_word, System.String complete_word) [0x0000b] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs:1903 
  at MonoDevelop.Ide.CodeCompletion.CompletionData.InsertCompletionText (MonoDevelop.Ide.CodeCompletion.CompletionListWindow window, MonoDevelop.Ide.CodeCompletion.KeyActions& ka, Key closeChar, Char keyChar, ModifierType modifier) [0x0001b] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionData.cs:108 
  at MonoDevelop.Ide.CodeCompletion.CompletionListWindow.CompleteWord (MonoDevelop.Ide.CodeCompletion.KeyActions& ka, Key closeChar, Char keyChar, ModifierType modifier) [0x00050] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs:459 
  at MonoDevelop.Ide.CodeCompletion.CompletionListWindow.PreProcessKeyEvent (Key key, Char keyChar, ModifierType modifier) [0x00096] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs:237 
  at MonoDevelop.Ide.CodeCompletion.CompletionWindowManager.PreProcessKeyEvent (Key key, Char keyChar, ModifierType modifier) [0x00048] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionWindowManager.cs:154 
  at MonoDevelop.Ide.Gui.Content.CompletionTextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00010] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs:94 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Debugger.ExceptionCaughtTextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x0006a] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs:796 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress (Key key, UInt32 ch, ModifierType state) [0x00013] in /Users/builder/data/lanes/2968/ac9b7fcb/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs:258 

Error during parsing of paket.lock

When expanding the Paket Dependencies menu item in the Solution explorer, no dependencies are listed.

When trying to use any operation on the Paket Dependencies menu item, such as Restore an error is reported in the Paket Console:

Error during parsing of 'xxx/paket.lock'.

Could not restore paket dependencies.

After adding / removing things from the paket.lock file to see what would get it to parse, it seems related to a framework restriction of netcoreapp2.1. I think the version of the Paket library included in the addon is unable to parse that.

VS for Mac?

Will this project be moving forward with MonoDevelop and Xamarin Studio now being superseded by Visual Studio for Mac?

Unable to add NuGet package - fails to get package details.

If I try to install a NuGet package using this Paket addin I get an error similar to the following in the Paket Console.

Adding Newtonsoft.Json to ~/Projects/Tests/TestPaket/paket.dependencies
Resolving packages:
 - Newtonsoft.Json 9.0.1
Couldn't get package details for package Newtonsoft.Json on any of ["https://nuget.org/api/v2"].

Could not add Newtonsoft.Json.

[Monodevelop 5.10] Install error

Hello there!!

I've got an error when try install this addin on Monodevelop 5.10. Using Monodevelop 5.9.6, was installed succesfull.

Please, see the screen below:

monodevelop 5 10 paket error.

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.