Please ensure you have prepared your machine well in advance of the workshop. Your time during the workshop is valuable, and we want to use it for learning, rather than setting up machines.
If you have any difficulty preparing your machine, or following this document, please raise an issue in this repository ASAP so that we can resolve the problem before the workshop begins.
- Preparing your machine for the workshop
- Running the exercise solutions
- Preparing your machine for the advanced exercises
- Demos
- FAQ
- Install the pre-requisites
- Get a copy of this repository
- Set up the databases
- Build the exercise solutions
To complete the exercises, you require a Windows machine and Visual Studio. You must be using a Windows client edition, such as Windows 10, rather than a server edition, such as Windows Server 2016. The Particular Platform Installer does not support server editions of Windows.
Install Visual Studio 2017 (Community, Professional, or Enterprise) with the following workloads:
- .NET desktop development
- ASP.NET and web development
To ensure MSMQ and DTC are correctly installed, run the Particular Platform Installer.
NOTE: If you are using Microsoft Edge, see the FAQ.
In the installation screen, select a minimum of:
- "Configure MSDTC for NServiceBus"
- "Configure Microsoft Message Queuing"
All other components are optional.
Clone or download this repo. If you're downloading a zip copy of the repo, ensure the zip file is unblocked before decompressing it:
- Right-click on the downloaded copy
- Click "Properties"
- On the "General" properties page, check the "Unblock" checkbox
- Click "OK"
WARNING: There is a bug in SQL Server 2017 LocalDB which results in incorrect paths being used for database files. If you have issues running the SQL script, uninstall SQL Server 2017 LocalDB. You should then be able to use SQL Server 2016 LocalDB, which is installed with Visual Studio 2017.
Open an elevated command prompt, navigate to your copy of this repo, and run:
powershell -NoProfile -ExecutionPolicy unrestricted -File exercises\scripts\Setup-LocalDBInstance.ps1When you no longer need to run the exercises, you may optionally run Teardown-LocalDBInstance.ps1.
Now connect to your LocalDB instance and run exercises\scripts\Setup-Databases.sql.
You can do this using either SQL Server Management Studio (if you already have it installed) or Visual Studio. If using Visual Studio:
- Open
exercises\scripts\Setup-Databases.sql - From the Visual Studio menus, select SQL -> Execute
- Choose this instance: Local -> microservices-workshop
- Click "Connect"
- After the query has run, ensure that you see "Command(s) completed successfully."
The exercises are contained in eight Visual Studio solutions under exercises. All the solutions require NuGet package restore. This may be possible at the workshop venue (you can verify with the workshop organizers if internet access is available at the venue) but to ensure you can build the solutions during the workshop, we recommend you restore all NuGet packages and build all the solutions before the workshop starts. The simplest way to do this is to open a command prompt, navigate to your copy of this repo, and run .\build.cmd exercises. (For a full list of build targets, run .\build.cmd -T, or .\build.cmd -h for help.) You can safely ignore any compiler warnings.
Before opening any exercise solutions, set the startup projects by navigating to your copy of this repo and running set-startup-projects.cmd. Note that if you git clean your clone, you will have to run this command again.
The startup projects are also listed in the instructions for each exercise. If you need to, you can configure them manually:
- In Visual Studio, right click the solution in the Solution Explorer
- Click "Properties"
- Ensure that, in the left hand pane, "Common Properties", "Start Project" is selected.
- Select the "Multiple startup projects" radio button
- Set the "Action" for each project listed in the instructions for the exercise to "Start".
To run an exercise solution, simply press F5 in Visual Studio. The exercise solution will now be running and fully functional.
The solutions contain single page applications (SPAs) and use IIS Express. To prevent caching issues, before switching to another exercise:
- Ensure that
IIS Expressis shut down - Clear the browser cache (or disable it entirely). Alternatively, the cache can cleared by refreshing the page using Shift+F5 or Ctrl+Shift+R in some browsers.
- When running a solution, the wrong page is sometimes displayed in the browser. Either:
- Ensure all HTML template files are closed when the application is run, or:
- Manually change the browser address to the root URL.
If you completed all the standard exercises, first of all, well done!
You can now attempt the advanced exercises. Don't worry if you don't manage to start or complete the advanced exercises during the workshop. You can also attempt them after the workshop is finished. If you have questions, you can ask them during the workshop or in our community discussion forum.
It is likely that you will have to read documentation for the Particular Service Platform to finish the advanced exercises. Links to documentation will be provided.
To complete the advanced exercises, you first need to install the rest of the Particular Service Platform:
- ServicePulse: a web app which monitors your endpoints.
- ServiceInsight: a desktop app which visualises the flow of messages within and between endpoints in detail.
- ServiceControl: a Windows service which collects the data that drives ServicePulse and ServiceInsight.
Run the Particular Platform Installer again, selecting ServiceControl, ServiceInsight, and ServicePulse.
When installation has completed, click "Start ServiceControl Management".
You may now close the Particular Service Platform Installation window.
In the ServiceControl Management window, click "Add new instance".
In the settings for the new instance, there are two choices you must make:
- "Transport": choose "MSMQ".
- "Audit forwarding": choose "Off".
All other settings should be left with their default values.
Click "Add".
After the instance has been added, make a note of the name of the instance. This will usually be "Particular.ServiceControl".
You may now close the ServiceControl Management window.
You're now ready to attempt the advanced exercises!
The asp-net-core solution demonstrates the use of ASP.NET Core to compose a UI with data from several services.
The self contained platform demo includes ServicePulse, ServiceControl, ServiceControl Monitoring and a few endpoints to demonstrate monitoring and recovery.
If the answer to your question is not listed here, consult your on-site trainer.
The simplest method is to reset all the databases (see below). Bear in mind that this will reset all the databases for all the exercises.
Alternatively, if you want to clear the orders list for a specific exercise, connect to the LocalDB instance, and either pick out and run the drop and create statements for that exercise from the scripts, or manually delete, or truncate, the tables that need to be cleared.
To reset all the databases:
Connect to the instance and run Teardown-Databases.sql followed by Setup-Databases.sql, both located in the exercises/scripts folder.
Yes. However, Visual Studio 2017 comes with SQL Server 2016 LocalDB, which is not compatible with Windows 7. Instead, you will need to install SQL Server 2014 LocalDB. When prompted to choose which file to download, choose either the 64-bit or 32-bit version of SqlLocalDB.msi, depending on your Windows installation.
When you attempt to download the installer, you may be presented with this message:
If so, click on "View Downloads" to show the "Downloads" window:
Right-click the red text "This unsafe download was blocked by SmartScreen Filter." to show the context menu:
Click "Download unsafe file".


