diff --git a/Framework/Algorithms/CMakeLists.txt b/Framework/Algorithms/CMakeLists.txt
index c5c0b300c65b37ab071ad400a391838d0e15e686..43a876468d8670f3943798de99b777b5ceddc0bb 100644
--- a/Framework/Algorithms/CMakeLists.txt
+++ b/Framework/Algorithms/CMakeLists.txt
@@ -1081,6 +1081,10 @@ target_link_libraries(Algorithms
 # Add the unit tests directory
 add_subdirectory(test)
 
+# Auto-generate exports header
+target_include_directories(Algorithms PUBLIC ${CMAKE_BINARY_DIR}/Framework/Algorithms)
+generate_mantid_export_header(Algorithms)
+
 # Installation settings
 
 mtd_install_targets(TARGETS
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AbsorptionCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/AbsorptionCorrection.h
index 54f44cf9d3512e750512ce685b58624622dca6e2..63204b0ce58f3f8a168879076665ff70884785e3 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AbsorptionCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AbsorptionCorrection.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDTypes.h"
 #include "MantidGeometry/Objects/IObject.h"
 #include "MantidKernel/DeltaEMode.h"
@@ -63,7 +64,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella plc
     @date 04/02/2010
 */
-class DLLExport AbsorptionCorrection : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL AbsorptionCorrection : public API::Algorithm {
 public:
   /// (Empty) Constructor
   AbsorptionCorrection();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddLogDerivative.h b/Framework/Algorithms/inc/MantidAlgorithms/AddLogDerivative.h
index b8621e9d3ac6dac18e6fc3b4ca61c21b5d768b54..db1aef6c266454a995bc726f24e2fcf58d26c036 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AddLogDerivative.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AddLogDerivative.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/TimeSeriesProperty.h"
 
 namespace Mantid {
@@ -19,7 +19,7 @@ namespace Algorithms {
   @author Janik Zikovsky
   @date 2011-09-16
 */
-class DLLExport AddLogDerivative : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL AddLogDerivative : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "AddLogDerivative"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddNote.h b/Framework/Algorithms/inc/MantidAlgorithms/AddNote.h
index cc5915191392ecf4d3bbf2985f645a3fb7ed9f13..c42f801d3302d84eece309ee1be9fb1c31794e9e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AddNote.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AddNote.h
@@ -9,6 +9,7 @@
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/DeprecatedAlgorithm.h"
 #include "MantidAPI/Run.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -19,8 +20,8 @@ namespace Algorithms {
   @author Elliot Oram, ISIS, RAL
   @date 17/07/2015
 */
-class DLLExport AddNote : public API::Algorithm,
-                          public API::DeprecatedAlgorithm {
+class MANTID_ALGORITHMS_DLL AddNote : public API::Algorithm,
+                                      public API::DeprecatedAlgorithm {
 public:
   AddNote();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddPeak.h b/Framework/Algorithms/inc/MantidAlgorithms/AddPeak.h
index ba9db54fa0c2ffe31f90c500d9d25e669841d2b7..ff355cce5efb4b081dded26f1d7b1fbf8d3e273f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AddPeak.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AddPeak.h
@@ -7,8 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
-
+#include "MantidAlgorithms/DllConfig.h"
 namespace Mantid {
 namespace Algorithms {
 
@@ -17,7 +16,7 @@ namespace Algorithms {
 
   @date 2012-10-16
  */
-class DLLExport AddPeak : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL AddPeak : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "AddPeak"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddSampleLog.h b/Framework/Algorithms/inc/MantidAlgorithms/AddSampleLog.h
index 85f49c772eae186a98f2d7bd74a22df3d5293ddf..7a6d28ac040290be48407dc2da125d11e82852d4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AddSampleLog.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AddSampleLog.h
@@ -12,6 +12,7 @@
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/ExperimentInfo.h"
 #include "MantidAPI/Run.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -30,7 +31,7 @@ namespace Algorithms {
     to the sample during the experiment. This algorithm allows one named log
     to be entered.
 */
-class DLLExport AddSampleLog : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL AddSampleLog : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "AddSampleLog"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AddTimeSeriesLog.h b/Framework/Algorithms/inc/MantidAlgorithms/AddTimeSeriesLog.h
index b1328fc986000f9189607db39c2544fce0c905cf..acd5059a0a142cb37c6f77d1b1742c7f5642b83f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AddTimeSeriesLog.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AddTimeSeriesLog.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-
+#include "MantidAlgorithms/DllConfig.h"
 namespace Mantid {
 
 namespace API {
@@ -16,7 +16,7 @@ class Run;
 
 namespace Algorithms {
 
-class DLLExport AddTimeSeriesLog : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL AddTimeSeriesLog : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AlignDetectors.h b/Framework/Algorithms/inc/MantidAlgorithms/AlignDetectors.h
index 9837b8651ed818a8c409114880516a42e72d0d99..1bc385de128f306c2768566ec014064a4fb52f4c 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AlignDetectors.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AlignDetectors.h
@@ -8,8 +8,8 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/ITableWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/OffsetsWorkspace.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 
@@ -39,7 +39,7 @@ class ConversionFactors;
     @author Russell Taylor, Tessella Support Services plc
     @date 18/08/2008
 */
-class DLLExport AlignDetectors : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL AlignDetectors : public API::Algorithm {
 public:
   AlignDetectors();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AnnularRingAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/AnnularRingAbsorption.h
index 9366a7b10c7711aad321d2d34a3df57e280d245d..45409f06dca1a25c6bc2bbf362003e5fb3bd6b7c 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AnnularRingAbsorption.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AnnularRingAbsorption.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-
+#include "MantidAlgorithms/DllConfig.h"
 namespace Mantid {
 //-----------------------------------------------------------------------------------------------
 // Forward declarations
@@ -23,7 +23,7 @@ namespace Algorithms {
   Constructs a hollow sample shape, defines material for the sample and runs the
   MonteCarloAbsorption algorithm.
 */
-class DLLExport AnnularRingAbsorption : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL AnnularRingAbsorption : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AnyShapeAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/AnyShapeAbsorption.h
index d79e60df94abc97455b7e2d31ced7491d94a0520..d677a66df7bf68e1891307e9e013518836d66392 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AnyShapeAbsorption.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AnyShapeAbsorption.h
@@ -66,7 +66,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella plc
     @date 11/03/2010
 */
-class DLLExport AnyShapeAbsorption : public AbsorptionCorrection {
+class MANTID_ALGORITHMS_DLL AnyShapeAbsorption : public AbsorptionCorrection {
 public:
   /// (Empty) Constructor
   AnyShapeAbsorption();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AppendSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/AppendSpectra.h
index 0e3b7acf1cfcd913fc19bde92f6cce45ba186c94..9446aa444bb5a2b5ddea6009a4946e80a51a7529 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AppendSpectra.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AppendSpectra.h
@@ -26,7 +26,7 @@ namespace Algorithms {
 
   @date 2012-02-20
 */
-class DLLExport AppendSpectra : public WorkspaceJoiners {
+class MANTID_ALGORITHMS_DLL AppendSpectra : public WorkspaceJoiners {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ApplyCalibration.h b/Framework/Algorithms/inc/MantidAlgorithms/ApplyCalibration.h
index bb5437bd1d8c3abbb28882d5ad5c3704b461472d..eb4dd9cabc983671e3975be1a3372d01005c19c1 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ApplyCalibration.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ApplyCalibration.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -18,7 +19,7 @@ as absolute positions and so this update can be repeated.
 
 @author Karl Palmen
 */
-class DLLExport ApplyCalibration : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ApplyCalibration : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "ApplyCalibration"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ApplyDetailedBalance.h b/Framework/Algorithms/inc/MantidAlgorithms/ApplyDetailedBalance.h
index 4778329b1a65cd567fbb8d5effaffdf9c51ccec4..181d8ba881294df173cf9009fedca100facb8aa5 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ApplyDetailedBalance.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ApplyDetailedBalance.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -18,7 +18,7 @@ namespace Algorithms {
   @author Andrei Savici, ORNL
   @date 2011-09-01
 */
-class DLLExport ApplyDetailedBalance : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ApplyDetailedBalance : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "ApplyDetailedBalance"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ApplyFloodWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/ApplyFloodWorkspace.h
index 6766369aca87e46fa15ca42e6776fe0edcd74b31..c94ee7dc6375a1ce06d779b140b71649d9e803d7 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ApplyFloodWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ApplyFloodWorkspace.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +17,7 @@ namespace Algorithms {
  Algorithm to apply a flood correction workspace to a reflectometry
  data workspace.
  */
-class DLLExport ApplyFloodWorkspace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ApplyFloodWorkspace : public API::Algorithm {
 public:
   const std::string name() const override;
   const std::string summary() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ApplyTransmissionCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/ApplyTransmissionCorrection.h
index 7217c9fbcc80f78ffd79e6853d68383d88a03c60..cccc011216203213f66724bc25d845ed2f882295 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ApplyTransmissionCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ApplyTransmissionCorrection.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -47,7 +48,8 @@ namespace Algorithms {
     File change history is stored at: <https://github.com/mantidproject/mantid>
     Code Documentation is available at: <http://doxygen.mantidproject.org>
 */
-class DLLExport ApplyTransmissionCorrection : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ApplyTransmissionCorrection
+    : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/AverageLogData.h b/Framework/Algorithms/inc/MantidAlgorithms/AverageLogData.h
index 81e6fe823ba0ef277c8929a7f8d8b8fc5b7689bb..336dcdfa85fa0c1c6b19902d51a1164d47137a8f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/AverageLogData.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/AverageLogData.h
@@ -7,14 +7,14 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
 
 /** AverageLogData : TODO: DESCRIPTION
  */
-class DLLExport AverageLogData : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL AverageLogData : public API::Algorithm {
 public:
   AverageLogData();
   ~AverageLogData() override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperateMasks.h b/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperateMasks.h
index d9371359229660cc6c2805264b61e30dba6f50c0..f3aa75fef31548f02967d08fff980739ef3b2280 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperateMasks.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperateMasks.h
@@ -7,14 +7,14 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
 
 /** BinaryOperateMasks : TODO: DESCRIPTION
  */
-class DLLExport BinaryOperateMasks : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL BinaryOperateMasks : public API::Algorithm {
 public:
   BinaryOperateMasks();
   ~BinaryOperateMasks() override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperation.h b/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperation.h
index 2e1d40fee90e426fae0a54f1f7661bc39f3b8241..e34fcd54b7900cd409cb1cfadf2fb27aef54a5f5 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperation.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/BinaryOperation.h
@@ -11,10 +11,10 @@
 #include "MantidAPI/SpectrumInfo.h"
 #include "MantidAPI/WorkspaceGroup_fwd.h"
 #include "MantidAPI/Workspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventList.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidHistogramData/Histogram.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -39,7 +39,7 @@ operand</LI>
 @author Nick Draper
 @date 14/12/2007
 */
-class DLLExport BinaryOperation : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL BinaryOperation : public API::Algorithm {
 public:
   /// Algorithm's category for identification overriding a virtual method
   const std::string category() const override { return "Arithmetic"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h
index 262937c4968d62103833ab01639626aa44080835..b44a6f568137066a5e3a1069a615c8d44a98a9b0 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateCarpenterSampleCorrection.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DataProcessorAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidHistogramData/Points.h"
 #include <vector>
 
@@ -17,7 +18,7 @@ namespace Algorithms {
     out by Jack Carpenter and Asfia Huq and implmented in Java by
     Alok Chatterjee.  Translated to C++ by Dennis Mikkelson.
  */
-class DLLExport CalculateCarpenterSampleCorrection
+class MANTID_ALGORITHMS_DLL CalculateCarpenterSampleCorrection
     : public API::DistributedDataProcessorAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateCountRate.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateCountRate.h
index 599e0b8b257971039ed4ccd64f4eb27bf5a4008d..33002207b0f52caf77121f858c9be2007f449a2b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateCountRate.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateCountRate.h
@@ -7,9 +7,9 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -26,7 +26,7 @@ namespace Algorithms {
   for further event filtering on the basis of these logs, if the log values in
   some parts differ strongly from the average values.
 */
-class DLLExport CalculateCountRate : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CalculateCountRate : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateDIFC.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateDIFC.h
index be9814241fe067b5a98e54e504c1cbc15c57d0bb..a23046749f0f9329305064755ee9dde562e659c4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateDIFC.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateDIFC.h
@@ -7,16 +7,16 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/OffsetsWorkspace.h"
 #include "MantidGeometry/Instrument/DetectorInfo.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
 
 /** CalculateDIFC : Calculate the DIFC for every pixel
  */
-class DLLExport CalculateDIFC : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CalculateDIFC : public API::Algorithm {
 public:
   /// Algorithms name for identification. @see Algorithm::name
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency.h
index 54ab03e0e5e3356e0e3d3712a3267e052d512be8..6080224a8cfdf75a6c8802a2fae0b5c60a1e7155 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -47,7 +48,7 @@ namespace Algorithms {
     File change history is stored at: <https://github.com/mantidproject/mantid>
     Code Documentation is available at: <http://doxygen.mantidproject.org>
  */
-class DLLExport CalculateEfficiency : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CalculateEfficiency : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "CalculateEfficiency"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency2.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency2.h
index e5f2e82ddd34b57604c3bcabad97e980d8cfa899..f9868ce58c526152dec21a9db84904178eda1da4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateEfficiency2.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace {
 struct SummedResults {
@@ -55,7 +56,7 @@ namespace Algorithms {
     File change history is stored at: <https://github.com/mantidproject/mantid>
     Code Documentation is available at: <http://doxygen.mantidproject.org>
  */
-class DLLExport CalculateEfficiency2 : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CalculateEfficiency2 : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "CalculateEfficiency"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateFlatBackground.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateFlatBackground.h
index aedf2f6fa0d8ede7bf86baaae30e9ed275bfff64..5921aebeecb7240dbcafc13585cf8d105bc9126f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateFlatBackground.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateFlatBackground.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/ParallelAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace HistogramData {
@@ -34,7 +35,8 @@ namespace Algorithms {
     @author Russell Taylor, Tessella plc
     @date 5/02/2009
 */
-class DLLExport CalculateFlatBackground : public API::ParallelAlgorithm {
+class MANTID_ALGORITHMS_DLL CalculateFlatBackground
+    : public API::ParallelAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "CalculateFlatBackground"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateIqt.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateIqt.h
index 09ce5681bb3f7fb160ef36cd59ce0cc30ca8c509..cba028ac9c8c378e77a636afd2f59dd9fab03842 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateIqt.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateIqt.h
@@ -8,12 +8,13 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/MersenneTwister.h"
 
 namespace Mantid {
 namespace Algorithms {
 
-class DLLExport CalculateIqt : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CalculateIqt : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateSlits.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateSlits.h
index 2cf5d4cc323a97078da68b396c139613dc348f75..c2f4e1be7d3234316384699c98314856f826ff25 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateSlits.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateSlits.h
@@ -8,7 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/DataProcessorAlgorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include <boost/optional.hpp>
 
 namespace Mantid {
@@ -17,7 +17,8 @@ namespace Algorithms {
 /** CalculateSlits
  */
 
-class DLLExport CalculateSlits : public API::DataProcessorAlgorithm {
+class MANTID_ALGORITHMS_DLL CalculateSlits
+    : public API::DataProcessorAlgorithm {
 public:
   CalculateSlits();
   ~CalculateSlits() override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmission.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmission.h
index fd76c673cbb7282edf99d89ab79b8ce19012272f..a25a9d0746c528064cef1577bb4945f0b169a874 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmission.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmission.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/ParallelAlgorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -47,7 +47,8 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 22/01/2009
 */
-class DLLExport CalculateTransmission : public API::ParallelAlgorithm {
+class MANTID_ALGORITHMS_DLL CalculateTransmission
+    : public API::ParallelAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "CalculateTransmission"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmissionBeamSpreader.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmissionBeamSpreader.h
index bff38b8c3ce1511684145bdc4b80bc889f5af3a4..f8794b98e783cb03a419930a748b45e7481ac621 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmissionBeamSpreader.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateTransmissionBeamSpreader.h
@@ -10,7 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -55,7 +55,8 @@ namespace Algorithms {
     @author Mathieu Doucet, ORNL
     @date 28/07/2010
 */
-class DLLExport CalculateTransmissionBeamSpreader : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CalculateTransmissionBeamSpreader
+    : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CalculateZscore.h b/Framework/Algorithms/inc/MantidAlgorithms/CalculateZscore.h
index 985ddec6de92a997f3ec7d40a0addc2886274483..bd5c5395df2870c91ef83cbfc7faba7fb7cf5216 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CalculateZscore.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CalculateZscore.h
@@ -7,14 +7,14 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
 
 /** CalculateZscore : Calculate Zscore for a Matrix Workspace
  */
-class DLLExport CalculateZscore : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CalculateZscore : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "CalculateZscore"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h
index df874c3cc75cfe38eecb3b8a83f16f47ad13902c..75257563a13d929f0f2dcd4e733edb4c30eda3e4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CarpenterSampleCorrection.h
@@ -7,6 +7,7 @@
 #pragma once
 #include "MantidAPI/DataProcessorAlgorithm.h"
 #include "MantidAPI/WorkspaceGroup.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include <vector>
 
 namespace Mantid {
@@ -16,7 +17,7 @@ namespace Algorithms {
     out by Jack Carpenter and Asfia Huq and implmented in Java by
     Alok Chatterjee.  Translated to C++ by Dennis Mikkelson.
  */
-class DLLExport CarpenterSampleCorrection
+class MANTID_ALGORITHMS_DLL CarpenterSampleCorrection
     : public API::DistributedDataProcessorAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ChangeBinOffset.h b/Framework/Algorithms/inc/MantidAlgorithms/ChangeBinOffset.h
index 2647a0f9eff86a17e5b68f767c32fd979b3278ac..307368d5caa98f4ae73e70fc5e16fc0d5a13b585 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ChangeBinOffset.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ChangeBinOffset.h
@@ -23,7 +23,7 @@ Required Properties:
 @author
 @date 11/07/2008
 */
-class DLLExport ChangeBinOffset : public SpectrumAlgorithm {
+class MANTID_ALGORITHMS_DLL ChangeBinOffset : public SpectrumAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "ChangeBinOffset"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ChangeLogTime.h b/Framework/Algorithms/inc/MantidAlgorithms/ChangeLogTime.h
index 897f95341dda4262745305851682f8b1d91f196d..0b74530b11fe26ea4c59d20ee159228e8a99b597 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ChangeLogTime.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ChangeLogTime.h
@@ -7,11 +7,12 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
 
-class DLLExport ChangeLogTime : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ChangeLogTime : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime.h b/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime.h
index bdf0481e1eb5c066dcb9c0533f965756b65ba0ba..cd604e1272ec0fb07fa38a99572ea9f1f1cd03a9 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -17,7 +17,7 @@ namespace Algorithms {
  * @author
  * @date 2011-03-31 09:31:55.674594
  */
-class DLLExport ChangePulsetime : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ChangePulsetime : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "ChangePulsetime"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime2.h b/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime2.h
index e17dae788d3b3edaa2a8af7bfa70941d629bfea9..2cc864988a3f9d201c7a07233abbd02d86de369d 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ChangePulsetime2.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -17,7 +17,7 @@ namespace Algorithms {
  * @author
  * @date 2011-03-31 09:31:55.674594
  */
-class DLLExport ChangePulsetime2 : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ChangePulsetime2 : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "ChangePulsetime2"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ChangeTimeZero.h b/Framework/Algorithms/inc/MantidAlgorithms/ChangeTimeZero.h
index 68563b53bcd01c7423425486078966fed0237a55..c10e3741f56691e7182cabb5b81b9bcafa1150ba 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ChangeTimeZero.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ChangeTimeZero.h
@@ -7,16 +7,16 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/DateTimeValidator.h"
 #include "MantidKernel/PropertyWithValue.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/TimeSeriesProperty.h"
 #include <boost/shared_ptr.hpp>
 
 namespace Mantid {
 namespace Algorithms {
 
-class DLLExport ChangeTimeZero : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ChangeTimeZero : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "ChangeTimeZero"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CheckWorkspacesMatch.h b/Framework/Algorithms/inc/MantidAlgorithms/CheckWorkspacesMatch.h
index 1c38afa89e74a160dc35fb5e3ccdf165d67f68e7..24d00f7e40ff12bd971a2a131c160a4479b7ba21 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CheckWorkspacesMatch.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CheckWorkspacesMatch.h
@@ -12,6 +12,7 @@
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/DeprecatedAlgorithm.h"
 #include "MantidAPI/IPeaksWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 
 namespace Mantid {
@@ -56,8 +57,9 @@ namespace Algorithms {
  *
  *
  */
-class DLLExport CheckWorkspacesMatch : public API::Algorithm,
-                                       public API::DeprecatedAlgorithm {
+class MANTID_ALGORITHMS_DLL CheckWorkspacesMatch
+    : public API::Algorithm,
+      public API::DeprecatedAlgorithm {
 public:
   CheckWorkspacesMatch();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ChopData.h b/Framework/Algorithms/inc/MantidAlgorithms/ChopData.h
index 1508d93502924f7b1ac8e40f28905b0547347e52..fd777e25d7b5368878f20bc4b93c312b1265aec4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ChopData.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ChopData.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -19,7 +20,7 @@ namespace Algorithms {
   @author Michael Whitty
   @date 03/02/2011
 */
-class DLLExport ChopData : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ChopData : public API::Algorithm {
 public:
   const std::string name() const override {
     return "ChopData";
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ClearInstrumentParameters.h b/Framework/Algorithms/inc/MantidAlgorithms/ClearInstrumentParameters.h
index 33a6a6da36bfc430b577b00fc3641bc6f40ff61d..6ffd3771a03c183520bb22c72da5ad7f2bc8d68b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ClearInstrumentParameters.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ClearInstrumentParameters.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 
@@ -18,7 +18,7 @@ namespace Algorithms {
   @author Harry Jeffery, ISIS, RAL
   @date 30/7/2014
 */
-class DLLExport ClearInstrumentParameters : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ClearInstrumentParameters : public API::Algorithm {
 public:
   const std::string name() const override;
   const std::string summary() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ClearMaskFlag.h b/Framework/Algorithms/inc/MantidAlgorithms/ClearMaskFlag.h
index 5bd536ea0fafd482c42287501812c1f61f8c5221..a26742b16d31d0622fe747409a5921d0295ab937 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ClearMaskFlag.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ClearMaskFlag.h
@@ -7,14 +7,14 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
 
 /** ClearMaskFlag : Delete the mask flag/bit on all spectra in a workspace
  */
-class DLLExport ClearMaskFlag : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ClearMaskFlag : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CloneWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CloneWorkspace.h
index b7555cb4b52d56b230df3043a143f1b3f30a90a0..58017f18bb7582f0ff006ccaa3b72e612a9fb33b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CloneWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CloneWorkspace.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -24,7 +25,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 09/12/2009
 */
-class DLLExport CloneWorkspace : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL CloneWorkspace : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "CloneWorkspace"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Comment.h b/Framework/Algorithms/inc/MantidAlgorithms/Comment.h
index ca39882bfb8f1f5823245385c67b3a79aa7917b9..f24316e9c28b6117fc6a8d053e927bda1dbd3567 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Comment.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Comment.h
@@ -13,7 +13,7 @@ namespace Algorithms {
 
 /** Comment : Adds a note into the history record of a workspace
  */
-class DLLExport Comment : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL Comment : public API::DistributedAlgorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CommutativeBinaryOperation.h b/Framework/Algorithms/inc/MantidAlgorithms/CommutativeBinaryOperation.h
index e17c665631669ac4133826ee265d68b8cdf6ca2e..70561e17001b14a4e9238f611d4b3d0993f7710c 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CommutativeBinaryOperation.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CommutativeBinaryOperation.h
@@ -21,7 +21,8 @@ It inherits from the BinaryOperation class.
 @author Nick Draper
 @date 23/01/2008
 */
-class DLLExport CommutativeBinaryOperation : public BinaryOperation {
+class MANTID_ALGORITHMS_DLL CommutativeBinaryOperation
+    : public BinaryOperation {
 public:
 protected:
   // Overridden BinaryOperation method
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CompareWorkspaces.h b/Framework/Algorithms/inc/MantidAlgorithms/CompareWorkspaces.h
index d0947d05a547fc7b2785c3816541f15de11b3ed6..bbba6aaba7f3fe14963cb92a3efb48f57e9302a1 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CompareWorkspaces.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CompareWorkspaces.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/ITableWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/PeaksWorkspace.h"
 
@@ -55,7 +56,7 @@ namespace Algorithms {
  *
  *
  */
-class DLLExport CompareWorkspaces : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CompareWorkspaces : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "CompareWorkspaces"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConjoinWorkspaces.h b/Framework/Algorithms/inc/MantidAlgorithms/ConjoinWorkspaces.h
index 3d63bcd088860247cc1f5e2e1113d23d9d55d0e4..1e3d902eb4af19f8bacc8be67def4b14c45bd470 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConjoinWorkspaces.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConjoinWorkspaces.h
@@ -42,7 +42,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella
     @date 25/08/2008
 */
-class DLLExport ConjoinWorkspaces : public WorkspaceJoiners {
+class MANTID_ALGORITHMS_DLL ConjoinWorkspaces : public WorkspaceJoiners {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "ConjoinWorkspaces"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxesToRealSpace.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxesToRealSpace.h
index 91289889b4825383c001fe565af8088ded728117..86075329976ae651f65e177daef72616e51db95e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxesToRealSpace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxesToRealSpace.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/cow_ptr.h"
 
 #include <map>
@@ -19,7 +19,7 @@ namespace Algorithms {
 /** ConvertAxesToRealSpace : Converts the spectrum and TOF axes to real space
   values, integrating the data in the process
 */
-class DLLExport ConvertAxesToRealSpace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ConvertAxesToRealSpace : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxisByFormula.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxisByFormula.h
index f3e80b8b0f3e03658d0f9cfa14c6e17df34b74a1..ccf89ee9100194ec250ccf8e972330c03e07935f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxisByFormula.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertAxisByFormula.h
@@ -8,7 +8,7 @@
 
 #include "MantidAPI/Workspace_fwd.h"
 #include "MantidAlgorithms/ConvertUnits.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 // forward declaration
 namespace mu {
@@ -25,7 +25,7 @@ namespace Algorithms {
 /** ConvertAxisByFormula : Performs a unit conversion based on a supplied
   formula
 */
-class DLLExport ConvertAxisByFormula : public ConvertUnits {
+class MANTID_ALGORITHMS_DLL ConvertAxisByFormula : public ConvertUnits {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertDiffCal.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertDiffCal.h
index e1bdc2d361468acf999f08527258f36bd7d17ef6..829b6559d651ddc7b49c3e3364ed3fa06c24e81f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertDiffCal.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertDiffCal.h
@@ -7,13 +7,13 @@
 #pragma once
 
 #include "MantidAPI/ParallelAlgorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 namespace Mantid {
 namespace Algorithms {
 
 /** ConvertDiffCal : TODO: DESCRIPTION
  */
-class DLLExport ConvertDiffCal : public API::ParallelAlgorithm {
+class MANTID_ALGORITHMS_DLL ConvertDiffCal : public API::ParallelAlgorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertEmptyToTof.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertEmptyToTof.h
index 807e7582c4de2bc9726f960066f082f35835ee38..26bd6cf0fd73f89c3be65b8bc142fbf8bde74ed6 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertEmptyToTof.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertEmptyToTof.h
@@ -9,8 +9,8 @@
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/DeprecatedAlgorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 
 #include <utility> // std::pair
 
@@ -26,8 +26,9 @@ namespace Algorithms {
  represent the time channel number.
  This algorithm converts the channel number to time of flight
  */
-class DLLExport ConvertEmptyToTof : public API::Algorithm,
-                                    public API::DeprecatedAlgorithm {
+class MANTID_ALGORITHMS_DLL ConvertEmptyToTof
+    : public API::Algorithm,
+      public API::DeprecatedAlgorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertFromDistribution.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertFromDistribution.h
index 0deb4f8a762edbf5dd434b3befe935bd28853628..ecb51ac1bc6ae3f5305ec7b4aa3608031d90b57d 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertFromDistribution.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertFromDistribution.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -24,7 +25,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 17/11/2008
 */
-class DLLExport ConvertFromDistribution : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ConvertFromDistribution : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "ConvertFromDistribution"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis.h
index 8e188f9cae4105034870a53274ba164428da3230..6cd89de6f1a80c806e176de01d1451e58a35738d 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDetector.h"
 
 namespace Mantid {
@@ -32,7 +33,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 01/09/2009
 */
-class DLLExport ConvertSpectrumAxis : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ConvertSpectrumAxis : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "ConvertSpectrumAxis"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis2.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis2.h
index e51a6c066b0832d1e1862260ec2b0d64f6d2334b..2b910898ba488574ee55412cb4ff40e17cb61bbd 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertSpectrumAxis2.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDetector.h"
 
 namespace Mantid {
@@ -32,7 +33,7 @@ namespace Algorithms {
    converted. </LI>
     </UL>
 */
-class DLLExport ConvertSpectrumAxis2 : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ConvertSpectrumAxis2 : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "ConvertSpectrumAxis"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertTableToMatrixWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertTableToMatrixWorkspace.h
index c2f887780b2fafe6b46acd7a3f9a2da75eab07fe..a189ed3396fdac2d6506c0572bf5b31d661f1966 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertTableToMatrixWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertTableToMatrixWorkspace.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -29,7 +30,8 @@ namespace Algorithms {
  @author Roman Tolchenov, Tessella plc
  @date 25/01/2012
  */
-class DLLExport ConvertTableToMatrixWorkspace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ConvertTableToMatrixWorkspace
+    : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToConstantL2.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToConstantL2.h
index 4794ce1a4b2d61a82e78ca07bab58034f6f1be79..32e6efb389877cfdce5f8049beed7468bf15f488 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToConstantL2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToConstantL2.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/Instrument.h"
 
 namespace Mantid {
@@ -24,7 +25,7 @@ namespace Algorithms {
  @author Ricardo Ferraz Leal
  @date 30/01/2013
  */
-class DLLExport ConvertToConstantL2 : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ConvertToConstantL2 : public API::Algorithm {
 public:
   /// Default constructor
   ConvertToConstantL2();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToDistribution.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToDistribution.h
index c098ff3607a9e47fa33170b02126ead6662102b5..eebbe58bc628df9315e9f13dec27a4f16cc98ece 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToDistribution.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToDistribution.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -23,7 +24,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 17/11/2008
 */
-class DLLExport ConvertToDistribution : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ConvertToDistribution : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "ConvertToDistribution"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToEventWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToEventWorkspace.h
index 21e17c3dd8cf51597e245310151f0177e594306d..5118c9bc26d28701506c397ebb836a93bec290b5 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToEventWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToEventWorkspace.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -18,7 +18,7 @@ namespace Algorithms {
   @author Janik Zikovsky
   @date 2011-08-23
 */
-class DLLExport ConvertToEventWorkspace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ConvertToEventWorkspace : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "ConvertToEventWorkspace"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToHistogram.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToHistogram.h
index 56fd038eb88f30f67aa1c4aa9afa505648082396..660b3e95ba8bee0e645da364e50c31251db516df 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToHistogram.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToHistogram.h
@@ -9,6 +9,7 @@
 //------------------------------------------------------------------------------
 // Includes
 //------------------------------------------------------------------------------
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/XDataConverter.h"
 
 namespace Mantid {
@@ -21,7 +22,7 @@ namespace Algorithms {
   @author Martyn Gigg, Tessella plc
   @date 2010-12-21
 */
-class DLLExport ConvertToHistogram : public XDataConverter {
+class MANTID_ALGORITHMS_DLL ConvertToHistogram : public XDataConverter {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "ConvertToHistogram"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToMatrixWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToMatrixWorkspace.h
index 092d8817b096e26f7dbfc5ec80306189695ea63c..401802b780728b3ea40b116403693cb3726453da 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToMatrixWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToMatrixWorkspace.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -26,7 +27,7 @@ namespace Algorithms {
  @author Stuart Campbell, ORNL
  @date 10/12/2010
  */
-class DLLExport ConvertToMatrixWorkspace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ConvertToMatrixWorkspace : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "ConvertToMatrixWorkspace"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToPointData.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToPointData.h
index 7aeff41ec6d5f0c63771126a6ddce3911726fa8b..e2c139b872ef36d6243388c96e5c520d2b3734dc 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertToPointData.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertToPointData.h
@@ -9,6 +9,7 @@
 //------------------------------------------------------------------------------
 // Includes
 //------------------------------------------------------------------------------
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/XDataConverter.h"
 
 namespace Mantid {
@@ -21,7 +22,7 @@ namespace Algorithms {
   @author Martyn Gigg, Tessella plc
   @date 2010-12-14
 */
-class DLLExport ConvertToPointData : public XDataConverter {
+class MANTID_ALGORITHMS_DLL ConvertToPointData : public XDataConverter {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "ConvertToPointData"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnits.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnits.h
index 484ba856ac849a185184e6e94828362ec53c3bc6..7ccb010bbaaac4f710f9243b0cebc70d5d7f02ee 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnits.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnits.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidKernel/Unit.h"
 
@@ -48,7 +49,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 06/03/2008
 */
-class DLLExport ConvertUnits : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL ConvertUnits : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "ConvertUnits"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnitsUsingDetectorTable.h b/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnitsUsingDetectorTable.h
index 1887b2a0139d404f2ef3f9a1eb794826fdb38646..b35b0c56674ba58dab31f78e53340fd3a6286c9d 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnitsUsingDetectorTable.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ConvertUnitsUsingDetectorTable.h
@@ -8,7 +8,7 @@
 
 #include "MantidAPI/DeprecatedAlgorithm.h"
 #include "MantidAlgorithms/ConvertUnits.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/Unit.h"
 
 namespace Mantid {
@@ -19,7 +19,7 @@ namespace Algorithms {
   values
   rather than those given by the instrument geometry.
 */
-class DLLExport ConvertUnitsUsingDetectorTable
+class MANTID_ALGORITHMS_DLL ConvertUnitsUsingDetectorTable
     : public ConvertUnits,
       public API::DeprecatedAlgorithm {
 public:
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CopyDataRange.h b/Framework/Algorithms/inc/MantidAlgorithms/CopyDataRange.h
index b0b14ad8e5220b032e98e33ecb252d75fe4448c3..28761cd240bf94fcbef260adae65342b772947cb 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CopyDataRange.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CopyDataRange.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -18,7 +18,7 @@ namespace Algorithms {
   replaces a block of data within a destination workspace. Where this block of
   data is inserted is decided by an InsertionYIndex and an InsertionXIndex.
  */
-class DLLExport CopyDataRange : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CopyDataRange : public API::Algorithm {
 public:
   std::string const name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CopyDetectorMapping.h b/Framework/Algorithms/inc/MantidAlgorithms/CopyDetectorMapping.h
index 46c1ee82cbd7acdc28018fc5672650a754a238e0..ec4ce64db753ddd36a4392acb910a4fa9b5a6bd3 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CopyDetectorMapping.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CopyDetectorMapping.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -20,7 +21,7 @@ namespace Algorithms {
 
     @author Dan Nixon
 */
-class DLLExport CopyDetectorMapping : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CopyDetectorMapping : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "CopyDetectorMapping"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CopyInstrumentParameters.h b/Framework/Algorithms/inc/MantidAlgorithms/CopyInstrumentParameters.h
index 091e74db1924d0b8c35af172be27e37457c13159..9506daecfe520f788c91a4a82a1596259af860cd 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CopyInstrumentParameters.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CopyInstrumentParameters.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/Instrument.h"
 
 #include <climits>
@@ -39,7 +40,7 @@ namespace Algorithms {
     @author Karl Palmen STFC
     @date 16/08/2012
 */
-class DLLExport CopyInstrumentParameters : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CopyInstrumentParameters : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "CopyInstrumentParameters"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CopyLogs.h b/Framework/Algorithms/inc/MantidAlgorithms/CopyLogs.h
index 3d76ea78e4c8363c66618448760e08bf4c515bce..bda67e2dbe9b084c31e15a4a796c7095676c6cc7 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CopyLogs.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CopyLogs.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 
@@ -26,7 +26,7 @@ namespace Algorithms {
   @author Samuel Jackson, STFC, RAL
   @date 11/10/2013
 */
-class DLLExport CopyLogs : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CopyLogs : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CopySample.h b/Framework/Algorithms/inc/MantidAlgorithms/CopySample.h
index cc37f6acf901f2f445165246b27dc63fe0fbe007..01d637eda02ffc8e3804e9c863ec845c199424de 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CopySample.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CopySample.h
@@ -8,7 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/Sample.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -29,7 +29,7 @@ will copy to all samples. The following information can be copied:
   @author Andrei Savici, ORNL
   @date 2011-08-11
 */
-class DLLExport CopySample : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CopySample : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "CopySample"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CorelliCrossCorrelate.h b/Framework/Algorithms/inc/MantidAlgorithms/CorelliCrossCorrelate.h
index 06e9b1852b85f9acc2d3084c20fe7f8adc59522f..64589bce8ce95b8d767415428d5752e49ad8ed09 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CorelliCrossCorrelate.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CorelliCrossCorrelate.h
@@ -7,15 +7,15 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
 
 /** CorelliCrossCorrelate : TODO: DESCRIPTION
  */
-class DLLExport CorelliCrossCorrelate : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CorelliCrossCorrelate : public API::Algorithm {
 public:
   const std::string name() const override { return "CorelliCrossCorrelate"; };
   int version() const override { return 1; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CorrectKiKf.h b/Framework/Algorithms/inc/MantidAlgorithms/CorrectKiKf.h
index 654ac67f320eca5ddf1d3c86441c8095f17183a0..07b85c7d8a256619dad93acbfeac590bf998d0d4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CorrectKiKf.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CorrectKiKf.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/SpectrumInfo.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -43,7 +44,7 @@ namespace Algorithms {
     @date 10/21/2010
 */
 
-class DLLExport CorrectKiKf : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CorrectKiKf : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "CorrectKiKf"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CorrectToFile.h b/Framework/Algorithms/inc/MantidAlgorithms/CorrectToFile.h
index 48547ff99b86e2ae7eb141f995a907b9be1c29d9..72a6f270bd10ed5ab0a4bc07aa667311db63e018 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CorrectToFile.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CorrectToFile.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -26,7 +27,7 @@ namespace Algorithms {
    @author Martyn Gigg, Tessella Support Services plc
    @date 19/01/2009
 */
-class DLLExport CorrectToFile : public Mantid::API::Algorithm {
+class MANTID_ALGORITHMS_DLL CorrectToFile : public Mantid::API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "CorrectToFile"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateCalFileByNames.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateCalFileByNames.h
index 80f13a5b1fa8bc8baae1e36341e6c70930917c2e..724ad0d5ed51032445c90301d2347235244eea19 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateCalFileByNames.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateCalFileByNames.h
@@ -12,6 +12,7 @@
 
 // To be compatible with MSVC++ Express Edition that does not have TR1 headers
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include <map>
 
 namespace Mantid {
@@ -44,7 +45,7 @@ namespace Algorithms {
     @author Laurent Chapon, ISIS Facility, Rutherford Appleton Laboratory
     @date 01/03/2009
 */
-class DLLExport CreateCalFileByNames : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CreateCalFileByNames : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "CreateCalFileByNames"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateDummyCalFile.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateDummyCalFile.h
index 6fe5440185374533482771a1e90bcc02f6394e29..9dc4f626b0b0ae376d63f431f1461ef45f86b0ad 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateDummyCalFile.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateDummyCalFile.h
@@ -8,6 +8,7 @@
 
 // To be compatible with MSVC++ Express Edition that does not have TR1 headers
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include <map>
 
 namespace Mantid {
@@ -40,7 +41,7 @@ namespace Algorithms {
     @author Vickie Lynch, SNS, ORNL
     @date 12/01/2010
 */
-class DLLExport CreateDummyCalFile : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CreateDummyCalFile : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "CreateDummyCalFile"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateFlatEventWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateFlatEventWorkspace.h
index c050acff096f3553785fd9076aa3aa8a68d2eb2f..f58767407639e18f28a0f4852622ee7e5527dc6b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateFlatEventWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateFlatEventWorkspace.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -15,7 +15,7 @@ namespace Algorithms {
 /** CreateFlatEventWorkspace : Creates a flat event workspace that can be used
   for background removal.
 */
-class DLLExport CreateFlatEventWorkspace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CreateFlatEventWorkspace : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateFloodWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateFloodWorkspace.h
index 1eab36fb2c4873473f3b9159e081e496865d6ac9..0bfd9a8aa475736d76b5ee569e06ae08b5e5db2c 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateFloodWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateFloodWorkspace.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +17,7 @@ namespace Algorithms {
  Algorithm to create a flood correction workspace for reflectometry
  data reduction.
  */
-class DLLExport CreateFloodWorkspace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CreateFloodWorkspace : public API::Algorithm {
 public:
   const std::string name() const override;
   const std::string summary() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateGroupingWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateGroupingWorkspace.h
index 3dffa209afed0c57bf2b282df671999b0c935124..4b53f55b2ba8e714b5f81e170acf130a3701e55a 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateGroupingWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateGroupingWorkspace.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -19,7 +19,7 @@ namespace Algorithms {
  *
  *  Optionally uses bank names to create the groups.
  */
-class DLLExport CreateGroupingWorkspace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CreateGroupingWorkspace : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateLogPropertyTable.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateLogPropertyTable.h
index 8e686fe071377df937469de40ab91460b398be5c..fa3fba2fd4a1b2620cdab4e06ae35154b0d158f2 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateLogPropertyTable.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateLogPropertyTable.h
@@ -11,13 +11,14 @@
 //----------------------------------------------------------------------
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 #include <string>
 
 namespace Mantid {
 namespace Algorithms {
 
-class DLLExport CreateLogPropertyTable : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CreateLogPropertyTable : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "CreateLogPropertyTable"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateLogTimeCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateLogTimeCorrection.h
index 69e615d901993c65906d2888d16326c196153bfd..96c715cbec0886f5b7b9b35d3f814dcfc6a19398 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateLogTimeCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateLogTimeCorrection.h
@@ -8,9 +8,9 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/TableWorkspace.h"
 #include "MantidGeometry/Instrument.h"
-#include "MantidKernel/System.h"
 #include <vector>
 
 namespace Mantid {
@@ -28,7 +28,7 @@ namespace Algorithms {
   and the input event workspace contains the neutron with time recorded at the
   detector.
 */
-class DLLExport CreateLogTimeCorrection : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CreateLogTimeCorrection : public API::Algorithm {
 public:
   const std::string name() const override { return "CreateLogTimeCorrection"; }
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreatePSDBleedMask.h b/Framework/Algorithms/inc/MantidAlgorithms/CreatePSDBleedMask.h
index bdce79725c0e4e7988020f34db2b471608f61b72..4ff91e0315cdb06967f171630b39175777d159b1 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreatePSDBleedMask.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreatePSDBleedMask.h
@@ -30,7 +30,7 @@ namespace Algorithms {
   @author Martyn Gigg, Tessella plc
   @date 2011-01-10
 */
-class DLLExport CreatePSDBleedMask : public DetectorDiagnostic {
+class MANTID_ALGORITHMS_DLL CreatePSDBleedMask : public DetectorDiagnostic {
 public:
   /// Default constructor
   CreatePSDBleedMask();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreatePeaksWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreatePeaksWorkspace.h
index 4795fb9ad00aee448f0a74d6a120c26b58bb6f9e..c16af8bb2f66d62ee79b7331b1043ba211bfa432 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreatePeaksWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreatePeaksWorkspace.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -17,7 +17,7 @@ namespace Algorithms {
  * @author Janik Zikovsky
  * @date 2011-04-26 08:49:10.540441
  */
-class DLLExport CreatePeaksWorkspace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CreatePeaksWorkspace : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "CreatePeaksWorkspace"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateSampleWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateSampleWorkspace.h
index ce1c8a4d4ec9951a764fcfda5877094e9434c81b..59fd1c3aef08965bb51fe886adbb330f8a31957c 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateSampleWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateSampleWorkspace.h
@@ -8,11 +8,11 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidGeometry/Instrument.h"
 #include "MantidGeometry/Objects/CSGObject.h"
 #include "MantidKernel/PseudoRandomNumberGenerator.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -20,7 +20,7 @@ namespace Algorithms {
 /** CreateSampleWorkspace : This algorithm is intended for the creation of
   sample workspaces for usage examples and other situations
 */
-class DLLExport CreateSampleWorkspace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CreateSampleWorkspace : public API::Algorithm {
 public:
   CreateSampleWorkspace();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateSingleValuedWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateSingleValuedWorkspace.h
index 94bffee9aa789d7bf96104651702e1f196002dd7..6b06c01e51d8d48716c289c755342aabc8ff9480 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateSingleValuedWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateSingleValuedWorkspace.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -24,7 +25,8 @@ namespace Algorithms {
    @author Martyn Gigg, Tessella Support Services plc
    @date 28/01/2009
 */
-class DLLExport CreateSingleValuedWorkspace : public Mantid::API::Algorithm {
+class MANTID_ALGORITHMS_DLL CreateSingleValuedWorkspace
+    : public Mantid::API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace.h
index 765c8e4974548322d66616ae56bfe0a7598d7c5c..af0601654d130f0494475ee69337303a6f27d78d 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace.h
@@ -6,8 +6,8 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/ReflectometryWorkflowBase.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -15,7 +15,8 @@ namespace Algorithms {
 /** CreateTransmissionWorkspace : Create a transmission run workspace in
  Wavelength given one or more TOF workspaces
  */
-class DLLExport CreateTransmissionWorkspace : public ReflectometryWorkflowBase {
+class MANTID_ALGORITHMS_DLL CreateTransmissionWorkspace
+    : public ReflectometryWorkflowBase {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace2.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace2.h
index 340829041bbfedaa4b664a4adcf85402f35d0ff5..7d03d4c8994c40607fda77ec8dde2a59f4d00de6 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspace2.h
@@ -6,6 +6,7 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/ReflectometryWorkflowBase2.h"
 
 namespace Mantid {
@@ -14,7 +15,7 @@ namespace Algorithms {
 /** CreateTransmissionWorkspace2 : Create a transmission run workspace in
  Wavelength given one or more TOF workspaces. Version 2 of the algorithm.
  */
-class DLLExport CreateTransmissionWorkspace2
+class MANTID_ALGORITHMS_DLL CreateTransmissionWorkspace2
     : public ReflectometryWorkflowBase2 {
 public:
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto.h
index 9ba010d66a27fdb9425b3292d874ab872dd4256d..638a8b18a22a06818a7577167120e6e2355757fa 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/DataProcessorAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/Instrument.h"
-#include "MantidKernel/System.h"
 #include <boost/optional.hpp>
 
 namespace Mantid {
@@ -17,7 +17,7 @@ namespace Algorithms {
 /** CreateTransmissionWorkspaceAuto : Creates a transmission run workspace in
 Wavelength from input TOF workspaces.
 */
-class DLLExport CreateTransmissionWorkspaceAuto
+class MANTID_ALGORITHMS_DLL CreateTransmissionWorkspaceAuto
     : public API::DataProcessorAlgorithm {
 public:
   //----------------------------------------------------------------------------------------------
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto2.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto2.h
index 636db033f376f7a63b4f2e5f85c031674bb0845d..015b147d37523eebbedf2bddd12de55540fd76c3 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateTransmissionWorkspaceAuto2.h
@@ -6,7 +6,8 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
-#include "ReflectometryWorkflowBase2.h"
+#include "MantidAlgorithms/DllConfig.h"
+#include "MantidAlgorithms/ReflectometryWorkflowBase2.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -14,7 +15,7 @@ namespace Algorithms {
 /** CreateTransmissionWorkspaceAuto2 : Creates a transmission run workspace in
 Wavelength from input TOF workspaces. Version 2.
 */
-class DLLExport CreateTransmissionWorkspaceAuto2
+class MANTID_ALGORITHMS_DLL CreateTransmissionWorkspaceAuto2
     : public ReflectometryWorkflowBase2 {
 public:
   //----------------------------------------------------------------------------------------------
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CreateWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CreateWorkspace.h
index c30a10769c840aca4d51d909d21481e977972ba3..1d7b6e14b842158ab5ffc8e0227c055f4ea326df 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CreateWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CreateWorkspace.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -33,7 +34,7 @@ namespace Algorithms {
  *
  *
  */
-class DLLExport CreateWorkspace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CreateWorkspace : public API::Algorithm {
 public:
   const std::string name() const override {
     return "CreateWorkspace";
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CropWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/CropWorkspace.h
index 19860884b2912f4f039bc28c6e395017e756af83..210736e961423c808df2d19df5dda6603d6f28da 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CropWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CropWorkspace.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -47,7 +48,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 15/10/2008
 */
-class DLLExport CropWorkspace : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL CropWorkspace : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "CropWorkspace"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CrossCorrelate.h b/Framework/Algorithms/inc/MantidAlgorithms/CrossCorrelate.h
index 226cd74635145052ca839b67109c08b838e028d7..55cd4372aac77291663fce9e4d120c4fc9f35d59 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CrossCorrelate.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CrossCorrelate.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/SpectraAxis.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -40,7 +41,7 @@ namespace Algorithms {
     @author Laurent C Chapon, ISIS Facility Rutherford Appleton Laboratory
     @date 15/12/2008
 */
-class DLLExport CrossCorrelate : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL CrossCorrelate : public API::Algorithm {
 public:
   /// (Empty) Constructor
   CrossCorrelate() : API::Algorithm() {}
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CuboidGaugeVolumeAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/CuboidGaugeVolumeAbsorption.h
index 84f89a57295e01dab07f8d577da02b3fb0dc5f0b..64949e0d76d9886fc24f2a8f43cb68d509bc0318 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CuboidGaugeVolumeAbsorption.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CuboidGaugeVolumeAbsorption.h
@@ -25,7 +25,8 @@ namespace Algorithms {
     @author Russell Taylor, Tessella
     @date 1/11/2010
 */
-class DLLExport CuboidGaugeVolumeAbsorption : public FlatPlateAbsorption {
+class MANTID_ALGORITHMS_DLL CuboidGaugeVolumeAbsorption
+    : public FlatPlateAbsorption {
 public:
   /// Algorithm's name
   const std::string name() const override {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/CylinderAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/CylinderAbsorption.h
index 7f3741b5dfa4d001586ec887790ac0e883015069..2660740dc7391975177c181422a95ab5e7e48fc7 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/CylinderAbsorption.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/CylinderAbsorption.h
@@ -70,7 +70,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 02/12/2008
 */
-class DLLExport CylinderAbsorption : public AbsorptionCorrection {
+class MANTID_ALGORITHMS_DLL CylinderAbsorption : public AbsorptionCorrection {
 public:
   /// Default constructor
   CylinderAbsorption();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DeleteLog.h b/Framework/Algorithms/inc/MantidAlgorithms/DeleteLog.h
index 4a41795e50f7798c209f9cfa039adc83f1372f8c..7404b2d17c2c8a3568a36fbdbe5eebaa3ed6e538 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/DeleteLog.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/DeleteLog.h
@@ -7,11 +7,12 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
 
-class DLLExport DeleteLog : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL DeleteLog : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspace.h
index 87f78393b344fe5a1d618bffe6fae63c4482b341..add9ee4ed380d30b84f2a23c0b06d070829c0271 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspace.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -18,7 +19,7 @@ namespace Algorithms {
   @author Martyn Gigg, Tessella plc
   @date 2011-01-24
 */
-class DLLExport DeleteWorkspace : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL DeleteWorkspace : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "DeleteWorkspace"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspaces.h b/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspaces.h
index ded330b8ec8f59e063021340ebbb54d0369c3f7d..3d55a5298bc24d0fb7d145d3029814a58734d429 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspaces.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/DeleteWorkspaces.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -19,7 +20,7 @@ namespace Algorithms {
   @author Nick Draper, Tessella plc
   @date 2017-02-17
 */
-class DLLExport DeleteWorkspaces : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL DeleteWorkspaces : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "DeleteWorkspaces"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DetectorDiagnostic.h b/Framework/Algorithms/inc/MantidAlgorithms/DetectorDiagnostic.h
index 10e3869b675571f9c7ed9f306ea595ffd7431331..655462225981fb37898ee45cee0de8f037d68bdd 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/DetectorDiagnostic.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/DetectorDiagnostic.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/MaskWorkspace.h"
 #include "MantidGeometry/IComponent.h"
 
@@ -26,7 +27,7 @@ namespace Algorithms {
   @author Martyn Gigg, Tessella plc
   @date 2010-12-09
 */
-class DLLExport DetectorDiagnostic : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL DetectorDiagnostic : public API::Algorithm {
 public:
   /// Default constructor
   DetectorDiagnostic();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCor.h b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCor.h
index 4701a9b80c4841de46683acee0826eb21f762a29..0fb837219cdac830e91bd85bf9b105a3ba89438b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCor.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCor.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/SpectrumInfo.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDetector.h"
 #include "MantidGeometry/Objects/IObject.h"
 #include "MantidKernel/V3D.h"
@@ -66,7 +67,7 @@ namespace Algorithms {
     @author Steve Williams based on code by T.G.Perring
     @date 6/10/2009
 */
-class DLLExport DetectorEfficiencyCor : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL DetectorEfficiencyCor : public API::Algorithm {
 public:
   DetectorEfficiencyCor();
   /// Algorithm's name for identification overriding a virtual method
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCorUser.h b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCorUser.h
index f1eeb061e4dc995b1546d1a1fc82fa62941290e1..79b8ef1c7ea0222063a4c920ce12d38a836d1218 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCorUser.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyCorUser.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/cow_ptr.h"
 
 // Forward declarations
@@ -33,7 +34,7 @@ namespace Algorithms {
 
  Formula_eff must be defined in the instrument parameters file.
  */
-class DLLExport DetectorEfficiencyCorUser : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL DetectorEfficiencyCorUser : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyVariation.h b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyVariation.h
index 0457cd6c8cf5ed5dc1695b47f55202bcfa5f8c04..43ffd71d133f3d0e1340225e07bf6be2b1422543 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyVariation.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/DetectorEfficiencyVariation.h
@@ -41,7 +41,8 @@ namespace Algorithms {
    @author Steve D Williams, ISIS Facility Rutherford Appleton Laboratory
    @date 15/06/2009
 */
-class DLLExport DetectorEfficiencyVariation : public DetectorDiagnostic {
+class MANTID_ALGORITHMS_DLL DetectorEfficiencyVariation
+    : public DetectorDiagnostic {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DiffractionEventCalibrateDetectors.h b/Framework/Algorithms/inc/MantidAlgorithms/DiffractionEventCalibrateDetectors.h
index e03a055565d0f270afd1623531f6b3b20a412928..9c9e028311ac097828406fc0eceeba47620e3869 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/DiffractionEventCalibrateDetectors.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/DiffractionEventCalibrateDetectors.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/GroupingWorkspace.h"
 #include <gsl/gsl_blas.h>
@@ -22,7 +23,8 @@ namespace Algorithms {
  @author Vickie Lynch SNS, ORNL
  @date 12/02/2010
  */
-class DLLExport DiffractionEventCalibrateDetectors : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL DiffractionEventCalibrateDetectors
+    : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing.h b/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing.h
index cf9404dac4183fc778aba04784ecf36177aebfbf..38dbdad90e73ec91fbaa2786e3bfe8feee559a91 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/DeprecatedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include <Poco/NObserver.h>
 
 namespace Mantid {
@@ -46,8 +47,9 @@ The structure of the grouping file is as follows:
 @author Nick Draper, Tessella
 @date 11/07/2008
 */
-class DLLExport DiffractionFocussing : public API::Algorithm,
-                                       public API::DeprecatedAlgorithm {
+class MANTID_ALGORITHMS_DLL DiffractionFocussing
+    : public API::Algorithm,
+      public API::DeprecatedAlgorithm {
 public:
   /// Constructor
   DiffractionFocussing();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing2.h b/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing2.h
index 526170d9e9f740353406591d22155c9f4eeaca3b..9dd2aaacccaa5e27be562aa48cf1d16b42522c78 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/DiffractionFocussing2.h
@@ -7,10 +7,10 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/GroupingWorkspace.h"
 #include "MantidIndexing/SpectrumNumber.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -62,7 +62,7 @@ namespace Algorithms {
  @author Laurent Chapon, ISIS Facility, Rutherford Appleton Laboratory
  @date 08/03/2009
  */
-class DLLExport DiffractionFocussing2 : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL DiffractionFocussing2 : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "DiffractionFocussing"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Divide.h b/Framework/Algorithms/inc/MantidAlgorithms/Divide.h
index 8274835e2b4c4c9426efd8d74be7d74b01fc040e..ee8138696dbf888e8dac8532f1c1120b2bb052e7 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Divide.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Divide.h
@@ -26,7 +26,7 @@ data </LI>
 @author Nick Draper
 @date 14/12/2007
 */
-class DLLExport Divide : public BinaryOperation {
+class MANTID_ALGORITHMS_DLL Divide : public BinaryOperation {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "Divide"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/DllConfig.h b/Framework/Algorithms/inc/MantidAlgorithms/DllConfig.h
deleted file mode 100644
index a4e5d564d986a25e795b4e82d3ede7c7d4f82c44..0000000000000000000000000000000000000000
--- a/Framework/Algorithms/inc/MantidAlgorithms/DllConfig.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Mantid Repository : https://github.com/mantidproject/mantid
-//
-// Copyright &copy; 2011 ISIS Rutherford Appleton Laboratory UKRI,
-//     NScD Oak Ridge National Laboratory, European Spallation Source
-//     & Institut Laue - Langevin
-// SPDX - License - Identifier: GPL - 3.0 +
-#pragma once
-
-/*
-    This file contains the DLLExport/DLLImport linkage configuration for the
-    DataHandling library
-
-    @author Martyn Gigg, Tessella plc
-*/
-#include "MantidKernel/System.h"
-
-#ifdef IN_MANTID_ALGORITHMS
-#define MANTID_ALGORITHMS_DLL DLLExport
-#else
-#define MANTID_ALGORITHMS_DLL DLLImport
-#endif /* IN_MANTID_ALGORITHMS*/
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/EQSANSCorrectFrame.h b/Framework/Algorithms/inc/MantidAlgorithms/EQSANSCorrectFrame.h
index b4d30cb09326c2b596ed791f14c1192c1029228e..f4706afb1ec01ae27cd490b3904903f868946f2b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/EQSANSCorrectFrame.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/EQSANSCorrectFrame.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 
 namespace Mantid {
@@ -24,7 +25,7 @@ namespace Algorithms {
     Code Documentation is available at: <http://doxygen.mantidproject.org>
 */
 
-class DLLExport EQSANSCorrectFrame : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL EQSANSCorrectFrame : public API::Algorithm {
 public:
   /// Default constructor
   EQSANSCorrectFrame();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/EQSANSResolution.h b/Framework/Algorithms/inc/MantidAlgorithms/EQSANSResolution.h
index c98e7dc70ba6fe95be83304c960481905acb6c8a..e5513c6189c1f43dd7bc9fc9c8204a2fe0ea021f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/EQSANSResolution.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/EQSANSResolution.h
@@ -38,7 +38,8 @@ namespace Algorithms {
     File change history is stored at: <https://github.com/mantidproject/mantid>
     Code Documentation is available at: <http://doxygen.mantidproject.org>
 */
-class DLLExport EQSANSResolution : public Algorithms::TOFSANSResolution {
+class MANTID_ALGORITHMS_DLL EQSANSResolution
+    : public Algorithms::TOFSANSResolution {
 public:
   /// Algorithm's name
   const std::string name() const override { return "EQSANSResolution"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/EQSANSTofStructure.h b/Framework/Algorithms/inc/MantidAlgorithms/EQSANSTofStructure.h
index 4caa6f1fb157e77fd2d7b12d8f35f42ad601eaf7..477306730879d414e0dfdaab44337565dab78941 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/EQSANSTofStructure.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/EQSANSTofStructure.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 
 namespace Mantid {
@@ -35,7 +36,7 @@ const double CHOPPER_ANGLE[4] = {129.605, 179.989, 230.010, 230.007};
 // Chopper location (mm)
 const double CHOPPER_LOCATION[4] = {5700., 7800., 9497., 9507.};
 
-class DLLExport EQSANSTofStructure : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL EQSANSTofStructure : public API::Algorithm {
 public:
   /// Default constructor
   EQSANSTofStructure();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/EditInstrumentGeometry.h b/Framework/Algorithms/inc/MantidAlgorithms/EditInstrumentGeometry.h
index cd60f9ed2c26f34e55408bbf72b0fa84cf2ed696..a82a010f58369f9d231c1c80dac09f68c8d78564 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/EditInstrumentGeometry.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/EditInstrumentGeometry.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -17,7 +17,7 @@ namespace Algorithms {
   @author
   @date 2011-08-22
 */
-class DLLExport EditInstrumentGeometry : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL EditInstrumentGeometry : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ElasticWindow.h b/Framework/Algorithms/inc/MantidAlgorithms/ElasticWindow.h
index 87fc560ef23dec267bc97bac32e108ad48d9dd03..26d4bd2d408fa77395d952417e8cbaf2590da025 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ElasticWindow.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ElasticWindow.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -20,7 +21,7 @@ namespace Algorithms {
    algorithms
     to provide an integrated value over q and q^2..
 */
-class DLLExport ElasticWindow : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ElasticWindow : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "ElasticWindow"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/EstimateResolutionDiffraction.h b/Framework/Algorithms/inc/MantidAlgorithms/EstimateResolutionDiffraction.h
index da129bea6df416e2482ddad6ee4c2327bc6d63b5..cbb2ff46f9d695d36b21a333d9f6ae612754b423 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/EstimateResolutionDiffraction.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/EstimateResolutionDiffraction.h
@@ -8,13 +8,14 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
 /** EstimateResolutionDiffraction : TODO: DESCRIPTION
  */
-class DLLExport EstimateResolutionDiffraction : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL EstimateResolutionDiffraction
+    : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Exponential.h b/Framework/Algorithms/inc/MantidAlgorithms/Exponential.h
index 159db4bf4b3a88cc1fab7ffcb9c3f376230e6b4e..c6002d5d506cf7fac142b312b558177fecb08d86 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Exponential.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Exponential.h
@@ -29,7 +29,7 @@ data </LI>
 @author Ron Fowler
 @date 12/05/2010
 */
-class DLLExport Exponential : public UnaryOperation {
+class MANTID_ALGORITHMS_DLL Exponential : public UnaryOperation {
 public:
   /// Default constructor
   Exponential();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExponentialCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/ExponentialCorrection.h
index 4f632b79a00a5b9a4cfb92b8c118fb5bd6a9a95e..a471494657db610aa8edf8e9320ea1b3f19adc66 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ExponentialCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ExponentialCorrection.h
@@ -36,7 +36,7 @@ the correction function</LI>
 @author Russell Taylor, Tessella plc
 @date 24/03/2009
 */
-class DLLExport ExponentialCorrection : public UnaryOperation {
+class MANTID_ALGORITHMS_DLL ExponentialCorrection : public UnaryOperation {
 public:
   /// Default constructor
   ExponentialCorrection();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExportTimeSeriesLog.h b/Framework/Algorithms/inc/MantidAlgorithms/ExportTimeSeriesLog.h
index 46f50df3865120b800c86a62ca55bd5179335e36..04d25c1e14d86c3b934d6e78d7d7dddfe58ebb14 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ExportTimeSeriesLog.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ExportTimeSeriesLog.h
@@ -8,9 +8,9 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -20,7 +20,7 @@ namespace Algorithms {
 
   @date 2011-12-22
 */
-class DLLExport ExportTimeSeriesLog : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ExportTimeSeriesLog : public API::Algorithm {
 public:
   const std::string name() const override { return "ExportTimeSeriesLog"; };
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractFFTSpectrum.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractFFTSpectrum.h
index 3dd4996d89fbcc358bd444c869cf7ba304f2bea6..99486a5f111945375315102f628cbc9e7db823f8 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractFFTSpectrum.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractFFTSpectrum.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -25,7 +26,7 @@ namespace Algorithms {
     @author Michael Whitty, STFC ISIS
     @date 21/09/2010
 */
-class DLLExport ExtractFFTSpectrum : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ExtractFFTSpectrum : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "ExtractFFTSpectrum"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractMask.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractMask.h
index 10849fadd2fc874a0c0d24807f2c63e1f4f63b45..944435afbf875e51cde6b614f61d12a8acb3a45c 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractMask.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractMask.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -28,7 +29,8 @@ namespace Algorithms {
   <LI> OutputWorkspace - The name of the output mask workspace </LI>
   </UL>
 */
-class DLLExport ExtractMask : public Mantid::API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL ExtractMask
+    : public Mantid::API::DistributedAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "ExtractMask"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractMaskToTable.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractMaskToTable.h
index a50496fd9aa0c787c6fd3011152b7646d902ebe3..dd48ae1e7b6a7dbf59ea9beff37e508b1ceccaf0 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractMaskToTable.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractMaskToTable.h
@@ -8,9 +8,9 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/TableWorkspace.h"
 #include "MantidGeometry/IDTypes.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -18,7 +18,7 @@ namespace Algorithms {
 /** ExtractMaskToTable : Extract the mask in a workspace to a table workspace.
   The table workspace must be compatible to algorithm MaskBinsFromTable.
 */
-class DLLExport ExtractMaskToTable : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ExtractMaskToTable : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "ExtractMaskToTable"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSingleSpectrum.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSingleSpectrum.h
index 08fc7267442fed4e1326a6092c267a83e3fe979f..29b3c7459ffb798c668b1940cd242d3a4b564228 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSingleSpectrum.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSingleSpectrum.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -24,7 +25,8 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 30/06/2009
 */
-class DLLExport ExtractSingleSpectrum : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL ExtractSingleSpectrum
+    : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "ExtractSingleSpectrum"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra.h
index 21a6eadf39ae154cb45218b2ecbec3d1ac5fe481..2b936e9d32cd93dd625becb59610b8d4d7538e47 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ExtractSpectra.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +16,7 @@ namespace Algorithms {
 /** Extracts specified spectra from a workspace and places them in a new
   workspace.
 */
-class DLLExport ExtractSpectra : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL ExtractSpectra : public API::DistributedAlgorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FFT.h b/Framework/Algorithms/inc/MantidAlgorithms/FFT.h
index 465e63beeb37928efacd213d2c094b5da2ab387d..543169b5a6e8e6973d55b5b0be6aa0d7f2b856b1 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FFT.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FFT.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/Workspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidHistogramData/BinEdges.h"
 #include "MantidHistogramData/Points.h"
 #include "MantidKernel/cow_ptr.h"
@@ -33,7 +34,7 @@ namespace Algorithms {
     @author Roman Tolchenov
     @date 07/07/2009
  */
-class DLLExport FFT : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL FFT : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "FFT"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FFTDerivative.h b/Framework/Algorithms/inc/MantidAlgorithms/FFTDerivative.h
index 1a809e3caab586344a7c676fdc304868fd8092b6..c4552527b829ac72f16baf1efcd802a000b93ab9 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FFTDerivative.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FFTDerivative.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/Workspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth.h b/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth.h
index 5d09851da85bcfb2f6c75a62be9e5adcbc4a64e3..c96cfa8f7f163f071d794cde77b0d587620f3113 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth.h
@@ -12,6 +12,7 @@
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/DeprecatedAlgorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -20,8 +21,8 @@ namespace Algorithms {
     @author Roman Tolchenov
     @date 07/07/2009
  */
-class DLLExport FFTSmooth : public API::Algorithm,
-                            public API::DeprecatedAlgorithm {
+class MANTID_ALGORITHMS_DLL FFTSmooth : public API::Algorithm,
+                                        public API::DeprecatedAlgorithm {
 public:
   /// Constructor
   FFTSmooth() { this->useAlgorithm("FFTSmooth", 2); }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth2.h b/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth2.h
index eb1a73e4d965b8945f0da4f835175b97102f25a4..7cd7b77af0dc149c6ab4fd7dc6031c1afd7d4b8f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FFTSmooth2.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/MatrixWorkspace_fwd.h"
 #include "MantidAPI/ParallelAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +17,7 @@ namespace Algorithms {
     @author Roman Tolchenov
     @date 07/07/2009
  */
-class DLLExport FFTSmooth2 : public API::ParallelAlgorithm {
+class MANTID_ALGORITHMS_DLL FFTSmooth2 : public API::ParallelAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "FFTSmooth"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterBadPulses.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterBadPulses.h
index 5bd173a72b19796e5fd74afc226f2333a06ffbb5..fe5ea3c0e93640819f97eb7b7b97f3f3b3307696 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FilterBadPulses.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterBadPulses.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 
@@ -30,7 +30,7 @@ namespace Algorithms {
     @author Peter Peterson, ORNL
     @date 21/12/10
 */
-class DLLExport FilterBadPulses : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL FilterBadPulses : public API::DistributedAlgorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterByLogValue.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterByLogValue.h
index 0771501c829f0b11f444000fb9d4df0c4ddad91f..e6545e24fb768dd59af8d4e3bab735cf92f2d4cd 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FilterByLogValue.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterByLogValue.h
@@ -7,14 +7,15 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
 /** Filters events in an EventWorkspace using values in a SampleLog.
  */
-class DLLExport FilterByLogValue : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL FilterByLogValue
+    : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "FilterByLogValue"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime.h
index 834d039cc37877e65dbc140d3835772d433912d8..42cd91c409bd5db7d455732331309be32f3eeef2 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 
@@ -21,7 +21,7 @@ namespace Algorithms {
     @author Janik Zikovsky, SNS
     @date September 14th, 2010
 */
-class DLLExport FilterByTime : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL FilterByTime : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "FilterByTime"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime2.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime2.h
index f682b78abb38ba1efa338882663ba108c5dbb91c..14935c8b60c4d08f1b0876e624bc47439ec09b11 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterByTime2.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/DateAndTime.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -17,7 +17,7 @@ namespace Algorithms {
 
   @date 2012-04-25
 */
-class DLLExport FilterByTime2 : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL FilterByTime2 : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "FilterByTime"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterByXValue.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterByXValue.h
index 1ffc37f4744b7d83fea1a873d4d46d2328112a2c..252bc8cfa55a6fdcb44b2c723ccd62dfcf62f909 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FilterByXValue.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterByXValue.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -18,7 +18,7 @@ namespace Algorithms {
    input
     workspace are (e.g. TOF).
 */
-class DLLExport FilterByXValue : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL FilterByXValue : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FilterEvents.h b/Framework/Algorithms/inc/MantidAlgorithms/FilterEvents.h
index 69cba9712f4f8a9fb08fb46894ebc9483b190191..fa295f071011d073bc1942b4a16ced43ea884cc8 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FilterEvents.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FilterEvents.h
@@ -9,10 +9,10 @@
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/ISplittersWorkspace.h"
 #include "MantidAPI/ITableWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/SplittersWorkspace.h"
 #include "MantidDataObjects/TableWorkspace.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/TimeSeriesProperty.h"
 #include "MantidKernel/TimeSplitter.h"
 
@@ -26,7 +26,7 @@ class TimeAtSampleStrategy;
 
   @date 2012-04-04
 */
-class DLLExport FilterEvents : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL FilterEvents : public API::Algorithm {
 
   enum TOFCorrectionType {
     NoneCorrect,
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition.h b/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition.h
index d7cf559121991cefa4255cf264dbb386131d1062..56259242261a301e4d960183f725af88d9d007e0 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -44,7 +45,7 @@ namespace Algorithms {
     File change history is stored at: <https://github.com/mantidproject/mantid>
     Code Documentation is available at: <http://doxygen.mantidproject.org>
 */
-class DLLExport FindCenterOfMassPosition : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL FindCenterOfMassPosition : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "FindCenterOfMassPosition"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition2.h b/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition2.h
index 4680ae3ff0dfc326c13b886c8e7488e0a3a66ea6..32d547ead2947e8c6f0a24dd39f79bdc2c0b38f6 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FindCenterOfMassPosition2.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -44,7 +45,7 @@ namespace Algorithms {
     File change history is stored at: <https://github.com/mantidproject/mantid>
     Code Documentation is available at: <http://doxygen.mantidproject.org>
 */
-class DLLExport FindCenterOfMassPosition2 : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL FindCenterOfMassPosition2 : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "FindCenterOfMassPosition"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindDeadDetectors.h b/Framework/Algorithms/inc/MantidAlgorithms/FindDeadDetectors.h
index 3f8461cc59845815923bfbf2ed66292bfe082333..0a4e68fb633886c4afdd971019f488ea0d374385 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FindDeadDetectors.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FindDeadDetectors.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -48,7 +49,7 @@ detector UDETs </LI>
 @author Nick Draper, Tessella Support Services plc
 @date 02/10/2008
 */
-class DLLExport FindDeadDetectors : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL FindDeadDetectors : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "FindDeadDetectors"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindDetectorsOutsideLimits.h b/Framework/Algorithms/inc/MantidAlgorithms/FindDetectorsOutsideLimits.h
index e5d0457d2db94da77e2b0039587207ecad2301be..ca77b0f97b44e29c44c30dbc646be39140df07fd 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FindDetectorsOutsideLimits.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FindDetectorsOutsideLimits.h
@@ -47,7 +47,8 @@ namespace Algorithms {
    @author Steve D Williams, ISIS Facility Rutherford Appleton Laboratory
    @date 07/07/2009
 */
-class DLLExport FindDetectorsOutsideLimits : public DetectorDiagnostic {
+class MANTID_ALGORITHMS_DLL FindDetectorsOutsideLimits
+    : public DetectorDiagnostic {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindPeakBackground.h b/Framework/Algorithms/inc/MantidAlgorithms/FindPeakBackground.h
index a3de563eeb34040bd2b63607186b3513375b0347..c94b53b96bb8e842f3ffbc39452870e8c0c6d7af 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FindPeakBackground.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FindPeakBackground.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/ITableWorkspace.h"
 #include "MantidAPI/ParallelAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidHistogramData/Histogram.h"
 #include "MantidKernel/cow_ptr.h"
 
@@ -22,7 +23,7 @@ namespace Algorithms {
 
 /** FindPeakBackground : Calculate Zscore for a Matrix Workspace
  */
-class DLLExport FindPeakBackground : public API::ParallelAlgorithm {
+class MANTID_ALGORITHMS_DLL FindPeakBackground : public API::ParallelAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "FindPeakBackground"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FindPeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/FindPeaks.h
index d1050790b5b46fffaa96dd40646239c9bf6430d5..643224e7f4fc50efd0f77726b472ecf50598c790 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FindPeaks.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FindPeaks.h
@@ -9,9 +9,9 @@
 #include "MantidAPI/IBackgroundFunction.h"
 #include "MantidAPI/IPeakFunction.h"
 #include "MantidAPI/ParallelAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/TableWorkspace.h"
 #include "MantidIndexing/SpectrumIndexSet.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
@@ -47,7 +47,7 @@ namespace Algorithms {
     @date 25/11/2008
 */
 
-class DLLExport FindPeaks : public API::ParallelAlgorithm {
+class MANTID_ALGORITHMS_DLL FindPeaks : public API::ParallelAlgorithm {
 public:
   /// Constructor
   FindPeaks();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FitPeak.h b/Framework/Algorithms/inc/MantidAlgorithms/FitPeak.h
index 2fb987f2aa7cf88331fba39c4dba37abc52b5fd2..696c084d75e041ac56be02b4a042d7827be75aa9 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FitPeak.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FitPeak.h
@@ -10,8 +10,8 @@
 #include "MantidAPI/IBackgroundFunction.h"
 #include "MantidAPI/IPeakFunction.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/TableWorkspace.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
@@ -27,7 +27,7 @@ size_t getIndex(const HistogramData::HistogramX &vecx, double x);
 
 /** FitOneSinglePeak: a class to perform peak fitting on a single peak
  */
-class DLLExport FitOneSinglePeak : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL FitOneSinglePeak : public API::Algorithm {
 public:
   /// Constructor
   FitOneSinglePeak();
@@ -231,7 +231,7 @@ private:
 
 /** FitPeak : Fit a single peak
  */
-class DLLExport FitPeak : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL FitPeak : public API::Algorithm {
 public:
   FitPeak();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FitPeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/FitPeaks.h
index d96385fa51a5897994842b0c0abf581c53082c0d..65ff3c11f9ede5226f7fbde9f1c8de9b428b90dc 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FitPeaks.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FitPeaks.h
@@ -14,9 +14,9 @@
 #include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
 #include "MantidAPI/MultiDomainFunction.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/TableWorkspace.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
@@ -61,7 +61,7 @@ private:
 };
 } // namespace FitPeaksAlgorithm
 
-class DLLExport FitPeaks : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL FitPeaks : public API::Algorithm {
 public:
   FitPeaks();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FixGSASInstrumentFile.h b/Framework/Algorithms/inc/MantidAlgorithms/FixGSASInstrumentFile.h
index c9368320012830bed4f834b4c5b96d050f0fa0b8..4cf823b6fa6d61d58c2535588da996cabb870bc2 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FixGSASInstrumentFile.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FixGSASInstrumentFile.h
@@ -7,14 +7,14 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
 
 /** FixGSASInstrumentFile : TODO: DESCRIPTION
  */
-class DLLExport FixGSASInstrumentFile : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL FixGSASInstrumentFile : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "FixGSASInstrumentFile"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/FlatPlateAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/FlatPlateAbsorption.h
index 517eceebe84fc0f460e8907d9263e772d22b4aca..f733c4a482bb3b74e3c945db93ade064e1fc15e4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/FlatPlateAbsorption.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/FlatPlateAbsorption.h
@@ -58,7 +58,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella plc
     @date 15/01/2010
 */
-class DLLExport FlatPlateAbsorption : public AbsorptionCorrection {
+class MANTID_ALGORITHMS_DLL FlatPlateAbsorption : public AbsorptionCorrection {
 public:
   /// (Empty) Constructor
   FlatPlateAbsorption();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GeneralisedSecondDifference.h b/Framework/Algorithms/inc/MantidAlgorithms/GeneralisedSecondDifference.h
index 96c4a9c00dfbcf71452814cd66949a24bf3d9880..60aa8562abf58326c28c983aec482ffe7a47fc51 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GeneralisedSecondDifference.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GeneralisedSecondDifference.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -37,7 +38,8 @@ namespace Algorithms {
     @author Laurent C Chapon, ISIS Facility Rutherford Appleton Laboratory
     @date 26/12/2008
 */
-class DLLExport GeneralisedSecondDifference : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GeneralisedSecondDifference
+    : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GenerateEventsFilter.h b/Framework/Algorithms/inc/MantidAlgorithms/GenerateEventsFilter.h
index 8debb638a69effd14bb8133a61ebb38233f5cb34..83dba6fa65cd3b036bb744a60dd0a937567505d8 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GenerateEventsFilter.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GenerateEventsFilter.h
@@ -8,9 +8,9 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/ITableWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/SplittersWorkspace.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/TimeSeriesProperty.h"
 
 namespace Mantid {
@@ -43,7 +43,7 @@ namespace Algorithms {
 
   @date 2012-04-09
 */
-class DLLExport GenerateEventsFilter : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GenerateEventsFilter : public API::Algorithm {
 public:
   explicit GenerateEventsFilter();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GenerateIPythonNotebook.h b/Framework/Algorithms/inc/MantidAlgorithms/GenerateIPythonNotebook.h
index 4e05b1e632c33e46e6170eaaad7d3ad4e51d6ece..324ae2481f1a34085312ac212e0b81be89dfc25a 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GenerateIPythonNotebook.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GenerateIPythonNotebook.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -23,7 +23,7 @@ namespace Algorithms {
   <li>InputWorkspace - the workspace name who's history is to be saved.</li>
   </ul>
 */
-class DLLExport GenerateIPythonNotebook : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GenerateIPythonNotebook : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "GenerateIPythonNotebook"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GeneratePeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/GeneratePeaks.h
index fe505f07fb30a4b0ab2ccb3b6b9572748af0e33c..9ddc54f7adeba6e3a9ef9116acb2a2618c4d651f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GeneratePeaks.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GeneratePeaks.h
@@ -11,9 +11,9 @@
 #include "MantidAPI/IBackgroundFunction.h"
 #include "MantidAPI/IPeakFunction.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/TableWorkspace.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -23,7 +23,7 @@ namespace Algorithms {
 
   @date 2012-04-10
 */
-class DLLExport GeneratePeaks : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GeneratePeaks : public API::Algorithm {
 public:
   GeneratePeaks();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GeneratePythonScript.h b/Framework/Algorithms/inc/MantidAlgorithms/GeneratePythonScript.h
index d0c041af0ecf80fa3e32a980e18fb87bd97f40a8..2c78e9ad5a8480d23ff8cddfb85a2b2202c57111 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GeneratePythonScript.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GeneratePythonScript.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/SerialAlgorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -26,7 +26,7 @@ namespace Algorithms {
   @author Peter G Parker, ISIS, RAL
   @date 2011-09-13
 */
-class DLLExport GeneratePythonScript : public API::SerialAlgorithm {
+class MANTID_ALGORITHMS_DLL GeneratePythonScript : public API::SerialAlgorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "GeneratePythonScript"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetAllEi.h b/Framework/Algorithms/inc/MantidAlgorithms/GetAllEi.h
index 58a323656b089a8722f6d403a42413cbaa3907b3..086e301961a6b6dd5ee04cf223da690a7d3fbcce 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GetAllEi.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GetAllEi.h
@@ -8,7 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/cow_ptr.h"
 //#include "MantidAPI/IAlgorithm.h"
 
@@ -26,7 +26,7 @@ namespace Algorithms {
 
 /** Estimate all incident energies, used by chopper instrument.
  */
-class DLLExport GetAllEi : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GetAllEi : public API::Algorithm {
 public:
   GetAllEi();
   /// Algorithms name for identification. @see Algorithm::name
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetDetOffsetsMultiPeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/GetDetOffsetsMultiPeaks.h
index 82831131f6607614c18b2d9da333c98182cb9cb8..68268f8fcdb59d18ca6ffdb18f103e0055ff1467 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GetDetOffsetsMultiPeaks.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GetDetOffsetsMultiPeaks.h
@@ -8,10 +8,10 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/OffsetsWorkspace.h"
 #include "MantidDataObjects/TableWorkspace.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -46,7 +46,7 @@ struct FitPeakOffsetResult {
  @author Vickie Lynch, SNS
  @date 12/12/2011
  */
-class DLLExport GetDetOffsetsMultiPeaks : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GetDetOffsetsMultiPeaks : public API::Algorithm {
 public:
   /// Default constructorMatrix
   GetDetOffsetsMultiPeaks();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetDetectorOffsets.h b/Framework/Algorithms/inc/MantidAlgorithms/GetDetectorOffsets.h
index d20c11317945730d126a64cb3cb92f0d350a305a..75b2f44f0028c1ce76563b38d147e2fb07f49b2e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GetDetectorOffsets.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GetDetectorOffsets.h
@@ -8,8 +8,8 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/IFunction.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/OffsetsWorkspace.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -19,7 +19,7 @@ namespace Algorithms {
  @author Laurent Chapon, ISIS Facility, Rutherford Appleton Laboratory
  @date 08/03/2009
  */
-class DLLExport GetDetectorOffsets : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GetDetectorOffsets : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "GetDetectorOffsets"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetEi.h b/Framework/Algorithms/inc/MantidAlgorithms/GetEi.h
index aa8d15e1e3764b76ad0b24ae23e793e0cdd18323..b4aa90c62138bc516a35074b7e2fff749a269a9e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GetEi.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GetEi.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDTypes.h"
 #include "MantidKernel/cow_ptr.h"
 
@@ -33,7 +34,7 @@ namespace Algorithms {
   National Laboratory
     @date 27/07/2009
 */
-class DLLExport GetEi : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GetEi : public API::Algorithm {
 public:
   GetEi();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h b/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h
index 57cce3ab59cc3b504f4d9a5ee8fd094669748ada..6f232e34017c261ffe3b63951161843650423ab8 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GetEi2.h
@@ -12,7 +12,7 @@
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
 #include "MantidAPI/SpectrumInfo.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/cow_ptr.h"
 
 //----------------------------------------------------------------------
@@ -45,7 +45,7 @@ namespace Algorithms {
   National Laboratory
     @date 31/03/2010
 */
-class DLLExport GetEi2 : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GetEi2 : public API::Algorithm {
 public:
   /// Default constructor
   GetEi2();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetEiMonDet3.h b/Framework/Algorithms/inc/MantidAlgorithms/GetEiMonDet3.h
index bfa2f501f4deb4bd9857de5c53fc13d861a0b7cd..68bde2e457455782fe34faa52be53042dc985ee3 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GetEiMonDet3.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GetEiMonDet3.h
@@ -9,6 +9,7 @@
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/ITableWorkspace_fwd.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Indexing {
@@ -19,7 +20,7 @@ namespace Algorithms {
 /** Estimates the incident neutron energy from the time of flight
     between a monitor and a set of detectors.
 */
-class DLLExport GetEiMonDet3 final : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GetEiMonDet3 final : public API::Algorithm {
 public:
   const std::string name() const override;
   const std::string summary() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetQsInQENSData.h b/Framework/Algorithms/inc/MantidAlgorithms/GetQsInQENSData.h
index 0b956859677bf7249868e2f730658a317e521d8b..8387eea48456e82993aabf9ac148a6ef2ebe65f1 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GetQsInQENSData.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GetQsInQENSData.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 #include "MantidAPI/MatrixWorkspace.h"
 
@@ -24,7 +25,7 @@ namespace Algorithms {
     <LI> Qvalues - The Q-values extracted from the input workspace </LI>
     </UL>
 */
-class DLLExport GetQsInQENSData : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GetQsInQENSData : public API::Algorithm {
 public:
   /// Algorithm's category for identification. @see Algorithm::category
   const std::string category() const override { return "Inelastic\\Indirect"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GetTimeSeriesLogInformation.h b/Framework/Algorithms/inc/MantidAlgorithms/GetTimeSeriesLogInformation.h
index d0095c326f253a5b0cf38d74baa0abdd763b6b17..852020cfb8cea5e3b4bde9a7d1d0c6a60a2104d9 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GetTimeSeriesLogInformation.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GetTimeSeriesLogInformation.h
@@ -8,10 +8,10 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/TableWorkspace.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -21,7 +21,8 @@ namespace Algorithms {
 
   @date 2011-12-22
 */
-class DLLExport GetTimeSeriesLogInformation : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GetTimeSeriesLogInformation
+    : public API::Algorithm {
 public:
   GetTimeSeriesLogInformation();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/GroupWorkspaces.h b/Framework/Algorithms/inc/MantidAlgorithms/GroupWorkspaces.h
index 60bb3b6483f5c7d6ee1218142a8866707a7dfd14..e639b63e72a08b84ad1f9176e19e726dead87ba5 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/GroupWorkspaces.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/GroupWorkspaces.h
@@ -9,6 +9,7 @@
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/WorkspaceGroup_fwd.h"
 #include "MantidAPI/WorkspaceProperty.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/ArrayProperty.h"
 
 namespace Mantid {
@@ -22,7 +23,7 @@ Required Properties:
 <LI> OutputWorkspace - The name of the new group workspace created </LI>
 </UL>
  */
-class DLLExport GroupWorkspaces : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL GroupWorkspaces : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "GroupWorkspaces"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/HRPDSlabCanAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/HRPDSlabCanAbsorption.h
index 3495af5b4e78f6ed950a68f0c7b5015d993ccb72..407658c6c24b7c1a8d7c101233186106a4867ea3 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/HRPDSlabCanAbsorption.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/HRPDSlabCanAbsorption.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -51,7 +52,7 @@ namespace Algorithms {
   @author Russell Taylor, Tessella plc
   @date 05/02/2010
 */
-class DLLExport HRPDSlabCanAbsorption : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL HRPDSlabCanAbsorption : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "HRPDSlabCanAbsorption"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/He3TubeEfficiency.h b/Framework/Algorithms/inc/MantidAlgorithms/He3TubeEfficiency.h
index b4361feb93a592e49d691b2381903d68652cfe65..9eb8caa529b2c24a3a9d54e84718508b4f3a41d8 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/He3TubeEfficiency.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/He3TubeEfficiency.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/SpectrumInfo.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDTypes.h"
 #include "MantidKernel/V3D.h"
 
@@ -45,7 +46,7 @@ namespace Algorithms {
     @author Michael Reuter
     @date 30/09/2010
 */
-class DLLExport He3TubeEfficiency : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL He3TubeEfficiency : public API::Algorithm {
 public:
   /// Default constructor
   He3TubeEfficiency();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/IQTransform.h b/Framework/Algorithms/inc/MantidAlgorithms/IQTransform.h
index 57743a0bd900dbf9ce37034aea7aaa39ee5a7e3d..ab0ff92f55be184d61bf108a8591c2f36dc7de09 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/IQTransform.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/IQTransform.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
@@ -47,7 +48,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella
     @date 03/02/2011
 */
-class DLLExport IQTransform : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL IQTransform : public API::Algorithm {
 public:
   IQTransform();
   const std::string name() const override { return "IQTransform"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/IdentifyNoisyDetectors.h b/Framework/Algorithms/inc/MantidAlgorithms/IdentifyNoisyDetectors.h
index db4621bac0a99666151fbb0a08a654737c3fbe97..7b61b6c58ed176fbcdb5efa24495d34793b77ba1 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/IdentifyNoisyDetectors.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/IdentifyNoisyDetectors.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -19,7 +20,7 @@ namespace Algorithms {
   @author Michael Whitty
   @date 24/01/2011
 */
-class DLLExport IdentifyNoisyDetectors : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL IdentifyNoisyDetectors : public API::Algorithm {
 public:
   const std::string name() const override {
     return "IdentifyNoisyDetectors";
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/IntegrateByComponent.h b/Framework/Algorithms/inc/MantidAlgorithms/IntegrateByComponent.h
index 3afb43dfd2ba01bb331762e9788c0f92c60a1d6b..ef7273fd8adca43252d28d1ad0c42c5eb7c3b2af 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/IntegrateByComponent.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/IntegrateByComponent.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -15,7 +15,7 @@ namespace Algorithms {
 /** IntegrateByComponent : The algorithm integrates up the instrument hierarchy,
   and each pixel will contain the average value for the component
 */
-class DLLExport IntegrateByComponent : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL IntegrateByComponent : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Integration.h b/Framework/Algorithms/inc/MantidAlgorithms/Integration.h
index 00f0ab36ea63e1dd87299d490b7ec9a00b07149b..f2cbe779e60819f7aeac7ca0a1546e9a6bc35ad8 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Integration.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Integration.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -38,7 +39,7 @@ namespace Algorithms {
    false)</LI>
     </UL>
  */
-class DLLExport Integration : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Integration : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "Integration"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/InterpolatingRebin.h b/Framework/Algorithms/inc/MantidAlgorithms/InterpolatingRebin.h
index 555e5ec54506395189a30c7014a748d744909288..551ef22da1ecb06578ed9bcbc0338bd40ff4e340 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/InterpolatingRebin.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/InterpolatingRebin.h
@@ -54,7 +54,7 @@ namespace Algorithms {
     @author Steve Williams, STFC
     @date 05/05/2010
  */
-class DLLExport InterpolatingRebin : public Rebin {
+class MANTID_ALGORITHMS_DLL InterpolatingRebin : public Rebin {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "InterpolatingRebin"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/InvertMask.h b/Framework/Algorithms/inc/MantidAlgorithms/InvertMask.h
index 75bb22e497d1ffce6fb9645ed08c0248901a4c52..d7c33c4070f9acdaf104e7b987dec0b1d9b51883 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/InvertMask.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/InvertMask.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +16,7 @@ namespace Algorithms {
 
   @date 2012-06-01
 */
-class DLLExport InvertMask : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL InvertMask : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "InvertMask"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Logarithm.h b/Framework/Algorithms/inc/MantidAlgorithms/Logarithm.h
index 98086d3fc26de6ae066206149083981167b68626..0360240c9d24346df4668499b7e0ef157fbe6f25 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Logarithm.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Logarithm.h
@@ -33,7 +33,7 @@ namespace Algorithms {
     @author AB,    ISIS, Rutherford Appleton Laboratory
     @date 12/05/2010
  */
-class DLLExport Logarithm : public UnaryOperation {
+class MANTID_ALGORITHMS_DLL Logarithm : public UnaryOperation {
 public:
   Logarithm();
   /// Algorithm's name for identification
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/LorentzCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/LorentzCorrection.h
index aca42a3f05a5243d51e63b0ad19e376cf9493150..17bc3b0d000051f12557fc8fd79cbe02457b2da7 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/LorentzCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/LorentzCorrection.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -15,7 +15,7 @@ namespace Algorithms {
 /** LorentzCorrection : Algorithm Performs a lorentz correction
   (sin(theta)^2)/(wavelength^4) on a MatrixWorkspace in units of wavelength
 */
-class DLLExport LorentzCorrection : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL LorentzCorrection : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MagFormFactorCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/MagFormFactorCorrection.h
index 50e72dc54fcf6da3ab20ff0f09b061ee34407dd6..50b7cad1cabcd048f6c6243cab223d79d13d3c5d 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MagFormFactorCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MagFormFactorCorrection.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -28,7 +29,7 @@ namespace Algorithms {
     @author Manh Duc Le, STFC
     @date 08/09/2016
 */
-class DLLExport MagFormFactorCorrection : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL MagFormFactorCorrection : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "MagFormFactorCorrection"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskBins.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskBins.h
index 0c84c39e504f5b9480a892b779d37b7f7ab5b767..17a53dc83acbae1ff2eabac354bce3f592249699 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MaskBins.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskBins.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventList.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidIndexing/SpectrumIndexSet.h"
@@ -37,7 +38,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella plc
     @date 29/04/2009
  */
-class DLLExport MaskBins : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL MaskBins : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "MaskBins"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromTable.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromTable.h
index db006f70de01e2489b3df6aae6e75f632ede0ad3..0baf93b5337320431478260c94c4c074dba6d4eb 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromTable.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromTable.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/TableWorkspace.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -17,7 +17,7 @@ namespace Algorithms {
 
   @date 2012-06-04
 */
-class DLLExport MaskBinsFromTable : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL MaskBinsFromTable : public API::Algorithm {
 public:
   MaskBinsFromTable();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromWorkspace.h
index 8df1c85a6c55807ceebdfb68129cfc463475c684..087e9c86e61e05ccb7a7376445674cdf03bec0be 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskBinsFromWorkspace.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidIndexing/SpectrumIndexSet.h"
 
 namespace Mantid {
@@ -15,7 +16,8 @@ namespace Histogram {
 class BinEdges;
 }
 namespace Algorithms {
-class DLLExport MaskBinsFromWorkspace : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL MaskBinsFromWorkspace
+    : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "MaskBinsFromWorkspace"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaskDetectorsIf.h b/Framework/Algorithms/inc/MantidAlgorithms/MaskDetectorsIf.h
index 9347c4c36e48dc1162402be648293139c6fe78f6..32b58208087dd2257576f1bb9a175eed647c5eb4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MaskDetectorsIf.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MaskDetectorsIf.h
@@ -10,8 +10,8 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDTypes.h"
-#include "MantidKernel/System.h"
 #include <boost/function.hpp>
 
 // To be compatible with VSC Express edition that does not have tr1
@@ -29,7 +29,7 @@ This algorithm is used to select/deselect detectors in a *.cal file.
 Laboratory
  @date 06/07/2009
  */
-class DLLExport MaskDetectorsIf : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL MaskDetectorsIf : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "MaskDetectorsIf"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Max.h b/Framework/Algorithms/inc/MantidAlgorithms/Max.h
index c567dc8c079f483c403059faeb8cd325487ced0d..b9b0ba67c4d5df35b7e7e3137fdeecc95dbb6454 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Max.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Max.h
@@ -10,7 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
-
+#include "MantidAlgorithms/DllConfig.h"
 namespace Mantid {
 namespace Algorithms {
 /** Takes a 2D workspace as input and find the maximum in each 1D spectrum.
@@ -37,7 +37,7 @@ namespace Algorithms {
     @author L C Chapon, ISIS, Rutherford Appleton Laboratory
     @date 11/08/2009
  */
-class DLLExport Max : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Max : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "Max"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt.h
index 76e8aadcec3d6b6ae55394febcdd617e8640aeca..25b5f1e85686986bd07d7cfe070b8575d4b32991 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxEnt.h
@@ -21,7 +21,7 @@ namespace Algorithms {
   111-124
 */
 
-class DLLExport MaxEnt : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL MaxEnt : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MaxMin.h b/Framework/Algorithms/inc/MantidAlgorithms/MaxMin.h
index c90f4ee33d0dbe28eafaf163f5f61a30b2b320d2..aa7832fcd973ba443bf95cf60efd5c4734095f5d 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MaxMin.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MaxMin.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -39,7 +40,7 @@ namespace Algorithms {
 
     @date 12/27/2011
  */
-class DLLExport MaxMin : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL MaxMin : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "MaxMin"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MedianDetectorTest.h b/Framework/Algorithms/inc/MantidAlgorithms/MedianDetectorTest.h
index af08419f33d3d70ed054bfddb0b05f34adf76848..982a331283efed100682e30ee4dd680a43f2385d 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MedianDetectorTest.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MedianDetectorTest.h
@@ -51,7 +51,7 @@ is in (default: the start of each spectrum)</LI>
 this x value (default: the end of each spectrum)</LI>
 </UL>
 */
-class DLLExport MedianDetectorTest : public DetectorDiagnostic {
+class MANTID_ALGORITHMS_DLL MedianDetectorTest : public DetectorDiagnostic {
 public:
   /// Default constructor initialises all values to zero and runs the base class
   /// constructor
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MergeLogs.h b/Framework/Algorithms/inc/MantidAlgorithms/MergeLogs.h
index e3bc01d87e95ab3926db88039f156e91985bebd7..f79dcdb4e3957e865423dcdf04eeb7e21dfd7098 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MergeLogs.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MergeLogs.h
@@ -7,11 +7,12 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
 
-class DLLExport MergeLogs : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL MergeLogs : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "MergeLogs"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MergeRuns.h b/Framework/Algorithms/inc/MantidAlgorithms/MergeRuns.h
index e305180ad9a8e01c70f8e18ffd3add805ae66673..e24ec0469802e2bf460852693fb95742d868f2dd 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MergeRuns.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MergeRuns.h
@@ -9,9 +9,9 @@
 #include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/MultiPeriodGroupAlgorithm.h"
 #include "MantidAPI/WorkspaceHistory.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidGeometry/Instrument/DetectorInfo.h"
-#include "MantidKernel/System.h"
 
 #include <boost/optional.hpp>
 
@@ -59,7 +59,7 @@ static const std::string FAIL_MERGE = "sample_logs_fail";
 static const std::string FAIL_MERGE_TOLERANCES = "sample_logs_fail_tolerances";
 } // namespace MergeRunsParameter
 
-class DLLExport MergeRuns : public API::MultiPeriodGroupAlgorithm {
+class MANTID_ALGORITHMS_DLL MergeRuns : public API::MultiPeriodGroupAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "MergeRuns"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Min.h b/Framework/Algorithms/inc/MantidAlgorithms/Min.h
index a39383b73a887ebc152ca7fa00555fd5f0dd98a9..4ccad7156b399765c51de6a05526ba34f8413ba3 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Min.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Min.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -37,7 +38,7 @@ namespace Algorithms {
     @author L C Chapon, ISIS, Rutherford Appleton Laboratory
     @date 11/08/2009
  */
-class DLLExport Min : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Min : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "Min"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Minus.h b/Framework/Algorithms/inc/MantidAlgorithms/Minus.h
index 23dada9c30e88d2cea5bd1435be4c610ed7e20cc..b5e058d3c7fc1360a30f72d20f3a152d21f02601 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Minus.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Minus.h
@@ -25,7 +25,7 @@ difference data </LI>
 @author Nick Draper
 @date 14/12/2007
 */
-class DLLExport Minus : public BinaryOperation {
+class MANTID_ALGORITHMS_DLL Minus : public BinaryOperation {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "Minus"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzero.h b/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzero.h
index 51e3a7885a88672219a02b7989463069861cfdf5..c56e65f26bce808fe94fae8a18b94fd3971d5599 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzero.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzero.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/Instrument.h"
 #include "MantidGeometry/muParser_Silent.h"
 #include "MantidKernel/PhysicalConstants.h"
@@ -55,7 +56,7 @@ namespace Algorithms {
   @author Jose Borreguero
   @date 03/04/2013
 */
-class DLLExport ModeratorTzero : public Mantid::API::Algorithm {
+class MANTID_ALGORITHMS_DLL ModeratorTzero : public Mantid::API::Algorithm {
 public:
   /// Default constructor
   ModeratorTzero();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzeroLinear.h b/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzeroLinear.h
index 4cc799882872d60f4dbd2ad87df1d204c7176b48..df41e6fbe7b8fbe7840907f9aec0adfa241f93bf 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzeroLinear.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ModeratorTzeroLinear.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/Instrument.h"
 
 namespace Mantid {
@@ -62,7 +63,7 @@ namespace Algorithms {
     @author Jose Borreguero and Andrei Savici
     @date 12/12/2011
 */
-class DLLExport ModeratorTzeroLinear : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ModeratorTzeroLinear : public API::Algorithm {
 public:
   /// Default constructor
   ModeratorTzeroLinear();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MonitorEfficiencyCorUser.h b/Framework/Algorithms/inc/MantidAlgorithms/MonitorEfficiencyCorUser.h
index 95bd3c3ac2a945fca2dbb9e8a89951ba89024eb3..20c50e9b878f34c20dfcedf21d98c1de86ec3136 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MonitorEfficiencyCorUser.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MonitorEfficiencyCorUser.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
@@ -18,7 +19,7 @@ class HistogramE;
 } // namespace HistogramData
 namespace Algorithms {
 
-class DLLExport MonitorEfficiencyCorUser : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL MonitorEfficiencyCorUser : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "MonitorEfficiencyCorUser"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h
index a6938cc87af20f4ec99bdcda8e9b81e4dc097345..d3e0ae52ddf1459a24660e98270f7fab5c82eb43 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MonteCarloAbsorption.h
@@ -10,6 +10,7 @@
 // Includes
 //------------------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/InterpolationOption.h"
 #include "MantidAlgorithms/SampleCorrections/IBeamProfile.h"
 
@@ -27,7 +28,7 @@ class DetectorGridDefinition;
   Calculates attenuation due to absorption and scattering in a sample +
   its environment using a Monte Carlo algorithm.
 */
-class DLLExport MonteCarloAbsorption : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL MonteCarloAbsorption : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "MonteCarloAbsorption"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h
index e32adacd37e3e062779c845ded046bf18cf0e619..e3c9f4e2a6da8e85bfed38dc04c30338a21542a5 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h
@@ -24,7 +24,7 @@ namespace Algorithms {
     @author Dennis Mikkelson
     @date 17/08/2010
  */
-class DLLExport MultipleScatteringCylinderAbsorption
+class MANTID_ALGORITHMS_DLL MultipleScatteringCylinderAbsorption
     : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Multiply.h b/Framework/Algorithms/inc/MantidAlgorithms/Multiply.h
index 676bcdafd44ce9964836116547452c68397b1c9c..78193cdd973cc36ab84e2dacac89948a8509539b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Multiply.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Multiply.h
@@ -26,7 +26,7 @@ data </LI>
 @author Nick Draper
 @date 14/12/2007
 */
-class DLLExport Multiply : public CommutativeBinaryOperation {
+class MANTID_ALGORITHMS_DLL Multiply : public CommutativeBinaryOperation {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "Multiply"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/MultiplyRange.h b/Framework/Algorithms/inc/MantidAlgorithms/MultiplyRange.h
index 545c0cb6673e6788151246c2ad5b115e1b59ca36..cbb56c693454f1667e9812c71d3a6e31dfb0629e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/MultiplyRange.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/MultiplyRange.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -28,7 +29,7 @@ namespace Algorithms {
     @author Robert Dalgliesh, ISIS, RAL
     @date 12/1/2010
  */
-class DLLExport MultiplyRange : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL MultiplyRange : public API::Algorithm {
 public:
   const std::string name() const override { return "MultiplyRange"; }
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/NRCalculateSlitResolution.h b/Framework/Algorithms/inc/MantidAlgorithms/NRCalculateSlitResolution.h
index 97f71e0f9948330dcf611443e8140f08704497c0..e19841622caf8283b97c38b63a4d3ef5d82c5a4a 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/NRCalculateSlitResolution.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/NRCalculateSlitResolution.h
@@ -8,7 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/DataProcessorAlgorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include <boost/optional.hpp>
 
 namespace Mantid {
@@ -17,7 +17,8 @@ namespace Algorithms {
 /** NRCalculateSlitResolution
  */
 
-class DLLExport NRCalculateSlitResolution : public API::DataProcessorAlgorithm {
+class MANTID_ALGORITHMS_DLL NRCalculateSlitResolution
+    : public API::DataProcessorAlgorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByCurrent.h b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByCurrent.h
index dc7e7df37359c7cad179f7a4feefcef52a92e4e4..ea4e57e7688de2acfe7163e18d692a2f6404fcde 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByCurrent.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByCurrent.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include <boost/shared_ptr.hpp>
 namespace Mantid {
 namespace API {
@@ -31,7 +32,8 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 25/08/2008
 */
-class DLLExport NormaliseByCurrent : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL NormaliseByCurrent
+    : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "NormaliseByCurrent"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByDetector.h b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByDetector.h
index 4b3cb3fa9179dc2ea8a389a13e7600a95bdfcfb1..707eaa43f47b1e1dcb48d0dec77641bbb893d379 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByDetector.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseByDetector.h
@@ -7,9 +7,9 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/Instrument/Detector.h"
 #include "MantidGeometry/Instrument/FitParameter.h"
-#include "MantidKernel/System.h"
 #include <boost/shared_ptr.hpp>
 
 namespace Mantid {
@@ -28,7 +28,7 @@ namespace Algorithms {
 
   @date 2012-07-17
 */
-class DLLExport NormaliseByDetector : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL NormaliseByDetector : public API::Algorithm {
 public:
   NormaliseByDetector(bool parallelExecution = true);
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToMonitor.h b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToMonitor.h
index 1d3dfb352b5ea2925f7c05e9adb90b4f03d3a26b..724c3c9d32749a631679b5737e1572d233b9a591 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToMonitor.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToMonitor.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/IPropertyManager.h"
 #include "MantidKernel/IPropertySettings.h"
 #include "MantidKernel/cow_ptr.h"
@@ -59,7 +60,7 @@ namespace Algorithms {
    boundary. </LI>
     </UL>
 */
-class DLLExport NormaliseToMonitor : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL NormaliseToMonitor : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "NormaliseToMonitor"; }
@@ -125,7 +126,8 @@ private:
 
 // the internal class to verify and modify interconnected properties affecting
 // the different ways to normalize ws by this ws spectrum.
-class DLLExport MonIDPropChanger : public Kernel::IPropertySettings {
+class MANTID_ALGORITHMS_DLL MonIDPropChanger
+    : public Kernel::IPropertySettings {
 
 public:
   //   properties this property depends on:
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToUnity.h b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToUnity.h
index f471db0b47be1ca46de260908d601f02ca583a35..de28940308d7598bd67763ab09205abf62a29cc2 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToUnity.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/NormaliseToUnity.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -38,7 +39,7 @@ namespace Algorithms {
    (default yes)
     </UL>
  */
-class DLLExport NormaliseToUnity : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL NormaliseToUnity : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "NormaliseToUnity"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/OneMinusExponentialCor.h b/Framework/Algorithms/inc/MantidAlgorithms/OneMinusExponentialCor.h
index 6399091d6c1b2c81731bdb74ec51bbc54a873cde..bf9ae24d4c0b2f8c87f0265912c403c2ace7b71e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/OneMinusExponentialCor.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/OneMinusExponentialCor.h
@@ -36,7 +36,7 @@ the correction function</LI>
 @author Russell Taylor, Tessella plc
 @date 24/03/2009
 */
-class DLLExport OneMinusExponentialCor : public UnaryOperation {
+class MANTID_ALGORITHMS_DLL OneMinusExponentialCor : public UnaryOperation {
 public:
   /// Default constructor
   OneMinusExponentialCor();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PDDetermineCharacterizations.h b/Framework/Algorithms/inc/MantidAlgorithms/PDDetermineCharacterizations.h
index 1fd54260fe45c3da25810c5df197b3ac654983d5..2608d09d4a6e9d7462fea0f336984abb073df686 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/PDDetermineCharacterizations.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/PDDetermineCharacterizations.h
@@ -8,7 +8,7 @@
 
 #include "MantidAPI/DistributedAlgorithm.h"
 #include "MantidAPI/ITableWorkspace_fwd.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 
@@ -27,7 +27,7 @@ namespace Algorithms {
 
 /** PDDetermineCharacterizations
  */
-class DLLExport PDDetermineCharacterizations
+class MANTID_ALGORITHMS_DLL PDDetermineCharacterizations
     : public API::DistributedAlgorithm {
 public:
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PDFFourierTransform.h b/Framework/Algorithms/inc/MantidAlgorithms/PDFFourierTransform.h
index 2dc35f95760e489b74aaf2d54c3ce1f12fc7c6bd..1a8657fa17ba41a52896e2f8d312a5f73609d571 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/PDFFourierTransform.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/PDFFourierTransform.h
@@ -8,14 +8,14 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/WorkspaceUnitValidator.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
 
 /** PDFFourierTransform : TODO: DESCRIPTION
  */
-class DLLExport PDFFourierTransform : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL PDFFourierTransform : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PaddingAndApodization.h b/Framework/Algorithms/inc/MantidAlgorithms/PaddingAndApodization.h
index a178ad8885abb7bb8dc20cc7c287ad19ba912788..7f52c57c6e8654ca9f86d97d6e8d0b66a98bca0a 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/PaddingAndApodization.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/PaddingAndApodization.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidHistogramData/Histogram.h"
 #include "MantidKernel/cow_ptr.h"
 
@@ -33,7 +34,7 @@ Required Properties:
 @author Anthony Lim
 @date 10/08/2017
 */
-class DLLExport PaddingAndApodization : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL PaddingAndApodization : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "PaddingAndApodization"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Pause.h b/Framework/Algorithms/inc/MantidAlgorithms/Pause.h
index aaed2d79654d7aabaea343a123e5236583633fda..2ce85b2b13bb7b6f222ec4b5d0c5b6fcd0c03da3 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Pause.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Pause.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +16,7 @@ namespace Algorithms {
 
   @date 2012-02-24
 */
-class DLLExport Pause : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Pause : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PerformIndexOperations.h b/Framework/Algorithms/inc/MantidAlgorithms/PerformIndexOperations.h
index 24e59d67c78daa8331656bea45280aed053c2efe..4b7c3b1024bb7e161416b80f5a2648d13e841f33 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/PerformIndexOperations.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/PerformIndexOperations.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DataProcessorAlgorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -15,7 +15,8 @@ namespace Algorithms {
 /** PerformIndexOperations : Crop and sum a workspace according to the parsed
   workspace index operations provided.
 */
-class DLLExport PerformIndexOperations : public API::DataProcessorAlgorithm {
+class MANTID_ALGORITHMS_DLL PerformIndexOperations
+    : public API::DataProcessorAlgorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Plus.h b/Framework/Algorithms/inc/MantidAlgorithms/Plus.h
index 4fe665794bd1f08516d4235d915c04c208ff2ccf..afbe35d94f5c8d5922c8e5da8eef40e85c2f378f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Plus.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Plus.h
@@ -29,7 +29,7 @@ data </LI>
 @author Dickon Champion, RAL
 @date 12/12/2007
 */
-class DLLExport Plus : public CommutativeBinaryOperation {
+class MANTID_ALGORITHMS_DLL Plus : public CommutativeBinaryOperation {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "Plus"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PointByPointVCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/PointByPointVCorrection.h
index fa2768f2e44e204f66df520aed7705e50ab4cc3c..167dcea67fc8feb870a36621fad58a581573ca2c 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/PointByPointVCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/PointByPointVCorrection.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -19,7 +20,7 @@ namespace Algorithms {
     @author Laurent Chapon, ISIS Facility, Rutherford Appleton Laboratory
     @date 04/03/2009
 */
-class DLLExport PointByPointVCorrection : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL PointByPointVCorrection : public API::Algorithm {
 public:
   PointByPointVCorrection();
   ~PointByPointVCorrection() override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PoissonErrors.h b/Framework/Algorithms/inc/MantidAlgorithms/PoissonErrors.h
index 807e32584aa2a1c320bea11ec9419fe4e4b3641c..6bda74b9731cb3bd958cff7f7168f30c9f604d95 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/PoissonErrors.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/PoissonErrors.h
@@ -29,7 +29,7 @@ namespace Algorithms {
     @author Nick Draper, Tessella Support Services plc
     @date 03/02/2009
  */
-class DLLExport PoissonErrors : public BinaryOperation {
+class MANTID_ALGORITHMS_DLL PoissonErrors : public BinaryOperation {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "PoissonErrors"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrectionFredrikze.h b/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrectionFredrikze.h
index 10cc547436c466aa32f1f046854bd52ab7a67cd7..c6b1a90c402a7147c3a6b4088b313df5a705ade0 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrectionFredrikze.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/PolarizationCorrectionFredrikze.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include <boost/optional.hpp>
 #include <boost/shared_ptr.hpp>
 
@@ -24,7 +24,8 @@ namespace Algorithms {
  Fredrikze, H, et al. "Calibration of a polarized neutron reflectometer" Physica
  B 297 (2001)
  */
-class DLLExport PolarizationCorrectionFredrikze : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL PolarizationCorrectionFredrikze
+    : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PolynomialCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/PolynomialCorrection.h
index f1e2aa2f8972c4f76aaee03c09da81ada261da1b..3fd36d372ca77c3271e6918eb77c7bc4a4ba27fe 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/PolynomialCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/PolynomialCorrection.h
@@ -34,7 +34,7 @@ is applied to the data</LI>
 @author Russell Taylor, Tessella plc
 @date 24/03/2009
 */
-class DLLExport PolynomialCorrection : public UnaryOperation {
+class MANTID_ALGORITHMS_DLL PolynomialCorrection : public UnaryOperation {
 public:
   /// Default constructor
   PolynomialCorrection();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Power.h b/Framework/Algorithms/inc/MantidAlgorithms/Power.h
index 1cb31b91c54305465b5492b4c6870eea5e77ce2e..fb72905cc33a16fd835715ab4face83875592aff 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Power.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Power.h
@@ -30,7 +30,7 @@ namespace Algorithms {
  @date 12/04/2010
  */
 
-class DLLExport Power : public UnaryOperation {
+class MANTID_ALGORITHMS_DLL Power : public UnaryOperation {
 public:
   /// Default constructor
   Power();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PowerLawCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/PowerLawCorrection.h
index 450857ea4c291e492f6e947baef807c778e74dc7..72a6488b9df20362dffbdf49ed50bb499e65041a 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/PowerLawCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/PowerLawCorrection.h
@@ -32,7 +32,7 @@ the input one)</LI>
 @author Robert Dalgliesh ISIS, STFC
 @date 14/10/2009
 */
-class DLLExport PowerLawCorrection : public UnaryOperation {
+class MANTID_ALGORITHMS_DLL PowerLawCorrection : public UnaryOperation {
 public:
   /// Default constructor
   PowerLawCorrection();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/PrecompiledHeader.h b/Framework/Algorithms/inc/MantidAlgorithms/PrecompiledHeader.h
index 7da5a6c9e52c83dcc67a8191790b606f73ce6332..6c428c279dd926bb8a5648b5985725fa46d4e76c 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/PrecompiledHeader.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/PrecompiledHeader.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/Exception.h"
 
 // Boost
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h b/Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h
index 48128b2d78e1bf386a2aa73a519ee25d8e18949a..89651584d56201206e67a64bddbfe1ffc43857c4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Q1D2.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidHistogramData/Histogram.h"
 #include "MantidKernel/cow_ptr.h"
 
@@ -22,7 +23,7 @@ namespace Algorithms {
     @author Steve Williams ISIS Rutherford Appleton Laboratory
     @date 10/12/2010
 */
-class DLLExport Q1D2 : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Q1D2 : public API::Algorithm {
 public:
   /// Default constructor
   Q1D2();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Q1DWeighted.h b/Framework/Algorithms/inc/MantidAlgorithms/Q1DWeighted.h
index e49bb26b76f34f01fc72a8dfedce2d79a2048b24..ea5e960010e227d46b89c50a34a6c323695d0b7a 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Q1DWeighted.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Q1DWeighted.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -51,7 +52,7 @@ namespace Algorithms {
     File change history is stored at: <https://github.com/mantidproject/mantid>
     Code Documentation is available at: <http://doxygen.mantidproject.org>
 */
-class DLLExport Q1DWeighted : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Q1DWeighted : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "Q1DWeighted"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Qhelper.h b/Framework/Algorithms/inc/MantidAlgorithms/Qhelper.h
index 19da35a7fa31dce8eec1d327d8173aa9770fb0ab..b8b884e60a5a1861f5406b072647ff52ae89c9af 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Qhelper.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Qhelper.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/SpectrumInfo.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Qxy.h b/Framework/Algorithms/inc/MantidAlgorithms/Qxy.h
index c7a092bf789f6f4d2be45dee59753b12d6cd7047..1ec09b017277b2756266177815289d06bd4cd154 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Qxy.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Qxy.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -30,7 +31,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella plc
     @date 09/04/2009
 */
-class DLLExport Qxy : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Qxy : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "Qxy"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RadiusSum.h b/Framework/Algorithms/inc/MantidAlgorithms/RadiusSum.h
index 17544dcf625d0c4acf88beeff3228509affba5e5..edc09189e5f57e73d3bc35d2327c31df53e3389f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RadiusSum.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RadiusSum.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/V3D.h"
 
 namespace Mantid {
@@ -20,7 +20,7 @@ namespace Algorithms {
 
   @author Gesner Passos, ISIS
 */
-class DLLExport RadiusSum : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL RadiusSum : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RayTracerTester.h b/Framework/Algorithms/inc/MantidAlgorithms/RayTracerTester.h
index eef0e2ccc14b8e39e103fb8c741d8664ae244f68..3c9a19e50799b80de71be0cc024967d127eced6b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RayTracerTester.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RayTracerTester.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -17,7 +17,7 @@ namespace Algorithms {
   @author Janik Zikovsky
   @date 2011-09-23
 */
-class DLLExport RayTracerTester : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL RayTracerTester : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "RayTracerTester"; };
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReadGroupsFromFile.h b/Framework/Algorithms/inc/MantidAlgorithms/ReadGroupsFromFile.h
index df68f3bcf8b4c6235e0dd134af24f68c7126e71b..88a307879da6f6412cff44579594ef40d949f572 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ReadGroupsFromFile.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ReadGroupsFromFile.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/Workspace2D.h"
 #include <unordered_map>
 
@@ -55,7 +56,7 @@ namespace Algorithms {
     @author Laurent Chapon, ISIS Facility, Rutherford Appleton Laboratory
     @date 09/03/2009
 */
-class DLLExport ReadGroupsFromFile : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ReadGroupsFromFile : public API::Algorithm {
 public:
   /// (Empty) Constructor
   ReadGroupsFromFile();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RealFFT.h b/Framework/Algorithms/inc/MantidAlgorithms/RealFFT.h
index bc1b16b1bae2e242c0a7fe9de55a317eb6aec0bf..54d8c3ac4ca1abd2d3a8d16e98eb24d86375d58e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RealFFT.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RealFFT.h
@@ -17,7 +17,7 @@ namespace Algorithms {
     @author Roman Tolchenov
     @date 01/10/2009
  */
-class DLLExport RealFFT : public API::ParallelAlgorithm {
+class MANTID_ALGORITHMS_DLL RealFFT : public API::ParallelAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "RealFFT"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Rebin.h b/Framework/Algorithms/inc/MantidAlgorithms/Rebin.h
index 6a6f33da99fd9a4155b967d0580eec253eda8014..ef0b906e214bb5eae25b92781412012ed1f7b0db 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Rebin.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Rebin.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -34,7 +35,7 @@ namespace Algorithms {
     @author Dickon Champion, STFC
     @date 25/02/2008
  */
-class DLLExport Rebin : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL Rebin : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "Rebin"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Rebin2D.h b/Framework/Algorithms/inc/MantidAlgorithms/Rebin2D.h
index dca0cc457996a46318e7e10ee09f75a60eef3074..f9cb306c9d48afe1c826a399d7774789f5189691 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Rebin2D.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Rebin2D.h
@@ -10,8 +10,8 @@
 // Includes
 //------------------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/RebinnedOutput.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -21,7 +21,7 @@ Rebins both axes of a two-dimensional workspace to the given parameters.
 
 @author Martyn Gigg, Tessella plc
 */
-class DLLExport Rebin2D : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Rebin2D : public API::Algorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override { return "Rebin2D"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RebinByPulseTimes.h b/Framework/Algorithms/inc/MantidAlgorithms/RebinByPulseTimes.h
index 86f921209c8dc0f80fd8e6bce8198df38e50edac..63c4ae42cb7c2a2191d7e58db835eed18bd740f2 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RebinByPulseTimes.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RebinByPulseTimes.h
@@ -6,8 +6,8 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/RebinByTimeBase.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -15,7 +15,7 @@ namespace Algorithms {
 /** RebinByPulseTimes : Rebin an input EventWorkspace according to the pulse
  times of the events.
  */
-class DLLExport RebinByPulseTimes : public RebinByTimeBase {
+class MANTID_ALGORITHMS_DLL RebinByPulseTimes : public RebinByTimeBase {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeAtSample.h b/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeAtSample.h
index d440ab97e72df9470f89996c4b4dca6424850c38..b6577eeae4d3883d9bedb30002135c7ea2afb3b9 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeAtSample.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeAtSample.h
@@ -6,8 +6,8 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/RebinByTimeBase.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 
@@ -16,7 +16,7 @@ namespace Algorithms {
 /** RebinByTimeAtSample : Rebins an event workspace to a histogram workspace
  with time at sample along the x-axis.
  */
-class DLLExport RebinByTimeAtSample : public RebinByTimeBase {
+class MANTID_ALGORITHMS_DLL RebinByTimeAtSample : public RebinByTimeBase {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeBase.h b/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeBase.h
index 57096b681dad94254bbc625ff4463573a8e9a4c6..bbf3a704e7e9570ef67f6b0320eb9b2da81eae27 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeBase.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeBase.h
@@ -10,7 +10,7 @@
 #include "MantidAPI/IEventWorkspace_fwd.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
 #include "MantidAPI/Progress.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
@@ -19,7 +19,7 @@ namespace Algorithms {
 /** RebinByTimeBase : Algorithm base class for algorithms performing rebinning
  by an absolute time axis.
  */
-class DLLExport RebinByTimeBase : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL RebinByTimeBase : public API::Algorithm {
 public:
 private:
   /// Initialization method
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RebinToWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/RebinToWorkspace.h
index cb6ed9f31027a1a83766d6f42cdcb5db70891fb9..b365b3664d1a2c056ac191b89eca10dc0cbb49cc 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RebinToWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RebinToWorkspace.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 
@@ -26,7 +27,7 @@ namespace Algorithms {
    </UL>
 */
 
-class DLLExport RebinToWorkspace : public Mantid::API::Algorithm {
+class MANTID_ALGORITHMS_DLL RebinToWorkspace : public Mantid::API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "RebinToWorkspace"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Rebunch.h b/Framework/Algorithms/inc/MantidAlgorithms/Rebunch.h
index 6bd9a990cca559b8d6f6be6a3b4e329d266c1d3d..3afe6931c4fe7e60d4e1cdd77f88d27597485aef 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Rebunch.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Rebunch.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace HistogramData {
@@ -40,7 +41,7 @@ be >= 1 </LI>
 @author Dickon Champion, STFC
 @date 24/06/2008
 */
-class DLLExport Rebunch : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Rebunch : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "Rebunch"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RecordPythonScript.h b/Framework/Algorithms/inc/MantidAlgorithms/RecordPythonScript.h
index 65041e49b70fc656c63141079d850d2ff7d18a5b..8bb8905f0cbcc6668eacd0332c0a506055d87fae 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RecordPythonScript.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RecordPythonScript.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/AlgorithmObserver.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/GeneratePythonScript.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -24,8 +24,9 @@ namespace Algorithms {
   <li>InputWorkspace - the workspace name who's history is to be saved.</li>
   </ul>
 */
-class DLLExport RecordPythonScript : public Algorithms::GeneratePythonScript,
-                                     public API::AlgorithmObserver {
+class MANTID_ALGORITHMS_DLL RecordPythonScript
+    : public Algorithms::GeneratePythonScript,
+      public API::AlgorithmObserver {
 public:
   RecordPythonScript();
   /// Algorithm's name for identification
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryBackgroundSubtraction.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryBackgroundSubtraction.h
index 43e6f6a40624c52324b46f0a90ef2b106617022f..38caba504c65924e7a680f42b8f6b9e0f5de7986 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryBackgroundSubtraction.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryBackgroundSubtraction.h
@@ -9,6 +9,7 @@
 #include "MantidAPI/CommonBinsValidator.h"
 #include "MantidAPI/DataProcessorAlgorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +17,7 @@ namespace Algorithms {
 /** ReflectometryBackgroundSubtraction : This is an algorithm that computes the
  * background of a given workspace and removes it from the input workspace.
  */
-class DLLExport ReflectometryBackgroundSubtraction
+class MANTID_ALGORITHMS_DLL ReflectometryBackgroundSubtraction
     : public API::DataProcessorAlgorithm {
 public:
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOne2.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOne2.h
index 5879f130539791a21694cf5801efbcd4f7637324..f2b1e5a1dd53535aa2989079439b244b8f7667e5 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOne2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOne2.h
@@ -26,7 +26,8 @@ namespace Algorithms {
 /** ReflectometryReductionOne2 : Reflectometry reduction of a single input TOF
  workspace to an IvsQ workspace. Version 2 of the algorithm.
  */
-class DLLExport ReflectometryReductionOne2 : public ReflectometryWorkflowBase2 {
+class MANTID_ALGORITHMS_DLL ReflectometryReductionOne2
+    : public ReflectometryWorkflowBase2 {
 public:
   /// Algorithm's name for identification
   const std::string name() const override {
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto2.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto2.h
index d0dfbf11f2b7c99d0fb92ab471e12845697ec259..34216331495ff04e0a3439a46e128deb1baee8a3 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto2.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/WorkspaceGroup_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "ReflectometryWorkflowBase2.h"
 
 #include <boost/optional.hpp>
@@ -17,7 +18,7 @@ namespace Algorithms {
 /** ReflectometryReductionOneAuto2 : Algorithm to run ReflectometryReductionOne,
 attempting to pick instrument parameters for missing properties. Version 2.
 */
-class DLLExport ReflectometryReductionOneAuto2
+class MANTID_ALGORITHMS_DLL ReflectometryReductionOneAuto2
     : public ReflectometryWorkflowBase2 {
 public:
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto3.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto3.h
index 5086f2526b16291383c34e84fab0df453a2ebaad..07001209fa12c31b686243e00f28da80eba8dd16 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto3.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOneAuto3.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/WorkspaceGroup_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "ReflectometryWorkflowBase2.h"
 
 #include <boost/optional.hpp>
@@ -17,7 +18,7 @@ namespace Algorithms {
 /** ReflectometryReductionOneAuto3 : Algorithm to run ReflectometryReductionOne,
 attempting to pick instrument parameters for missing properties. Version 3.
 */
-class DLLExport ReflectometryReductionOneAuto3
+class MANTID_ALGORITHMS_DLL ReflectometryReductionOneAuto3
     : public ReflectometryWorkflowBase2 {
 public:
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase.h
index 31d4d0a7fa9e9ecf0ab4d07a99b8892e74ee906b..c52b12a7893de9f744df97b0452ef404907e363d 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/DataProcessorAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/Instrument.h"
-#include "MantidKernel/System.h"
 
 #include <boost/optional.hpp>
 #include <boost/tuple/tuple.hpp>
@@ -25,7 +25,8 @@ namespace Algorithms {
  containing common implementation functionality usable
  *  by concrete reflectometry workflow algorithms.
  */
-class DLLExport ReflectometryWorkflowBase : public API::DataProcessorAlgorithm {
+class MANTID_ALGORITHMS_DLL ReflectometryWorkflowBase
+    : public API::DataProcessorAlgorithm {
 public:
   // Class typedefs
   using MinMax = boost::tuple<double, double>;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase2.h b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase2.h
index 8dbe0377057721017541ae047515e7688087685f..a8760a8b3b05d98c0976b23b60d540fa67c406bc 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryWorkflowBase2.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/DataProcessorAlgorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/Instrument_fwd.h"
 
 using namespace Mantid::API;
@@ -19,7 +20,7 @@ namespace Algorithms {
 /** ReflectometryWorkflowBase2 : base class containing common implementation
  functionality usable by concrete reflectometry workflow algorithms. Version 2.
  */
-class DLLExport ReflectometryWorkflowBase2
+class MANTID_ALGORITHMS_DLL ReflectometryWorkflowBase2
     : public API::DataProcessorAlgorithm {
 protected:
   /// Initialize reduction-type properties
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Regroup.h b/Framework/Algorithms/inc/MantidAlgorithms/Regroup.h
index 59bf996b418f296faf6efdf9839c9ce5bd627f46..8a7895124c607a598c57d58723fabab87c71581b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Regroup.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Regroup.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/Workspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace HistogramData {
@@ -33,7 +34,7 @@ namespace Algorithms {
     @author Roman Tolchenov
     @date 16/07/2008
  */
-class DLLExport Regroup : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Regroup : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "Regroup"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveBackground.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveBackground.h
index 79a1105a722b9814702048ec9b617e75fcc13288..69b0f2b744f9d8def6b73dc94e656c98eef693b2 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveBackground.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveBackground.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IComponent.h"
 #include "MantidKernel/cow_ptr.h"
 
@@ -35,7 +36,7 @@ from a matrix workspace, expressed in units, different from TOF.
 */
 
 /**Class actually performing background removal from a workspace spectra */
-class DLLExport BackgroundHelper {
+class MANTID_ALGORITHMS_DLL BackgroundHelper {
 public:
   BackgroundHelper();
 
@@ -92,7 +93,7 @@ private:
   double getEi(const API::MatrixWorkspace_const_sptr &inputWS) const;
 };
 
-class DLLExport RemoveBackground : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL RemoveBackground : public API::Algorithm {
 public:
   RemoveBackground() {}
   RemoveBackground(const RemoveBackground &) = delete;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveBins.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveBins.h
index 05cc7f4b186fe8eb90251deb9d15232626a25506..3db399a5fbf09bca604f9e42c2cad6cf1c7cb0db 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveBins.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveBins.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/Unit.h"
 
 namespace Mantid {
@@ -42,7 +43,7 @@ namespace Algorithms {
     @author Matt Clarke
     @date 08/12/2008
  */
-class DLLExport RemoveBins : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL RemoveBins : public API::Algorithm {
 public:
   /// Default constructor
   RemoveBins();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveLowResTOF.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveLowResTOF.h
index 98a14025e77cac7ffaa0363f99e2dc408dce5152..7efea595735fa65e5369ae3300d5befd8a413c7e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveLowResTOF.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveLowResTOF.h
@@ -7,13 +7,14 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidGeometry/IComponent.h"
 
 namespace Mantid {
 
 namespace Algorithms {
-class DLLExport RemoveLowResTOF : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL RemoveLowResTOF : public API::DistributedAlgorithm {
 public:
   RemoveLowResTOF();
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveMaskedSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveMaskedSpectra.h
index 43e6d16caba2dea844eacdf6035a44ba0420b668..eadd93da3d17d8d7f91545b59c8daf15b6de2edb 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveMaskedSpectra.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveMaskedSpectra.h
@@ -7,14 +7,14 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
 
 /** RemoveMaskedSpectra removes all masked spectra.
  */
-class DLLExport RemoveMaskedSpectra : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL RemoveMaskedSpectra : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemovePromptPulse.h b/Framework/Algorithms/inc/MantidAlgorithms/RemovePromptPulse.h
index 48024723d1521ddcdf6f5afa251c23b65021a0fe..eb64a5c4eb1d246fa9d8057c9fd16aa1aec60c26 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RemovePromptPulse.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RemovePromptPulse.h
@@ -8,7 +8,7 @@
 
 #include "MantidAPI/DistributedAlgorithm.h"
 #include "MantidAPI/Run.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -18,7 +18,8 @@ namespace Algorithms {
   @author
   @date 2011-07-18
 */
-class DLLExport RemovePromptPulse : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL RemovePromptPulse
+    : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name for identification
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveSpectra.h
index b25cd8db8bbfa8eed88faadadd81946f78ba6d15..f10fd853886a6f881b22eeb2729e413fa23fb5d0 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveSpectra.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveSpectra.h
@@ -9,6 +9,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidIndexing/IndexInfo.h"
 
 using namespace Mantid::API;
@@ -17,7 +18,7 @@ using namespace Mantid::Indexing;
 namespace Mantid {
 namespace Algorithms {
 
-class DLLExport RemoveSpectra : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL RemoveSpectra : public API::Algorithm {
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "RemoveSpectra"; }
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RemoveWorkspaceHistory.h b/Framework/Algorithms/inc/MantidAlgorithms/RemoveWorkspaceHistory.h
index 450dbc765d72cb930e2b17b3c191fc3983a8256e..df5ec0165876a1815252c635892f3efe19b3bee6 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RemoveWorkspaceHistory.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RemoveWorkspaceHistory.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -17,7 +17,7 @@ namespace Algorithms {
   Removes all algorithm history records from the workspace history attached to a
   workspace.
 */
-class DLLExport RemoveWorkspaceHistory : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL RemoveWorkspaceHistory : public API::Algorithm {
 public:
   const std::string name() const override;
   const std::string summary() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspace.h
index 645c652b8964bef892b4348d2977701582758ef2..509ad33407267e05b489e75f3a8bf3aa04e6940f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspace.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -23,7 +24,7 @@ namespace Algorithms {
     <LI> OutputWorkspace - The name of the to rename the workspace to </LI>
     </UL>
  */
-class DLLExport RenameWorkspace : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL RenameWorkspace : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "RenameWorkspace"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspaces.h b/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspaces.h
index de823dd7a80420e11d5273f6b63c3fac5c8c91cf..3c51ce5b2422fef47643a472fd65a0240052c792 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspaces.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RenameWorkspaces.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -29,7 +30,7 @@ namespace Algorithms {
     <LI> Prefix - true if prefixing the Output Workspace name
     </UL>
  */
-class DLLExport RenameWorkspaces : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL RenameWorkspaces : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "RenameWorkspaces"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ReplaceSpecialValues.h b/Framework/Algorithms/inc/MantidAlgorithms/ReplaceSpecialValues.h
index 9f52942577c9cf17e4de0cf6322640abd90c1b70..386f04079cc2a296b385a62e0f0e8b389023c5e4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ReplaceSpecialValues.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ReplaceSpecialValues.h
@@ -21,7 +21,7 @@ namespace Algorithms {
  @author Nicholas Draper, Tessella plc
  @date 18/06/2009
  */
-class DLLExport ReplaceSpecialValues : public UnaryOperation {
+class MANTID_ALGORITHMS_DLL ReplaceSpecialValues : public UnaryOperation {
 public:
   /// Default constructor
   ReplaceSpecialValues();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ResampleX.h b/Framework/Algorithms/inc/MantidAlgorithms/ResampleX.h
index 47a157a4525568a4a37e91db8b1a74024572c1ca..ad7a488f3f824751229b08830a9284954eada708 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ResampleX.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ResampleX.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/Rebin.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/cow_ptr.h"
 #include <map>
 
@@ -17,7 +17,7 @@ namespace Algorithms {
 
 /** ResampleX : TODO: DESCRIPTION
  */
-class DLLExport ResampleX : public Algorithms::Rebin {
+class MANTID_ALGORITHMS_DLL ResampleX : public Algorithms::Rebin {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ResetNegatives.h b/Framework/Algorithms/inc/MantidAlgorithms/ResetNegatives.h
index b850ce247737569d3ef4a29d3431789cd6e08e76..1bb025c047bbd6836d11297030af3fc3dac85a8e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ResetNegatives.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ResetNegatives.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +16,7 @@ namespace Algorithms {
 
   @date 2012-02-01
 */
-class DLLExport ResetNegatives : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ResetNegatives : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ResizeRectangularDetector.h b/Framework/Algorithms/inc/MantidAlgorithms/ResizeRectangularDetector.h
index 3e192307703d52a285a38d6135add26cbc4f39cf..206ed9f7779a2a984bd5247ba3390497bd216e06 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ResizeRectangularDetector.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ResizeRectangularDetector.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +16,7 @@ namespace Algorithms {
 
   @date 2011-11-22
 */
-class DLLExport ResizeRectangularDetector : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ResizeRectangularDetector : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/RingProfile.h b/Framework/Algorithms/inc/MantidAlgorithms/RingProfile.h
index 1d34310e08b4ba61b72a42322442642751a73c23..3973a7183232e55d3aa426be23ea33057053c780 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/RingProfile.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/RingProfile.h
@@ -8,8 +8,8 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/ISpectrum.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDetector.h"
-#include "MantidKernel/System.h"
 #include <vector>
 
 namespace Mantid {
@@ -20,7 +20,7 @@ namespace Algorithms {
 
   @author Gesner Passos, ISIS
 */
-class DLLExport RingProfile : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL RingProfile : public API::Algorithm {
 public:
   RingProfile();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SANSCollimationLengthEstimator.h b/Framework/Algorithms/inc/MantidAlgorithms/SANSCollimationLengthEstimator.h
index 05dd97b85d9017fbfbc7a845d1cb322be43da280..b2ce8743f71c2b9d14d5f9e7405d1134fcf37a85 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SANSCollimationLengthEstimator.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SANSCollimationLengthEstimator.h
@@ -7,13 +7,13 @@
 #pragma once
 
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/Property.h"
-#include "MantidKernel/System.h"
 /**Helper class which provides the Collimation Length for SANS instruments
  */
 namespace Mantid {
 namespace Algorithms {
-class DLLExport SANSCollimationLengthEstimator {
+class MANTID_ALGORITHMS_DLL SANSCollimationLengthEstimator {
 public:
   double provideCollimationLength(Mantid::API::MatrixWorkspace_sptr workspace);
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrection.h b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrection.h
index e958aa82b536804670004e8638fcfa860c3973b7..e95b15f25866c492cac81fc2a27217ce3116cc90 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrection.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrection.h
@@ -5,8 +5,9 @@
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
-#include "MantidAPI/Algorithm.h"
 
+#include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 namespace Mantid {
 namespace Algorithms {
 
@@ -15,7 +16,7 @@ namespace Algorithms {
   algorithm of Jerry Mayers.
   See https://inis.iaea.org/search/search.aspx?orig_q=RN:20000574
 */
-class DLLExport MayersSampleCorrection : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL MayersSampleCorrection : public API::Algorithm {
 public:
   MayersSampleCorrection();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrectionStrategy.h b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrectionStrategy.h
index 556e0a68601783cd481425d51dd257cd9a711883..71f1ad03a7c78c0dfd6743825d76daaceabd26b6 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrectionStrategy.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/MayersSampleCorrectionStrategy.h
@@ -6,8 +6,8 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidHistogramData/Histogram.h"
-#include "MantidKernel/System.h"
 #include <memory>
 #include <utility>
 #include <vector>
@@ -24,7 +24,7 @@ namespace Algorithms {
   https://inis.iaea.org/search/search.aspx?orig_q=RN:20000574 for an array of
   tof, signal & error values
 */
-class DLLExport MayersSampleCorrectionStrategy {
+class MANTID_ALGORITHMS_DLL MayersSampleCorrectionStrategy {
 public:
   /**
    * Stores parameters for a single calculation for a given angle
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/SparseInstrument.h b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/SparseInstrument.h
index 0fea322e193bec30010025e90110ca080a9ba1dd..b4026ab40bcfa00d9480291ef0fa5fabcbb9170f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/SparseInstrument.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SampleCorrections/SparseInstrument.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/MatrixWorkspace_fwd.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 #include <array>
 #include <tuple>
@@ -32,29 +32,31 @@ namespace SparseInstrument {
   Defines functions and utilities to create and deal with sparse instruments.
 */
 
-DLLExport std::tuple<double, double, double, double>
+MANTID_ALGORITHMS_DLL std::tuple<double, double, double, double>
 extremeAngles(const API::MatrixWorkspace &ws);
-DLLExport std::pair<double, double>
+MANTID_ALGORITHMS_DLL std::pair<double, double>
 geographicalAngles(const Kernel::V3D &p,
                    const Geometry::ReferenceFrame &refFrame);
-DLLExport std::tuple<double, double>
+MANTID_ALGORITHMS_DLL std::tuple<double, double>
 extremeWavelengths(const API::MatrixWorkspace &ws);
-DLLExport HistogramData::Histogram
+MANTID_ALGORITHMS_DLL HistogramData::Histogram
 modelHistogram(const API::MatrixWorkspace &modelWS,
                const size_t wavelengthPoints);
-DLLExport API::MatrixWorkspace_uptr
+MANTID_ALGORITHMS_DLL API::MatrixWorkspace_uptr
 createSparseWS(const API::MatrixWorkspace &modelWS,
                const Algorithms::DetectorGridDefinition &grid,
                const size_t wavelengthPoints);
-DLLExport double greatCircleDistance(const double lat1, const double long1,
-                                     const double lat2, const double long2);
-DLLExport std::array<double, 4>
+MANTID_ALGORITHMS_DLL double greatCircleDistance(const double lat1,
+                                                 const double long1,
+                                                 const double lat2,
+                                                 const double long2);
+MANTID_ALGORITHMS_DLL std::array<double, 4>
 inverseDistanceWeights(const std::array<double, 4> &distances);
-DLLExport HistogramData::Histogram
+MANTID_ALGORITHMS_DLL HistogramData::Histogram
 interpolateFromDetectorGrid(const double lat, const double lon,
                             const API::MatrixWorkspace &ws,
                             const std::array<size_t, 4> &indices);
-DLLExport std::unique_ptr<const Algorithms::DetectorGridDefinition>
+MANTID_ALGORITHMS_DLL std::unique_ptr<const Algorithms::DetectorGridDefinition>
 createDetectorGridDefinition(const API::MatrixWorkspace &modelWS,
                              const size_t rows, const size_t columns);
 } // namespace SparseInstrument
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SassenaFFT.h b/Framework/Algorithms/inc/MantidAlgorithms/SassenaFFT.h
index ecd8c1f60ebeee9d3623d2bf3fb4811823bd4dc7..a578c4afa35bd8f564847230c6aa3459f4aa9c72 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SassenaFFT.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SassenaFFT.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/Workspace2D.h"
 #include "MantidKernel/PhysicalConstants.h"
 
@@ -22,7 +23,7 @@ namespace Algorithms {
   @date 2012-05-29
   */
 
-class DLLExport SassenaFFT : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL SassenaFFT : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "SassenaFFT"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Scale.h b/Framework/Algorithms/inc/MantidAlgorithms/Scale.h
index 80f9800f97548a13405beae3b2140a3b9b2c2e78..7dbd9195917268f9c4ddb6089b2d6b1198e29770 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Scale.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Scale.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -27,7 +28,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella plc
     @date 19/03/2010
 */
-class DLLExport Scale : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL Scale : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "Scale"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ScaleX.h b/Framework/Algorithms/inc/MantidAlgorithms/ScaleX.h
index 94f1b793adf5cbadf979b3d4c15db095fcc6b8b6..6b68e5e916565c9246860a65ad7ae8acb562676e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ScaleX.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ScaleX.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/Workspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 #include <boost/function.hpp>
 
@@ -30,7 +31,7 @@ Required Properties:
 @author
 @date 6/23/2011
 */
-class DLLExport ScaleX : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ScaleX : public API::Algorithm {
 public:
   /// Default constructor
   ScaleX();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Segfault.h b/Framework/Algorithms/inc/MantidAlgorithms/Segfault.h
index 181870ee1e654cd3d7a65017d49816ba7abe7bda..cad8e4f8ccc2fde8c093467959c1f9daabd6648a 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Segfault.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Segfault.h
@@ -7,14 +7,14 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
 
 /** Segfault : TODO: DESCRIPTION
  */
-class DLLExport Segfault : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Segfault : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SetInstrumentParameter.h b/Framework/Algorithms/inc/MantidAlgorithms/SetInstrumentParameter.h
index c46152725beb0cb6e62f7a5f7aa2b8ae30f386b1..a0d53085c122bd1ff9c3d24d9ba221920352c53a 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SetInstrumentParameter.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SetInstrumentParameter.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 
@@ -21,7 +21,7 @@ namespace Algorithms {
 /** SetInstrumentParameter : A simple algorithm to add or set the value of an
   instrument parameter
 */
-class DLLExport SetInstrumentParameter : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL SetInstrumentParameter : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SetUncertainties.h b/Framework/Algorithms/inc/MantidAlgorithms/SetUncertainties.h
index 7cfa6e36f94c7918b9d623e32877326ad9050d5a..65a33107dda52ef8e13b0ccf7cbb974e87536dc4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SetUncertainties.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SetUncertainties.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/ParallelAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -20,7 +21,7 @@ namespace Algorithms {
 
  @date 10/12/2010
  */
-class DLLExport SetUncertainties : public API::ParallelAlgorithm {
+class MANTID_ALGORITHMS_DLL SetUncertainties : public API::ParallelAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/ShiftLogTime.h b/Framework/Algorithms/inc/MantidAlgorithms/ShiftLogTime.h
index 613d11f7a7b13d330f99048b616463cd2f72f724..acb0aa67d0c0ad99011a9f44d0455c6f5cf718a7 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/ShiftLogTime.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/ShiftLogTime.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +16,7 @@ namespace Algorithms {
 
   @date 2011-08-26
 */
-class DLLExport ShiftLogTime : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL ShiftLogTime : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SignalOverError.h b/Framework/Algorithms/inc/MantidAlgorithms/SignalOverError.h
index 9093af8b684435fdb0626047f074a46b6fda425c..ea4fde17f96ce3e688d72503c55b45f581493779 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SignalOverError.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SignalOverError.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/UnaryOperation.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -17,7 +17,7 @@ namespace Algorithms {
 
   @date 2011-12-05
 */
-class DLLExport SignalOverError : public UnaryOperation {
+class MANTID_ALGORITHMS_DLL SignalOverError : public UnaryOperation {
 public:
   SignalOverError();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SmoothData.h b/Framework/Algorithms/inc/MantidAlgorithms/SmoothData.h
index 1cf1efc4b709daffea6db07c55512f31e114776f..8023d1ae9ea19bfd5639cce8de1f048ce84c2bd4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SmoothData.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SmoothData.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDTypes.h"
 
 namespace Mantid {
@@ -36,7 +37,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 23/10/2008
 */
-class DLLExport SmoothData : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL SmoothData : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "SmoothData"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SmoothNeighbours.h b/Framework/Algorithms/inc/MantidAlgorithms/SmoothNeighbours.h
index b4826baf1ab9160ee8a9e12260f1be0cb060bc12..60b4a8938013e03115a2d2974cc918cb6546342c 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SmoothNeighbours.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SmoothNeighbours.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/WeightingStrategy.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidDataObjects/Workspace2D.h"
@@ -22,7 +23,7 @@ using SpectraDistanceMap = std::map<specnum_t, Mantid::Kernel::V3D>;
 /*
 Filters spectra detector list by radius.
 */
-class DLLExport RadiusFilter {
+class MANTID_ALGORITHMS_DLL RadiusFilter {
 public:
   /**
   Constructor
@@ -62,7 +63,7 @@ private:
   @authors Janik Zikovsky, Vickie Lynch, SNS
   @date Oct 2010
 */
-class DLLExport SmoothNeighbours : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL SmoothNeighbours : public API::Algorithm {
 public:
   /// Default constructor
   SmoothNeighbours();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SofQCommon.h b/Framework/Algorithms/inc/MantidAlgorithms/SofQCommon.h
index 3fbba440059901445f4a499666ade4452433fc30..7413f7f6e58833440a88b5af8cceca17e99951bf 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SofQCommon.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SofQCommon.h
@@ -8,13 +8,14 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDetector.h"
 // Routines used by all SofQW algorithms intended to provide united
 // user interface to all SofQ algorihtms.
 namespace Mantid {
 namespace Algorithms {
 
-struct DLLExport SofQCommon {
+struct MANTID_ALGORITHMS_DLL SofQCommon {
 
   /// E Mode
   int m_emode;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SofQW.h b/Framework/Algorithms/inc/MantidAlgorithms/SofQW.h
index 9eee32664456b9262ade022c704557b13288db91..2eca91d13e038aadbce33d3b173a152b87ed601e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SofQW.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SofQW.h
@@ -41,7 +41,7 @@ common bins. </LI>
 
 struct SofQCommon;
 
-class DLLExport SofQW : public API::DataProcessorAlgorithm {
+class MANTID_ALGORITHMS_DLL SofQW : public API::DataProcessorAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "SofQW"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SofQWCentre.h b/Framework/Algorithms/inc/MantidAlgorithms/SofQWCentre.h
index a913ba83320eb97a439f5d68cf037bc07f2f77a9..8c37c84fd7d6b35d7ae08d4b3c6699649e4a6adf 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SofQWCentre.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SofQWCentre.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/SofQCommon.h"
 
 namespace Mantid {
@@ -32,7 +33,7 @@ common bins. </LI>
 @author Russell Taylor, Tessella plc
 @date 24/02/2010
 */
-class DLLExport SofQWCentre : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL SofQWCentre : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "SofQWCentre"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SofQWNormalisedPolygon.h b/Framework/Algorithms/inc/MantidAlgorithms/SofQWNormalisedPolygon.h
index 8dad1bb22a730cd8ab3fdacfb5b33e1a36cb123d..bf40b88bf46cafe6f15c5c78f529e9d21eae90b5 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SofQWNormalisedPolygon.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SofQWNormalisedPolygon.h
@@ -37,7 +37,7 @@ common bins. </LI>
 
 @date 2012/05/04
  */
-class DLLExport SofQWNormalisedPolygon : public Rebin2D {
+class MANTID_ALGORITHMS_DLL SofQWNormalisedPolygon : public Rebin2D {
 public:
   /// Default constructor
   SofQWNormalisedPolygon() = default;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SofQWPolygon.h b/Framework/Algorithms/inc/MantidAlgorithms/SofQWPolygon.h
index 96a935f6dd86f59fbc34a0f13358d665522a0295..a84a8ef4b1e185417e001d6b9a451e979310fe94 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SofQWPolygon.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SofQWPolygon.h
@@ -38,7 +38,7 @@ common bins. </LI>
 @author Martyn Giggg
 @date 2011-07-15
  */
-class DLLExport SofQWPolygon : public Rebin2D {
+class MANTID_ALGORITHMS_DLL SofQWPolygon : public Rebin2D {
 public:
   /// Default constructor
   SofQWPolygon();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SolidAngle.h b/Framework/Algorithms/inc/MantidAlgorithms/SolidAngle.h
index 06acb566d2af7f1350b7ac93c60f766359f4c5e5..a1d02d40fbd26b752ee455b5edcdd0e4a42becfd 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SolidAngle.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SolidAngle.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -20,7 +21,7 @@ namespace Algorithms {
     @author Nick Draper, Tessella Support Services plc
     @date 26/01/2009
 */
-class DLLExport SolidAngle : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL SolidAngle : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "SolidAngle"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SortEvents.h b/Framework/Algorithms/inc/MantidAlgorithms/SortEvents.h
index 68311d4e022367439c5334c3decc986dbaffcb10..594849ef55b8d3be2548ed294fe28b195b1303fe 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SortEvents.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SortEvents.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -23,7 +24,7 @@ namespace Algorithms {
     @author Janik Zikovsky, SNS
     @date Friday, August 13, 2010.
  */
-class DLLExport SortEvents : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL SortEvents : public API::DistributedAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "SortEvents"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SortXAxis.h b/Framework/Algorithms/inc/MantidAlgorithms/SortXAxis.h
index da33bb5325af366a597be650d9d7d26fa259d9ef..82f1ea942a6af96ef70f85d135768b4fc67ec700 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SortXAxis.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SortXAxis.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -20,7 +21,7 @@ namespace Algorithms {
  * @copyright GNU General Public License
  */
 
-class DLLExport SortXAxis : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL SortXAxis : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpatialGrouping.h b/Framework/Algorithms/inc/MantidAlgorithms/SpatialGrouping.h
index 02613929e0596bf9913119382783b0495d5460ca..acbe927dd19a321e6c3b9c366fe578a5d233c0a3 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SpatialGrouping.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SpatialGrouping.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/WorkspaceNearestNeighbourInfo.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDTypes.h"
 
 namespace Mantid {
@@ -30,7 +31,7 @@ namespace Algorithms {
     @author Michael Whitty, STFC ISIS
     @date 13/12/2010
 */
-class DLLExport SpatialGrouping : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL SpatialGrouping : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "SpatialGrouping"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionAlgorithm.h b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionAlgorithm.h
index 8511941362e9d3ac83f61b8355408257691feda0..5e024f0bc04516c4c0f2071a63d11a4f665d5920 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionAlgorithm.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionAlgorithm.h
@@ -7,9 +7,9 @@
 #pragma once
 
 #include "MantidAPI/DataProcessorAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IComponent.h"
 #include "MantidGeometry/Instrument.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -18,7 +18,7 @@ namespace Algorithms {
  methods required for specular reflection calculations.
  *
  */
-class DLLExport SpecularReflectionAlgorithm
+class MANTID_ALGORITHMS_DLL SpecularReflectionAlgorithm
     : public Mantid::API::DataProcessorAlgorithm {
 protected:
   /// Constructor
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta.h b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta.h
index b3fbb51908839668b56eb424c43f5c5df4613b9a..c1e550c009d82b354e5538aef706b28006bcd29c 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/SpecularReflectionAlgorithm.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +16,7 @@ namespace Algorithms {
 /** SpecularReflectionCorrectTheta : Calculates a theta value based on the
   specular reflection condition.
 */
-class DLLExport SpecularReflectionCalculateTheta
+class MANTID_ALGORITHMS_DLL SpecularReflectionCalculateTheta
     : public SpecularReflectionAlgorithm {
 public:
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta2.h b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta2.h
index 9f4950fa640c48c1966c3ac24b31ec9714b87cac..be8771fd39f2ea7df23748e4f87861f13fa1c81e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionCalculateTheta2.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/SpecularReflectionAlgorithm.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +16,7 @@ namespace Algorithms {
 /** SpecularReflectionCorrectTheta : Calculates a theta value based on the
   specular reflection condition. Version 2.
 */
-class DLLExport SpecularReflectionCalculateTheta2
+class MANTID_ALGORITHMS_DLL SpecularReflectionCalculateTheta2
     : public SpecularReflectionAlgorithm {
 public:
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect.h b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect.h
index d463a4a20b5d87798b9a660a329863309543b5ee..dcfe56f481c08240068d1f4252aa6a63c50005dd 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect.h
@@ -7,8 +7,8 @@
 #pragma once
 
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidAlgorithms/SpecularReflectionAlgorithm.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +16,7 @@ namespace Algorithms {
 /** SpecularReflectionPositionCorrect : Algorithm to perform vertical position
  corrections based on the specular reflection condition.
  */
-class DLLExport SpecularReflectionPositionCorrect
+class MANTID_ALGORITHMS_DLL SpecularReflectionPositionCorrect
     : public SpecularReflectionAlgorithm {
 public:
   const std::string name() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect2.h b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect2.h
index 5fef9b29da3cbdd78028ac9ed89ce07942822b43..c9bf8ed6c59b4fa55562c06cbb343e6773a026b6 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SpecularReflectionPositionCorrect2.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 #include "MantidGeometry/IDTypes.h"
 
@@ -23,7 +24,7 @@ namespace Algorithms {
 /** SpecularReflectionPositionCorrect : Algorithm to perform position
 corrections based on the specular reflection condition. Version 2.
 */
-class DLLExport SpecularReflectionPositionCorrect2 final
+class MANTID_ALGORITHMS_DLL SpecularReflectionPositionCorrect2 final
     : public API::Algorithm {
 public:
   /// Name of this algorithm
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SphericalAbsorption.h b/Framework/Algorithms/inc/MantidAlgorithms/SphericalAbsorption.h
index ce5400ffd7733ed4cc002718671b61f0241ce0b3..ed2e111183f76e154a392212d3e18d741ee34132 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SphericalAbsorption.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SphericalAbsorption.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDetector.h"
 
 namespace Mantid {
@@ -62,7 +63,7 @@ namespace Algorithms {
     @author Vickie Lynch, SNS
     @date 08/16/2011
 */
-class DLLExport SphericalAbsorption : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL SphericalAbsorption : public API::Algorithm {
 public:
   /// (Empty) Constructor
   SphericalAbsorption();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h b/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h
index fc07b205a6ad34e4fb2a341969deaf9004ba3b80..3e3ddd522ab8abf3b0d4d8fbdd13dc11eb627be7 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 #include <boost/tuple/tuple.hpp>
 
@@ -16,7 +17,7 @@ namespace Algorithms {
 
 /** Stitch1D : Stitches two Matrix Workspaces together into a single output.
  */
-class DLLExport Stitch1D : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Stitch1D : public API::Algorithm {
 public:
   /// Algorithm's name for identification. @see Algorithm::name
   const std::string name() const override { return "Stitch1D"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Stitch1DMany.h b/Framework/Algorithms/inc/MantidAlgorithms/Stitch1DMany.h
index 21f4c9bf0525c6fff999d2c179ec0c155dd7dc77..22aedae47b92b4fc688aa02c8472d2d1d377b2f0 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Stitch1DMany.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Stitch1DMany.h
@@ -8,7 +8,7 @@
 
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/WorkspaceGroup.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +16,7 @@ namespace Algorithms {
 /** Stitch1DMany : Stitches multiple Matrix Workspaces together into a single
  output.
  */
-class DLLExport Stitch1DMany : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Stitch1DMany : public API::Algorithm {
 public:
   /// Algorithm's name for identification. @see Algorithm::name
   const std::string name() const override { return "Stitch1DMany"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/StripPeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/StripPeaks.h
index d01655833293c4341b6af7f3bbafce30b87920e7..c2dea24b70b2e1a181eee0454f4d001df9eb661b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/StripPeaks.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/StripPeaks.h
@@ -8,6 +8,7 @@
 
 #include "MantidAPI/ITableWorkspace_fwd.h"
 #include "MantidAPI/ParallelAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -34,7 +35,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 30/10/2008
 */
-class DLLExport StripPeaks : public API::ParallelAlgorithm {
+class MANTID_ALGORITHMS_DLL StripPeaks : public API::ParallelAlgorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "StripPeaks"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks.h b/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks.h
index 58e58a499b91d6f0dbc1e64bfea6889506d568de..40043ba481761b9ac64838202fe7a792871e71be 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks.h
@@ -18,6 +18,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/ITableWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -40,7 +41,7 @@ namespace Algorithms {
     @author Janik Zikovsky, SNS
     @date 2010-09-10
 */
-class DLLExport StripVanadiumPeaks : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL StripVanadiumPeaks : public API::Algorithm {
 public:
   /// (Empty) Constructor
   StripVanadiumPeaks();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks2.h b/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks2.h
index 88517bf0f862f8a31611271cb19c3478b66e2bae..c70d89d67c727cac8c74af508e682aa0ea09bad4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks2.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/StripVanadiumPeaks2.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/ParallelAlgorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -17,7 +17,8 @@ namespace Algorithms {
   @author Wenduo Zhou
   @date 2011-10-07
 */
-class DLLExport StripVanadiumPeaks2 : public API::ParallelAlgorithm {
+class MANTID_ALGORITHMS_DLL StripVanadiumPeaks2
+    : public API::ParallelAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "StripVanadiumPeaks"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SumEventsByLogValue.h b/Framework/Algorithms/inc/MantidAlgorithms/SumEventsByLogValue.h
index af60962ee0aee29bee9123c7f14c49de401eaeef..dcf0ba4454623e2d51684fbe9a4fb5e5c705979b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SumEventsByLogValue.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SumEventsByLogValue.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/ITableWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 #include "MantidKernel/TimeSeriesProperty.h"
 
@@ -21,7 +22,7 @@ namespace Algorithms {
   events in the workspace
   as a function of a specified log.
 */
-class DLLExport SumEventsByLogValue : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL SumEventsByLogValue : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "SumEventsByLogValue"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SumNeighbours.h b/Framework/Algorithms/inc/MantidAlgorithms/SumNeighbours.h
index 5dc90475614e3deb6895327609a5cc44113b8469..06793d08a9c7533a1b84374e6b7673f19f77ec13 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SumNeighbours.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SumNeighbours.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -24,7 +25,7 @@ namespace Algorithms {
     @author Janik Zikovsky, SNS
     @date Oct 2010
  */
-class DLLExport SumNeighbours : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL SumNeighbours : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "SumNeighbours"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SumRowColumn.h b/Framework/Algorithms/inc/MantidAlgorithms/SumRowColumn.h
index d9418df509fb8d74fb3bf354048bca36d74c39a3..a5b3e631c23a27bd5d9b4b19ab38f0067baea905 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SumRowColumn.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SumRowColumn.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -45,7 +46,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella plc
     @date 22/06/2009
 */
-class DLLExport SumRowColumn : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL SumRowColumn : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "SumRowColumn"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/SumSpectra.h b/Framework/Algorithms/inc/MantidAlgorithms/SumSpectra.h
index e965536012131cd3febde075b0e7b76530ec3e32..0cf5c4dc974eb1b86ba71d0b005410b156500b2f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/SumSpectra.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/SumSpectra.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/ParallelAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IDTypes.h"
 #include <set>
 
@@ -35,7 +36,7 @@ namespace Algorithms {
     @author Nick Draper, Tessella Support Services plc
     @date 22/01/2009
  */
-class DLLExport SumSpectra : public API::ParallelAlgorithm {
+class MANTID_ALGORITHMS_DLL SumSpectra : public API::ParallelAlgorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "SumSpectra"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolution.h b/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolution.h
index 2c0a7910bb4d792c968752b476f466f7e4a19171..bc2d5ac5d67c539f90d299747cfa4fa6033d9517 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolution.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolution.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -38,7 +39,7 @@ namespace Algorithms {
     File change history is stored at: <https://github.com/mantidproject/mantid>
     Code Documentation is available at: <http://doxygen.mantidproject.org>
 */
-class DLLExport TOFSANSResolution : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL TOFSANSResolution : public API::Algorithm {
 public:
   /// Defatult constructor
   TOFSANSResolution();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixel.h b/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixel.h
index 103986d021261e5ffc03f066af24a42bc0672730..77da908e862947ec5e4fbcf6f98ff7d628b5a209 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixel.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixel.h
@@ -11,6 +11,7 @@
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
 #include "MantidAPI/MatrixWorkspace_fwd.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -22,7 +23,7 @@ namespace Algorithms {
     File change history is stored at: <https://github.com/mantidproject/mantid>
     Code Documentation is available at: <http://doxygen.mantidproject.org>
 */
-class DLLExport TOFSANSResolutionByPixel : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL TOFSANSResolutionByPixel : public API::Algorithm {
 public:
   /// Default constructor
   TOFSANSResolutionByPixel();
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixelCalculator.h b/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixelCalculator.h
index fee9c7557eaf00f60ad85068dac58355d446e7ac..f3ea7b02ae625748e039a0c59401d7f4081eeb92 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixelCalculator.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/TOFSANSResolutionByPixelCalculator.h
@@ -5,14 +5,14 @@
 //     & Institut Laue - Langevin
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 namespace Mantid {
 namespace Algorithms {
 
 /**Helper class which provides the uncertainty calculations for the
 TOFSANSResolutionByPixel class
 */
-class DLLExport TOFSANSResolutionByPixelCalculator {
+class MANTID_ALGORITHMS_DLL TOFSANSResolutionByPixelCalculator {
 public:
   double getWavelengthIndependentFactor(double r1, double r2, double deltaR,
                                         double lCollim, double l2) const;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategy.h b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategy.h
index 71d0d2f20644bc492cad320da495e23f10ca6d51..607a5b68a93ebc31c553c9b777c7c32973ba4276 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategy.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategy.h
@@ -6,6 +6,7 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/System.h"
 
 namespace Mantid {
@@ -28,7 +29,7 @@ struct Correction {
 
   SampleT = PulseT + [TOF to sample]
 */
-class DLLExport TimeAtSampleStrategy {
+class MANTID_ALGORITHMS_DLL TimeAtSampleStrategy {
 public:
   virtual Correction calculate(const size_t &workspace_index) const = 0;
   virtual ~TimeAtSampleStrategy() = default;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyDirect.h b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyDirect.h
index 9d58e90358173b11d6968271e4c67f8612172043..6f40c93a73445843031191eb2f8775acab617865 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyDirect.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyDirect.h
@@ -7,7 +7,6 @@
 #pragma once
 
 #include "MantidAlgorithms/TimeAtSampleStrategy.h"
-#include "MantidKernel/System.h"
 #include <boost/shared_ptr.hpp>
 
 namespace Mantid {
@@ -20,7 +19,8 @@ namespace Algorithms {
 /** TimeAtSampleStrategyDirect : Determine the Time at Sample corrections for a
   Direct Geometry instrument
 */
-class DLLExport TimeAtSampleStrategyDirect : public TimeAtSampleStrategy {
+class MANTID_ALGORITHMS_DLL TimeAtSampleStrategyDirect
+    : public TimeAtSampleStrategy {
 public:
   TimeAtSampleStrategyDirect(
       boost::shared_ptr<const Mantid::API::MatrixWorkspace> ws, double ei);
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyElastic.h b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyElastic.h
index 80cf100706ebc610d8fcf7e738d4df70dac6b141..e9f28a63f46660d2789d0e15da4a0d2f2f5fecc6 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyElastic.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyElastic.h
@@ -7,7 +7,6 @@
 #pragma once
 
 #include "MantidAlgorithms/TimeAtSampleStrategy.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/V3D.h"
 #include <boost/shared_ptr.hpp>
 
@@ -21,7 +20,7 @@ namespace Algorithms {
 
 /** TimeAtSampleStrategyElastic : Time at sample stragegy for elastic scattering
  */
-class DLLExport TimeAtSampleStrategyElastic
+class MANTID_ALGORITHMS_DLL TimeAtSampleStrategyElastic
     : public Mantid::Algorithms::TimeAtSampleStrategy {
 public:
   TimeAtSampleStrategyElastic(
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyIndirect.h b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyIndirect.h
index 2c56dd09733b143d02373c2d1de0cbfbc515a8cc..5df0776cf913b63b10efb2c82da5b3bcb3dea31b 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyIndirect.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/TimeAtSampleStrategyIndirect.h
@@ -7,7 +7,6 @@
 #pragma once
 
 #include "MantidAlgorithms/TimeAtSampleStrategy.h"
-#include "MantidKernel/System.h"
 #include <boost/shared_ptr.hpp>
 
 namespace Mantid {
@@ -22,7 +21,8 @@ namespace Algorithms {
 /** TimeAtSampleStrategyIndirect : Determine Time At Sample for an indirect
   instrument setup.
 */
-class DLLExport TimeAtSampleStrategyIndirect : public TimeAtSampleStrategy {
+class MANTID_ALGORITHMS_DLL TimeAtSampleStrategyIndirect
+    : public TimeAtSampleStrategy {
 public:
   TimeAtSampleStrategyIndirect(
       boost::shared_ptr<const Mantid::API::MatrixWorkspace> ws);
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/Transpose.h b/Framework/Algorithms/inc/MantidAlgorithms/Transpose.h
index 942de3a7132be468ccc110ab3521fb11ff89aecf..546987ba3a3f7edbfcb91b8f7affb6ddd13bdf12 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/Transpose.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/Transpose.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 
@@ -29,7 +30,7 @@ N1 Bins. The output workspace is data points, not histograms.
 @author Michael Whitty, STFC ISIS
 @date 09/09/2010
  */
-class DLLExport Transpose : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL Transpose : public API::Algorithm {
 public:
   /// Algorithm's name
   const std::string name() const override { return "Transpose"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/UnGroupWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/UnGroupWorkspace.h
index 91a57a1ae5722da08558f97c47c5f7d1c7dcc95a..0cc1f94cc927805c454ee5b4217d620493a473a0 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/UnGroupWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/UnGroupWorkspace.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -23,7 +24,7 @@ namespace Algorithms {
     @author Sofia Antony
     @date 21/07/2009
  */
-class DLLExport UnGroupWorkspace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL UnGroupWorkspace : public API::Algorithm {
 public:
   /// Algorithm's name for identification overriding a virtual method
   const std::string name() const override { return "UnGroupWorkspace"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/UnaryOperation.h b/Framework/Algorithms/inc/MantidAlgorithms/UnaryOperation.h
index 74c2d394351b572cc29047bc9e948a267b32cf9b..c6bc0796366f123ed4b52aa89a895aa76155907f 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/UnaryOperation.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/UnaryOperation.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -29,7 +30,7 @@ Required Properties:
 @author Russell Taylor, Tessella plc
 @date 24/03/2009
 */
-class DLLExport UnaryOperation : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL UnaryOperation : public API::DistributedAlgorithm {
 public:
   /// Algorithm's category for identification
   const std::string category() const override { return "Arithmetic"; }
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h b/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h
index 2022e0537e2cceaa2ec7476fe555c522040bb405..495d15cb5960a81a30cddde48bf096f9d901c871 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/UnwrapMonitor.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidHistogramData/HistogramX.h"
 #include "MantidKernel/cow_ptr.h"
 
@@ -28,7 +29,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 25/07/2008
 */
-class DLLExport UnwrapMonitor : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL UnwrapMonitor : public API::Algorithm {
 public:
   UnwrapMonitor();
   ~UnwrapMonitor() override {}
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/UnwrapSNS.h b/Framework/Algorithms/inc/MantidAlgorithms/UnwrapSNS.h
index 303ee9606e0d76c0a1ba0ba553edb407c3f0c8ff..81daf2f6824db1c57f73106e28fccf7e43d9878e 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/UnwrapSNS.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/UnwrapSNS.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 
 namespace Mantid {
@@ -30,7 +31,7 @@ namespace Algorithms {
     @author Russell Taylor, Tessella Support Services plc
     @date 25/07/2008
 */
-class DLLExport UnwrapSNS : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL UnwrapSNS : public API::Algorithm {
 public:
   UnwrapSNS();
   ~UnwrapSNS() override {}
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/UpdateScriptRepository.h b/Framework/Algorithms/inc/MantidAlgorithms/UpdateScriptRepository.h
index 6d39eb8e7e885b8ebadeef41cd765fe77888c3e8..c5f6a37e3b9e6b7f4bdb166bbf81b1beb195b184 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/UpdateScriptRepository.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/UpdateScriptRepository.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -17,7 +17,7 @@ namespace Algorithms {
     Pratically, it will checkout the state of the Central Repository, and
     after, it will download all the scripts marked as AutoUpdate.
 */
-class DLLExport UpdateScriptRepository : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL UpdateScriptRepository : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/VesuvioL1ThetaResolution.h b/Framework/Algorithms/inc/MantidAlgorithms/VesuvioL1ThetaResolution.h
index 02ba802e10cb0a4e286208f393716418914393a7..b1e848048d21bcc375feb518231266da9cb9e5f5 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/VesuvioL1ThetaResolution.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/VesuvioL1ThetaResolution.h
@@ -7,9 +7,9 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidGeometry/IComponent.h"
 #include "MantidGeometry/IDetector.h"
-#include "MantidKernel/System.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -18,7 +18,7 @@ namespace Algorithms {
 
   Calculates the resolution function for L1 and Theta.
 */
-class DLLExport VesuvioL1ThetaResolution : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL VesuvioL1ThetaResolution : public API::Algorithm {
 public:
   const std::string name() const override;
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/WeightedMean.h b/Framework/Algorithms/inc/MantidAlgorithms/WeightedMean.h
index d8146eda25347905c051ed82ade487d6a36f1aa8..e78985f5e8106324fafb6ecaa7d906515824a752 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/WeightedMean.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/WeightedMean.h
@@ -24,7 +24,7 @@ namespace Algorithms {
     @author Robert Dalgliesh, ISIS, RAL
     @date 12/1/2010
  */
-class DLLExport WeightedMean : public CommutativeBinaryOperation {
+class MANTID_ALGORITHMS_DLL WeightedMean : public CommutativeBinaryOperation {
 public:
   const std::string name() const override { return "WeightedMean"; }
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/WeightedMeanOfWorkspace.h b/Framework/Algorithms/inc/MantidAlgorithms/WeightedMeanOfWorkspace.h
index 84960c743d65498139e942aa6e964dc7493ab768..c4776f18e3c92c7f20e529d8419ded085f2428f3 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/WeightedMeanOfWorkspace.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/WeightedMeanOfWorkspace.h
@@ -7,7 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 
 namespace Mantid {
 namespace Algorithms {
@@ -16,7 +16,7 @@ namespace Algorithms {
  * a single workspace from all the detector (non-monitor, not masked) spectra
  * in that workspace. The results is a single value for the entire workspace.
  */
-class DLLExport WeightedMeanOfWorkspace : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL WeightedMeanOfWorkspace : public API::Algorithm {
 public:
   const std::string name() const override;
   /// Summary of algorithms purpose
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/WeightingStrategy.h b/Framework/Algorithms/inc/MantidAlgorithms/WeightingStrategy.h
index 7181febe0f21d1782497b864a4a3849b0a190a80..854b78782b50e36e40bc9f36ddd95aa6a5c4b746 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/WeightingStrategy.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/WeightingStrategy.h
@@ -6,7 +6,7 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
-#include "MantidKernel/System.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/V3D.h"
 
 namespace Mantid {
@@ -20,7 +20,7 @@ namespace Algorithms {
 
   @date 2011-11-30
 */
-class DLLExport WeightingStrategy {
+class MANTID_ALGORITHMS_DLL WeightingStrategy {
 public:
   /// Constructor
   WeightingStrategy(const double cutOff);
@@ -54,7 +54,7 @@ protected:
 /*
 Flat (no weighting) strategy. Concrete WeightingStrategy
 */
-class DLLExport FlatWeighting : public WeightingStrategy {
+class MANTID_ALGORITHMS_DLL FlatWeighting : public WeightingStrategy {
 public:
   double weightAt(const double &, const double &, const double &,
                   const double &) override;
@@ -64,7 +64,7 @@ public:
 /*
 Linear weighting strategy.
 */
-class DLLExport LinearWeighting : public WeightingStrategy {
+class MANTID_ALGORITHMS_DLL LinearWeighting : public WeightingStrategy {
 public:
   LinearWeighting(const double cutOff);
   double weightAt(const Mantid::Kernel::V3D &) override;
@@ -75,7 +75,7 @@ public:
 /*
 Parabolic weighting strategy.
 */
-class DLLExport ParabolicWeighting : public WeightingStrategy {
+class MANTID_ALGORITHMS_DLL ParabolicWeighting : public WeightingStrategy {
 public:
   ParabolicWeighting(const double cutOff);
   double weightAt(const Mantid::Kernel::V3D &) override;
@@ -86,7 +86,7 @@ public:
 /*
 Null weighting strategy.
 */
-class DLLExport NullWeighting : public WeightingStrategy {
+class MANTID_ALGORITHMS_DLL NullWeighting : public WeightingStrategy {
 public:
   double weightAt(const Mantid::Kernel::V3D &) override;
   double weightAt(const double &, const double &, const double &,
@@ -98,7 +98,7 @@ Gaussian nD Strategy.
 
 y = exp(-0.5*((r./p(1)).^2) where p = sqtr(2)*sigma
 */
-class DLLExport GaussianWeightingnD : public WeightingStrategy {
+class MANTID_ALGORITHMS_DLL GaussianWeightingnD : public WeightingStrategy {
 public:
   GaussianWeightingnD(double cutOff, double sigma);
   double weightAt(const Mantid::Kernel::V3D &) override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/WienerSmooth.h b/Framework/Algorithms/inc/MantidAlgorithms/WienerSmooth.h
index b4ecd743797216bb62c409619d2bb4ed15020a17..dc9af01449cfbfd01631c9f8b7cbd67b2d936e7a 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/WienerSmooth.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/WienerSmooth.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidHistogramData/HistogramX.h"
 #include "MantidKernel/cow_ptr.h"
 
@@ -17,7 +18,7 @@ namespace Algorithms {
   workspace
   using the Wiener filter smoothing.
 */
-class DLLExport WienerSmooth : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL WienerSmooth : public API::Algorithm {
 public:
   const std::string name() const override { return "WienerSmooth"; }
   int version() const override;
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/WorkspaceJoiners.h b/Framework/Algorithms/inc/MantidAlgorithms/WorkspaceJoiners.h
index b36ff246d7ffd93c9a47497dfd5a723892cf98f0..eb84f751094be6e57fd0541b1632d5d59deb199a 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/WorkspaceJoiners.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/WorkspaceJoiners.h
@@ -10,6 +10,7 @@
 // Includes
 //----------------------------------------------------------------------
 #include "MantidAPI/Algorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidDataObjects/EventWorkspace.h"
 
 namespace Mantid {
@@ -21,7 +22,7 @@ namespace Algorithms {
     property into which the result is stored, whereas the former puts the result
     into a workspace with the same name as the first input workspace.
   */
-class DLLExport WorkspaceJoiners : public API::Algorithm {
+class MANTID_ALGORITHMS_DLL WorkspaceJoiners : public API::Algorithm {
 public:
   WorkspaceJoiners();
 
diff --git a/Framework/Algorithms/inc/MantidAlgorithms/XDataConverter.h b/Framework/Algorithms/inc/MantidAlgorithms/XDataConverter.h
index 80e9eacc45818a4e2fd1df12320897ae006fb031..5cf9376fc35152ecfab984008b4898188ca5eaa4 100644
--- a/Framework/Algorithms/inc/MantidAlgorithms/XDataConverter.h
+++ b/Framework/Algorithms/inc/MantidAlgorithms/XDataConverter.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "MantidAPI/DistributedAlgorithm.h"
+#include "MantidAlgorithms/DllConfig.h"
 #include "MantidKernel/cow_ptr.h"
 
 namespace Mantid {
@@ -25,7 +26,7 @@ namespace Algorithms {
   @author Martyn Gigg, Tessella plc
   @date 2010-12-14
 */
-class DLLExport XDataConverter : public API::DistributedAlgorithm {
+class MANTID_ALGORITHMS_DLL XDataConverter : public API::DistributedAlgorithm {
 public:
   /// Default constructor
   XDataConverter();
diff --git a/Framework/Algorithms/test/AddLogDerivativeTest.h b/Framework/Algorithms/test/AddLogDerivativeTest.h
index 89a7d8155ff7febfc2869ebadbb1574f68372ee1..5953bc3c7f0fc7c35207ff946ab188dd29f206c2 100644
--- a/Framework/Algorithms/test/AddLogDerivativeTest.h
+++ b/Framework/Algorithms/test/AddLogDerivativeTest.h
@@ -9,7 +9,6 @@
 #include "MantidAPI/Run.h"
 #include "MantidAlgorithms/AddLogDerivative.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/TimeSeriesProperty.h"
 #include "MantidKernel/Timer.h"
 #include "MantidTestHelpers/WorkspaceCreationHelper.h"
diff --git a/Framework/Algorithms/test/AddPeakTest.h b/Framework/Algorithms/test/AddPeakTest.h
index 9cf858acf3e4e7f85053eecd68879af2d9ba9493..cdd54abb699ed1e01035348f8f88f5c4d60329b3 100644
--- a/Framework/Algorithms/test/AddPeakTest.h
+++ b/Framework/Algorithms/test/AddPeakTest.h
@@ -10,7 +10,6 @@
 #include "MantidAlgorithms/CreatePeaksWorkspace.h"
 #include "MantidDataObjects/PeaksWorkspace.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include "MantidTestHelpers/WorkspaceCreationHelper.h"
 #include <cxxtest/TestSuite.h>
diff --git a/Framework/Algorithms/test/ApplyDetailedBalanceTest.h b/Framework/Algorithms/test/ApplyDetailedBalanceTest.h
index d438ff9fecb88039b6e88a6488354a00408d7de4..8a1414d79c0bdc309abb66ab6f3c50c1b6fcd719 100644
--- a/Framework/Algorithms/test/ApplyDetailedBalanceTest.h
+++ b/Framework/Algorithms/test/ApplyDetailedBalanceTest.h
@@ -10,7 +10,6 @@
 #include "MantidAPI/Axis.h"
 #include "MantidAlgorithms/ApplyDetailedBalance.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include "MantidKernel/Unit.h"
 #include "MantidKernel/UnitFactory.h"
diff --git a/Framework/Algorithms/test/BinaryOperateMasksTest.h b/Framework/Algorithms/test/BinaryOperateMasksTest.h
index 913440f8b402c834619f947f7f6e2fcb01155db4..ae8bcbd1efdb5b9dc4f62d70b3507190f9bdc39e 100644
--- a/Framework/Algorithms/test/BinaryOperateMasksTest.h
+++ b/Framework/Algorithms/test/BinaryOperateMasksTest.h
@@ -9,7 +9,6 @@
 #include "MantidAlgorithms/BinaryOperateMasks.h"
 #include "MantidDataObjects/MaskWorkspace.h"
 #include "MantidGeometry/Instrument.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include "MantidTestHelpers/ComponentCreationHelper.h"
 #include "MantidTestHelpers/WorkspaceCreationHelper.h"
diff --git a/Framework/Algorithms/test/ChangePulsetime2Test.h b/Framework/Algorithms/test/ChangePulsetime2Test.h
index ae69737de12f1ec09ef485a273b74cabebfe2302..322c5540ca51b23044daaed2df022176ed1ed4d8 100644
--- a/Framework/Algorithms/test/ChangePulsetime2Test.h
+++ b/Framework/Algorithms/test/ChangePulsetime2Test.h
@@ -6,7 +6,6 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include <cxxtest/TestSuite.h>
 
diff --git a/Framework/Algorithms/test/ChangePulsetimeTest.h b/Framework/Algorithms/test/ChangePulsetimeTest.h
index 4ffc59b440f27fe05df1dd8884ca47b1ab30e95f..df569708c193009598a049df0cb5a9722f938ad4 100644
--- a/Framework/Algorithms/test/ChangePulsetimeTest.h
+++ b/Framework/Algorithms/test/ChangePulsetimeTest.h
@@ -6,7 +6,6 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include <cxxtest/TestSuite.h>
 
diff --git a/Framework/Algorithms/test/ChangeTimeZeroTest.h b/Framework/Algorithms/test/ChangeTimeZeroTest.h
index 446652ee2138f8975a80089274dc204e9ff45092..f802bec29774d87978572131acbf661d4f912985 100644
--- a/Framework/Algorithms/test/ChangeTimeZeroTest.h
+++ b/Framework/Algorithms/test/ChangeTimeZeroTest.h
@@ -6,7 +6,6 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include <cxxtest/TestSuite.h>
 
diff --git a/Framework/Algorithms/test/CommutativeBinaryOperationTest.h b/Framework/Algorithms/test/CommutativeBinaryOperationTest.h
index 9da8b0f067cffae8671c7ae98cfc3aa8c2920199..144f812380ac4e7db0108612849a983987cf2b88 100644
--- a/Framework/Algorithms/test/CommutativeBinaryOperationTest.h
+++ b/Framework/Algorithms/test/CommutativeBinaryOperationTest.h
@@ -10,7 +10,6 @@
 #include <cxxtest/TestSuite.h>
 
 #include "MantidAlgorithms/CommutativeBinaryOperation.h"
-#include "MantidKernel/System.h"
 #include "MantidTestHelpers/WorkspaceCreationHelper.h"
 
 using namespace Mantid;
diff --git a/Framework/Algorithms/test/ConvertToEventWorkspaceTest.h b/Framework/Algorithms/test/ConvertToEventWorkspaceTest.h
index b7c609af13b1f6e87081701f64f6de6d27b5431e..fdf2f6e238f34737bbf9d1cec02676db9cdcad66 100644
--- a/Framework/Algorithms/test/ConvertToEventWorkspaceTest.h
+++ b/Framework/Algorithms/test/ConvertToEventWorkspaceTest.h
@@ -6,7 +6,6 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include <cxxtest/TestSuite.h>
 
diff --git a/Framework/Algorithms/test/CreateGroupingWorkspaceTest.h b/Framework/Algorithms/test/CreateGroupingWorkspaceTest.h
index f433834889818ea47958a61f1bc05e86a12461d9..6b17738320105948e8e78b9bdd7079c12615efc5 100644
--- a/Framework/Algorithms/test/CreateGroupingWorkspaceTest.h
+++ b/Framework/Algorithms/test/CreateGroupingWorkspaceTest.h
@@ -10,7 +10,6 @@
 #include "MantidAPI/FrameworkManager.h"
 #include "MantidAlgorithms/CreateGroupingWorkspace.h"
 #include "MantidDataObjects/GroupingWorkspace.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include <cxxtest/TestSuite.h>
 
diff --git a/Framework/Algorithms/test/CreatePeaksWorkspaceTest.h b/Framework/Algorithms/test/CreatePeaksWorkspaceTest.h
index f058e8a731ba8fa8bf071c36fa04af0621396f57..3af4f01d34953b71fe84565588b6dad2346c886c 100644
--- a/Framework/Algorithms/test/CreatePeaksWorkspaceTest.h
+++ b/Framework/Algorithms/test/CreatePeaksWorkspaceTest.h
@@ -10,7 +10,6 @@
 #include "MantidAlgorithms/CreatePeaksWorkspace.h"
 #include "MantidDataObjects/PeaksWorkspace.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include "MantidTestHelpers/WorkspaceCreationHelper.h"
 #include <cxxtest/TestSuite.h>
diff --git a/Framework/Algorithms/test/DiffractionEventCalibrateDetectorsTest.h b/Framework/Algorithms/test/DiffractionEventCalibrateDetectorsTest.h
index 02609c031d0d2c32af4cd0f962cd9f6b1ae1631b..a0f88100cdb37695f4c160d5c8a3902174b898df 100644
--- a/Framework/Algorithms/test/DiffractionEventCalibrateDetectorsTest.h
+++ b/Framework/Algorithms/test/DiffractionEventCalibrateDetectorsTest.h
@@ -7,7 +7,6 @@
 #pragma once
 
 #include "MantidAlgorithms/DiffractionEventCalibrateDetectors.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include "MantidTestHelpers/WorkspaceCreationHelper.h"
 #include <Poco/File.h>
diff --git a/Framework/Algorithms/test/ElasticWindowTest.h b/Framework/Algorithms/test/ElasticWindowTest.h
index 6d9a7b2cb47b95ba2a149efa9ae711f9762d3363..cee4abfa1325adbc623e7e83f383073b64c334ed 100644
--- a/Framework/Algorithms/test/ElasticWindowTest.h
+++ b/Framework/Algorithms/test/ElasticWindowTest.h
@@ -17,7 +17,6 @@
 #include "MantidAlgorithms/ElasticWindow.h"
 #include "MantidAlgorithms/Rebin.h"
 #include "MantidAlgorithms/SetInstrumentParameter.h"
-#include "MantidKernel/System.h"
 
 using namespace Mantid;
 using namespace Mantid::Algorithms;
diff --git a/Framework/Algorithms/test/ExportTimeSeriesLogTest.h b/Framework/Algorithms/test/ExportTimeSeriesLogTest.h
index 21884138822bf98cd7f04beea98675b3fb85e5a0..b3b30a70d7ed5725fc0f174801aab6941bd73113 100644
--- a/Framework/Algorithms/test/ExportTimeSeriesLogTest.h
+++ b/Framework/Algorithms/test/ExportTimeSeriesLogTest.h
@@ -6,7 +6,6 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include <Poco/File.h>
 #include <cmath>
diff --git a/Framework/Algorithms/test/GenerateIPythonNotebookTest.h b/Framework/Algorithms/test/GenerateIPythonNotebookTest.h
index 2522fdb88fcaa698aad5f17872707ab469718036..d8c7a656e87e1d27aab4c492118d3eca49ba85ef 100644
--- a/Framework/Algorithms/test/GenerateIPythonNotebookTest.h
+++ b/Framework/Algorithms/test/GenerateIPythonNotebookTest.h
@@ -6,7 +6,6 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include <cxxtest/TestSuite.h>
 #include <fstream>
diff --git a/Framework/Algorithms/test/GeneratePeaksTest.h b/Framework/Algorithms/test/GeneratePeaksTest.h
index 5557c16cd2ccf6a48964357975a91007d1e13526..90638ed6dc00677b174a645b5b8a0d88db4e4a33 100644
--- a/Framework/Algorithms/test/GeneratePeaksTest.h
+++ b/Framework/Algorithms/test/GeneratePeaksTest.h
@@ -6,7 +6,6 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include <cxxtest/TestSuite.h>
 
diff --git a/Framework/Algorithms/test/GeneratePythonScriptTest.h b/Framework/Algorithms/test/GeneratePythonScriptTest.h
index bdd133f77df0e0eef6d91d243bfadb6154a9b152..7ce29dc2ebf1ddec60647c2335e866062d81bb2b 100644
--- a/Framework/Algorithms/test/GeneratePythonScriptTest.h
+++ b/Framework/Algorithms/test/GeneratePythonScriptTest.h
@@ -21,9 +21,7 @@
 #include "MantidDataObjects/Workspace2D.h"
 #include "MantidDataObjects/WorkspaceCreation.h"
 #include "MantidHistogramData/Histogram.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
-
 #include <Poco/File.h>
 
 #include <fstream>
diff --git a/Framework/Algorithms/test/MaskBinsFromTableTest.h b/Framework/Algorithms/test/MaskBinsFromTableTest.h
index 06b395a3b45a94652c03786dbcb5410c80e27252..886c89283b231e462e43ceb3585162207fed2143 100644
--- a/Framework/Algorithms/test/MaskBinsFromTableTest.h
+++ b/Framework/Algorithms/test/MaskBinsFromTableTest.h
@@ -6,7 +6,6 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include <cxxtest/TestSuite.h>
 
diff --git a/Framework/Algorithms/test/PDFFourierTransformTest.h b/Framework/Algorithms/test/PDFFourierTransformTest.h
index 7e07c960beaffeccc95f931ff33b3d4c66f57dca..24d0d6d675ffbea8050558f69b1876b3c663c08b 100644
--- a/Framework/Algorithms/test/PDFFourierTransformTest.h
+++ b/Framework/Algorithms/test/PDFFourierTransformTest.h
@@ -13,7 +13,6 @@
 #include "MantidAPI/MatrixWorkspace.h"
 #include "MantidAPI/WorkspaceFactory.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include "MantidKernel/UnitFactory.h"
 #include <cxxtest/TestSuite.h>
diff --git a/Framework/Algorithms/test/PauseTest.h b/Framework/Algorithms/test/PauseTest.h
index a61b5615ee6d7eaf30268d3f083b9cb4ac54cd0f..839de58c39a09aa3903dd5d84b57770b944dc2fd 100644
--- a/Framework/Algorithms/test/PauseTest.h
+++ b/Framework/Algorithms/test/PauseTest.h
@@ -6,7 +6,6 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include <cxxtest/TestSuite.h>
 
diff --git a/Framework/Algorithms/test/PrecompiledHeader.h b/Framework/Algorithms/test/PrecompiledHeader.h
index c4ac132c1f3499d08310c1f26d09ede869d913df..01b5355190b97c2069344b3e7617d0d0e6693d5a 100644
--- a/Framework/Algorithms/test/PrecompiledHeader.h
+++ b/Framework/Algorithms/test/PrecompiledHeader.h
@@ -11,7 +11,6 @@
 
 // Mantid
 #include "MantidAPI/Algorithm.h"
-#include "MantidKernel/System.h"
 
 // STL
 #include <set>
diff --git a/Framework/Algorithms/test/RayTracerTesterTest.h b/Framework/Algorithms/test/RayTracerTesterTest.h
index 304df0deeb137814ac4769bd3fbb72a5a586a9a6..89031a644f0e1a53ecc313cf59eb309c345d5bcd 100644
--- a/Framework/Algorithms/test/RayTracerTesterTest.h
+++ b/Framework/Algorithms/test/RayTracerTesterTest.h
@@ -7,7 +7,6 @@
 #pragma once
 
 #include "MantidAlgorithms/RayTracerTester.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include <cxxtest/TestSuite.h>
 
diff --git a/Framework/Algorithms/test/RealFFTTest.h b/Framework/Algorithms/test/RealFFTTest.h
index b5c342e4bd22f0f4e5c5a77b4468349f76db1fc0..290e4ff7976cd05a12aa09eb6eced4620530cc24 100644
--- a/Framework/Algorithms/test/RealFFTTest.h
+++ b/Framework/Algorithms/test/RealFFTTest.h
@@ -15,7 +15,6 @@
 #include "MantidAPI/WorkspaceFactory.h"
 #include "MantidAlgorithms/FFT.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 
 using namespace Mantid;
 using namespace Mantid::API;
diff --git a/Framework/Algorithms/test/RemoveLowResTOFTest.h b/Framework/Algorithms/test/RemoveLowResTOFTest.h
index 503051e4e287a33f9b6f16b1a0a246035a92ca3e..dc06d4bee6d504d12141885f82874bd33536b33a 100644
--- a/Framework/Algorithms/test/RemoveLowResTOFTest.h
+++ b/Framework/Algorithms/test/RemoveLowResTOFTest.h
@@ -9,7 +9,6 @@
 #include "MantidAPI/AnalysisDataService.h"
 #include "MantidAPI/Axis.h"
 #include "MantidDataObjects/EventWorkspace.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include "MantidKernel/UnitFactory.h"
 #include "MantidTestHelpers/ComponentCreationHelper.h"
diff --git a/Framework/Algorithms/test/RemovePromptPulseTest.h b/Framework/Algorithms/test/RemovePromptPulseTest.h
index 10cbd2bb645b221ef31f573709a2ba5489f0791d..99330cdce0978ff6519aa8d15341b7309b9915bc 100644
--- a/Framework/Algorithms/test/RemovePromptPulseTest.h
+++ b/Framework/Algorithms/test/RemovePromptPulseTest.h
@@ -9,7 +9,6 @@
 #include "MantidAPI/AnalysisDataService.h"
 #include "MantidAPI/Axis.h"
 #include "MantidDataObjects/EventWorkspace.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include "MantidKernel/UnitFactory.h"
 #include "MantidTestHelpers/ComponentCreationHelper.h"
diff --git a/Framework/Algorithms/test/ResetNegativesTest.h b/Framework/Algorithms/test/ResetNegativesTest.h
index edcf0f2dd816cf5867b7c7e0272e313d45383cd5..b88eb49ae27821d5d189188b22fe3acb53cb7a86 100644
--- a/Framework/Algorithms/test/ResetNegativesTest.h
+++ b/Framework/Algorithms/test/ResetNegativesTest.h
@@ -8,7 +8,6 @@
 
 #include "MantidAPI/WorkspaceProperty.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include "MantidTestHelpers/WorkspaceCreationHelper.h"
 #include <cxxtest/TestSuite.h>
diff --git a/Framework/Algorithms/test/ResizeRectangularDetectorTest.h b/Framework/Algorithms/test/ResizeRectangularDetectorTest.h
index 58fb7ef604018fde8a3084c8f765d095bb811075..eb7d9ea9e07ae35be21b53ae65b552eed80d6fb2 100644
--- a/Framework/Algorithms/test/ResizeRectangularDetectorTest.h
+++ b/Framework/Algorithms/test/ResizeRectangularDetectorTest.h
@@ -13,7 +13,6 @@
 #include "MantidGeometry/Instrument.h"
 #include "MantidGeometry/Instrument/GridDetectorPixel.h"
 #include "MantidGeometry/Instrument/RectangularDetector.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include "MantidKernel/V3D.h"
 #include "MantidTestHelpers/WorkspaceCreationHelper.h"
diff --git a/Framework/Algorithms/test/ShiftLogTimeTest.h b/Framework/Algorithms/test/ShiftLogTimeTest.h
index 80fcd10ecf9691ca6232e22b194944a874cfbb0c..fd6dfdc2c92fc1756aab38587dfd87f309fa5e5e 100644
--- a/Framework/Algorithms/test/ShiftLogTimeTest.h
+++ b/Framework/Algorithms/test/ShiftLogTimeTest.h
@@ -10,7 +10,6 @@
 #include "MantidAPI/Run.h"
 #include "MantidAlgorithms/ShiftLogTime.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/TimeSeriesProperty.h"
 #include "MantidKernel/Timer.h"
 #include <cxxtest/TestSuite.h>
diff --git a/Framework/Algorithms/test/SignalOverErrorTest.h b/Framework/Algorithms/test/SignalOverErrorTest.h
index 2ba74db5865294a9af5434423cf615807e9e3ae4..43050829f4ad29912ab8a3cf3b0f6b9e6dab3642 100644
--- a/Framework/Algorithms/test/SignalOverErrorTest.h
+++ b/Framework/Algorithms/test/SignalOverErrorTest.h
@@ -8,7 +8,6 @@
 
 #include "MantidAlgorithms/SignalOverError.h"
 #include "MantidDataObjects/Workspace2D.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include "MantidTestHelpers/WorkspaceCreationHelper.h"
 #include <cxxtest/TestSuite.h>
diff --git a/Framework/Algorithms/test/UnwrapSNSTest.h b/Framework/Algorithms/test/UnwrapSNSTest.h
index 9b53f1d413f95a205e845909b35e92b35c984b02..93146a70533468aa72e3c556dd230b19a9b9204d 100644
--- a/Framework/Algorithms/test/UnwrapSNSTest.h
+++ b/Framework/Algorithms/test/UnwrapSNSTest.h
@@ -9,7 +9,6 @@
 #include "MantidAPI/AnalysisDataService.h"
 #include "MantidAPI/Axis.h"
 #include "MantidDataObjects/EventWorkspace.h"
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include "MantidKernel/UnitFactory.h"
 #include "MantidTestHelpers/ComponentCreationHelper.h"
diff --git a/Framework/Algorithms/test/WeightingStrategyTest.h b/Framework/Algorithms/test/WeightingStrategyTest.h
index a29a125e9bb5c5c7915a0e63a13bb165fc73f496..1ff2ac6138e89cf624cffd929b510b1048d8632e 100644
--- a/Framework/Algorithms/test/WeightingStrategyTest.h
+++ b/Framework/Algorithms/test/WeightingStrategyTest.h
@@ -6,7 +6,6 @@
 // SPDX - License - Identifier: GPL - 3.0 +
 #pragma once
 
-#include "MantidKernel/System.h"
 #include "MantidKernel/Timer.h"
 #include <cxxtest/TestSuite.h>