Share via


Version 1.1 of Solidity Extension released!

We have just released an update to the Solidity extension for Visual Studio.  There has been lots of feedback from the community and it's very much appreciated.  Detailed below is more information about the update.

Getting the update

We had to make some core changes to the project structure to support the ability to handle multi-project solutions.  The update should happen automatically in the background as any other extension, via a notification in Visual Studio.   If you don't see the upgrade pop up you will have to do some manual work to get this specific update.  If you don't see the automatic upgrade, please follow these steps:

  1. First uninstall the current Solidity extension.
    • Click on Tools -> Extensions and Updates...
      tools_upd
    • Scroll down to find the Solidity Extension and click Uninstall.
      tools_upd_uninstall
  2. Next install the latest extension by browsing to the public marketplace (Solidity in Visual Studio Marketplace), downloading and installing the extension.

New Features

With this release there are several new features.  These range from code editing to new templates.

Code Editing

Obviously, one of the primary reasons you would be using Visual Studio is to write some code.  Over the years developers have become accustomed to features such as auto complete and coloring.  The Solidity extension has implemented the language from scratch so all of these features need to implemented.  We have a start with this version.

  • Auto Completion - Automatic completion of code statements have been implemented for these keywords (Contract, Function, Import, Struct, Mapping, Address, Constant, Returns, Return, If/Else)
    auto-complete
  • Bracket Matching - Bracket matching is ability of the IDE to show the starting/closing brackets for ('{}','()','[]').  This means that if either the starting or closing brackets are selected by the developer, the paired bracket is highlighted.  This makes it easier to find missing brackets in more complex code.
    bracket-matching
  • Keyword Highlighting - Keyword highlighting is a feature that highlights exact words that match the word that is currently select (clicked on) by the user.  This makes it easier to find dependencies in your code or when refactoring/cleaning up code.

    keyword-matching

Templates

Templates for various projects are essentially a collection of assets that make up a project or solution in Visual Studio.  These templates can be comprised of one or more projects.  In the initial release, the Solidity extension only had one project template, essentially for smart contract development.  With this release we have changed the extension to allow for multi-project templates.  This is core packaging feature change.

Smart Contract Project

This project's purpose is for development of smart contracts including authoring, compiling and deployment from inside the IDE.

smart_contract

Decentralized ASP.Net Web Application

This project's purpose is for not only the development of smart contracts but it also included a project for hosting the UI in the form of an ASP.Net MVC web application.  This is the initial introduction of this model and will be extended to include more samples.  The core idea here is to demonstrate to developers not only how to build smart contracts but also how to hook them up to an actual application.

aspnet

Decentralized Node Web Application

This project's purpose is for not only the development of smart contracts but it also included a project for hosting the UI in the form of an nodejs express web application.  This is the initial introduction of this model and will be extended to include more samples.  The core idea here is to demonstrate to developers not only how to build smart contracts but also how to hook them up to an actual application.

node

Bug Fixes

And lastly, we have been busy slaying bugs that existed in the initial release.  Also, the feedback is much appreciated, both bugs and new ideas for how to make this tooling better.

  • Removed the README.html from loading automatically at startup for Smart Contract Projects.  The original intent of this was to inform the developer that they needed to run bloc in order to deploy smart contracts to a blockchain.  The manner in which is opened, was such that if the project was reloaded (which is triggered by lots of things), it will reload the readme.  This really affected developers that were trying to add this project to an existing solution or add existing projects to this solution.  We have removed this, as we have a blog post about how to set this up now.
  • Fixed issue where contracts created via New Item, were now compiling/deploying correctly.  The issue here was caused by an binary issue with the template used to create the smart contract via new item.  We have corrected this issue and this will now work with no issues.
  • Fixed bug where only one contract could be deployed in a single session.  This one is was simply caused by a caching issue inside the extension and has been resolved.
  • Improved error handling/messaging when bloc is not running.  In the initial release if bloc server was not running, the user would be a object not found issue.  We are handling these exceptions from bloc in a better way now, and the user will be messaged that bloc is having some problems, and where to start checking for problems.
  • Updated the extension to fix compatibility issues with blockapp-bloc endpoints.  There were some changes as this package evolves that the extension is now fully supported with.
  • Fixed bug where compiling smart contracts in subfolders was not outputting to the correct location.  They are all in the bin folder now.

More to follow

We will be publishing more updates in quicker timeframes going forward.  We already have a few new features queued up and in testing now, to be released shortly.  Again feedback in always welcome via comments to this site.

Comments

  • Anonymous
    June 21, 2016
    Does it support 32 bit windows?
    • Anonymous
      June 21, 2016
      Most of the extension is compliant with both architectures (x86 and x64), however the solc compiler that is used is 64bit only. This limits usage to only 64bit unfortunately.
  • Anonymous
    September 20, 2016
    I am using version 1.1.4.0 and template 'Decentralized Node Web Application'.Getting error the project comes up. I am using Windows 10 and x64 with AMD processor. "A problem was encounters creating the sub project'WebApp'. The template specified cannot be found. Please check that the full path is correct."Help Please.
    • Anonymous
      September 20, 2016
      Can you ensure you have the nodejs tools for Visual Studio installed. We have this in the backlog to add detection to check for this but it currently doesn't check. https://www.visualstudio.com/en-us/features/node-js-vs.aspx
      • Anonymous
        September 21, 2016
        Thanks Cale. That worked. Moving forward on the POC.
  • Anonymous
    September 21, 2016
    The comment has been removed
  • Anonymous
    November 13, 2016
    The comment has been removed
    • Anonymous
      November 22, 2016
      Yes, this looks the same issue as Compeador. There was a glitch with strato-dev4 (public strato instance) that probably caused your pain. Go into your the folder you created with bloc init and into the app subfolder and delete the users and meta folder and restart the bloc instance. Let me know if you see any further issues, but you should be good now.
      • Anonymous
        January 20, 2017
        I have exact the same issue. Have you been able to solve this?
        • Anonymous
          March 08, 2017
          Hi Eric,Yep, same as with the others, the backend blockchain (http://strato-dev4.blockapps.net) is having some stability issues. Apologies we are getting this resolved, but no alternative but to create your own instance for now or use the TestDrive to get 2 hours for free. I will update the blog when the new server is ready.Thanks!Cale