Netduino Plus + Visual Studio 2015 + Windows 10

Just grabbed my old Netduino Plus Gen 1 and wanted to use it but it's quit challenging to find information of how to this in a modern setup.
Installing the .NET Micro Framework SDK v4.2 from the the downloads page does not work because it requires Visual Studio 2010.
After a bit of trial-and-error her is what finally worked for me:

  1. Browse to netduino.com/downloads and download and install in the given order this from the "netduino 3, netduino 2 and go" section:
    1. .NET Micro Framework SDK v4.3
    2. Netduino SDK v4.3.2.1
    3. Netduino Legacy Templates Not available anymore
  2. Run MFDeploy.exe to verify that you can Ping your device and press "Ctrl + Shift + C "to check that you have the latest firmware (v4.2.0.1, upgrade if you don't have it):
     mfdeploy
  3. Run Visual Studio 2015, open the Extension Manager, install ".NET Micro Framework Project System" and restart your IDE.
  4. You should now have the right project templates available and are ready to go:
    vs2015_newproject

Installing all NuGet package dependencies without Visual Studio

For the DeltaEngine we're using NuGet to manage our third-party dependencies.
The problem is that only 
Visual Studio 2010 Pro or Visual Studio 2012 (all editions) supporting automatic restore,
other IDE's like SharpDevelop or MonoDevelop are not supported.

By default you can install all references of a Visual Studio project inside a solution like this:

nuget.exe install project-folder\packages.config

However, normally you have more than one project inside a solution and all this "packages.config" references are aggregated inside a "packages\repositories.config" file like this:

<repositories>
  <repository path="..\Core\Tests\packages.config" />
</repositories>

Sadly, installing directly from a "repositories.config" like with a "packages.config is not possible Frown
To overcome this problem I created this little PowerShell script that iterate each reference inside the XML file and execute the install command for every "packages.config" file.
Note that you have to download and copy the nuget.exe commandline version from CodePlex and copy it inside the ".nuget" directory of your solution to make it work.
Now simply copy this script inside the root of you solution and execute it (look here if local script execution is disabled on you system):

Function InstallPackages($packagesConfigPath)
{
    $nugetInstallCmd = "..\.nuget\nuget.exe install ""{0}""" -f $packagesConfigPath
    Invoke-Expression $nugetInstallCmd
}

Function IterateRepositoriesAndInstall
{
    [xml]$repositoriesConfig = Get-Content .\repositories.config
    foreach( $repository in $repositoriesConfig.repositories.repository) 
    { 
        InstallPackages($repository.path)
    }
}

Function ShowInstallInstructions
{
    Write-Warning "nuget.exe not found! Pleas download the commandline version from ""http://nuget.codeplex.com/releases"" and copy it inside the "".nuget"" directory."
    Read-Host
}

Set-Location .\packages
if (Test-Path ..\.nuget\nuget.exe)
{
    IterateRepositoriesAndInstall
}
else
{
    ShowInstallInstructions
}

Powershell: The execution of scripts is disabled on this system

File Foo.ps1 cannot be loaded because the execution of scripts is disabled on this system.

If you get an error messag like this you have to change the ExecutionPolicy to Unrestricted to allow the execution of local scipts (run with admin rights):

PS C:\> Set-ExecutionPolicy Unrestricted

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
http://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y
PS C:\>

That's it Smile