locked
Sample C# template for a WHS Console Add-in RRS feed

  • General discussion

  • So, I'm sure that others have struggled a lot more than me, trying to get a console add-in to actually run. Now that I've actually had more than 15 minutes to poke at the SDK, I've put together a Visual C# custom project template for an add-in. You should download the .zip file and put it here (don't unzip it!):

    %userprofile%\My Documents\Visual Studio 2005\Templates\ProjectTemplates\Visual C#

    You'll have to change the reference to HomeServerExt.dll to point to wherever you decided to put it (unless you think exactly like me, which is a scary thought...)

    If you have any major problems with the code, let me know. There's no installer project (which would basically be a .wxs file and a batch file that runs the WiX compiler and linker) because Beta 2 doesn't have a way to install the dll created anyway. For now just drop it on the server, in C:\Windows Home Server, and restart the console.

    I'm going to put a VB version together when time permits, which is probably not for a couple of days.
    Sunday, April 15, 2007 5:14 PM
    Moderator

All replies

  • So, umm, there was a tiny bug in the code I provided above. The Settings tab didn't work. (That's what I get for mucking around with code that was working.) It works now, so you should download the template again, if you downloaded it before. Or, of course, you could fix the code yourself. It's a simple fix, finding and correcting which I'll leave as an exercise for the student.

    Oh, and if you noticed that it was broken, why didn't you let me know? Smile I mean, half the code didn't work; that's a pretty major problem in my book. My email address is in my profile here.

    VB is still a bit delayed (I've got other things to do with my time, even if it seems like I post 'round the clock here). I do have a functional add-in, but I need to clean it up and make a template out of it.
    Tuesday, April 17, 2007 1:28 PM
    Moderator
  • Hi,Ken

        Thanks a lot for your template, It's very useful to a starter developer for the WHS.

     

    earthcat

    Tuesday, June 12, 2007 2:53 AM
  • Nice one Ken.  Looking forward to your VB template!!
    Thursday, June 14, 2007 3:03 PM
  • I have downloaded the template and it compiles perfectly just as is, however when I deploy it to my WHS no tab is displayed.  So my question: What info do I need to add to get it displayed in WHS.  I have followed all the tips in the SDK and the forums about making sure that everything is named correctly.
    The dll is named as requested by the SDK, but it is not recognized.  Any help would be greatly appreciated.  I am an experienced programmer, but I have never worked with APIs and SDKs before.
    Thanks
    Wednesday, July 11, 2007 6:55 PM
  • Thanks a lot for the template, it did saved a lot of headache for me.

     

     

    Wednesday, July 18, 2007 3:45 PM
  • Ken how is the VB version template doing, thanks Ken
    Monday, July 23, 2007 7:01 PM
  • sorry i am a bit new to this and i am not sure what to do with this file.... =P could you explain a bit more if you have time. =)
    Tuesday, July 24, 2007 9:58 AM
  • Hi Ken I have a copy of the VB version template (http://whssource.com/SampleWHSTabVB.zip), but it giving me errors, I must be doing something wrong if you can help that would be great.
    Tuesday, July 24, 2007 8:18 PM
  • Yes, there's a problem with the VB.Net version of the template. I even have a good idea what the problem is; I took some shortcuts that allowed the template builder in Visual Studio Express to do something unsavory with the code when it created the template. But for the past several weeks, I've been too busy to work on the "Code To Fame" entry that I had planned, much less fix the VB.Net template.

    When I can make time, I will, but I won't make any promises as to when that will be, other than soon.
    Wednesday, July 25, 2007 4:32 AM
    Moderator
  • Thanks Ken for your help and work.
    Wednesday, July 25, 2007 5:17 AM