The problem is that I have Rhino5 installed, and VS2017 only provides RhinoCommon templates for v6. So I get this error when I build and run the template (see tutorial my first Plugin for Windows) :
You don’t need a template at all. All you need to do is referencing the libraries manually (set local copy to false) and target/set the right dot net framework (4.0 in Rh 5). So you should only need to modify your v6 template project. I don’t remember the exact steps. Hopefully somebody else is giving a better explanation. But maybe downloading VS2015 is the better alternative…
Finally I installed VS 2012 and the RhinoCommon v5 wizard. This works fine. I’m just a bit amazed by the quantity of code in that example (MyFirstPlugin), that just draws a line. I understand this is for the purpose of presenting the general case of writing commands etc… But it looks really like a lot more of informatic concepts for someone who is just used to Scripting like me.