Click or drag to resize
StaMaCompiling the StaMa Assembly For a Specific Target Framework Version

Describes how to adapt the StaMa Microsoft Visual Studio project for a different target framework.

StaMa is prepared for the following target .NET frameworks:

Target Framework

Microsoft Visual Studio Solution

Microsoft Visual Studio Project

Output Path

.NET Micro Framework

StaMa_State_Machine_Controller_Library\StaMaNETMF.sln

StaMa_State_Machine_Controller_Library\StaMa\StaMaNETMF.csproj

StaMa_State_Machine_Controller_Library\bin\netmf\AnyCPU\Debug\StaMa.dll

.NET Windows Desktop Framework

StaMa_State_Machine_Controller_Library\StaMa.sln

StaMa_State_Machine_Controller_Library\StaMa\StaMa.csproj

StaMa_State_Machine_Controller_Library\bin\net-2.0\AnyCPU\Debug\StaMa.dll

The release package StaMa_State_Machine_Contoller_Library_Vx.y.zip contains pre-built assemblies for the above frameworks. The actual target framework version will vary from release to release.

In order to adapt the above Microsoft Visual Studio projects to a different target framework version (e.g. .NET Framework 4.5.1 or .NET Micro Framework 4.2) it should usually be sufficient to change the Target Framework property in the project properties configuration panel. See below procedure "How to adapt to a different .NET framework version".

Specific functionality for the .NET Micro Framework is marked in the code with conditional compile directives using the symbol MF_FRAMEWORK. If MF_FRAMEWORK is not set, the compilation defaults to .NET Windows Desktop Framework.

How to adapt to a different .NET framework version

  1. Open the solution file according to the above table in Microsoft Visual Studio.

  2. Select the project according to the above table and open its Properties configuration panel. In the Application group of the panel select the desired version in the Target Framework combo box.

    Select the same target framework in all other projects of the solution or remove the other projects from the solution.

  3. Consider to change the Output path property in the Build group of the configuration panel if it doesn't match the changed target framework. Don't forget to adapt the other projects in the solution.

  4. From the Build menu select Clean Solution, then Build Solution.

    Note Note

    With .NET Micro Framework V4.3 the Rebuild Solution menu item frequently causes the following error:

    C:\Program Files (x86)\MSBuild\Microsoft\.NET Micro Framework\v4.3\Device.targets(403,5): error MSB3030: Could not copy the file "...\StaMa_State_Machine_Controller_Library\bin\netmf\AnyCPU\Debug\LE\StaMa.pe" because it was not found.

    This error doesn't appear with the above sequence of clean and build.

Find the StaMa.dll assembly according to the above table.