Skip to content

Commit 828d097

Browse files
author
ray
committed
Stateless is now using the Portable Class Library: http://msdn.microsoft.com/en-us/library/gg597391.aspx
Can now target .NET, Silverlight, Windows Phone 7 and Xbox 360. Upgraded client and tests to .NET 4.0
1 parent f58b466 commit 828d097

File tree

9 files changed

+105
-63
lines changed

9 files changed

+105
-63
lines changed

BugTrackerExample/BugTrackerExample.csproj

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>BugTrackerExample</RootNamespace>
1212
<AssemblyName>BugTrackerExample</AssemblyName>
13-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<FileUpgradeFlags>
1616
</FileUpgradeFlags>
@@ -31,6 +31,7 @@
3131
<IsWebBootstrapper>false</IsWebBootstrapper>
3232
<UseApplicationTrust>false</UseApplicationTrust>
3333
<BootstrapperEnabled>true</BootstrapperEnabled>
34+
<TargetFrameworkProfile />
3435
</PropertyGroup>
3536
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3637
<DebugSymbols>true</DebugSymbols>
@@ -93,6 +94,9 @@
9394
<Install>true</Install>
9495
</BootstrapperPackage>
9596
</ItemGroup>
97+
<ItemGroup>
98+
<None Include="app.config" />
99+
</ItemGroup>
96100
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
97101
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
98102
Other similar extension points exist, see Microsoft.Common.targets.

BugTrackerExample/app.config

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
5+
</startup>
6+
</configuration>

OnOffExample/OnOffExample.csproj

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>OnOffExample</RootNamespace>
1212
<AssemblyName>OnOffExample</AssemblyName>
13-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<FileUpgradeFlags>
1616
</FileUpgradeFlags>
@@ -31,6 +31,7 @@
3131
<IsWebBootstrapper>false</IsWebBootstrapper>
3232
<UseApplicationTrust>false</UseApplicationTrust>
3333
<BootstrapperEnabled>true</BootstrapperEnabled>
34+
<TargetFrameworkProfile />
3435
</PropertyGroup>
3536
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3637
<DebugSymbols>true</DebugSymbols>
@@ -92,6 +93,9 @@
9293
<Install>true</Install>
9394
</BootstrapperPackage>
9495
</ItemGroup>
96+
<ItemGroup>
97+
<None Include="app.config" />
98+
</ItemGroup>
9599
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
96100
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
97101
Other similar extension points exist, see Microsoft.Common.targets.

OnOffExample/app.config

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
5+
</startup>
6+
</configuration>

Stateless.Tests/Stateless.Tests.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>Stateless.Tests</RootNamespace>
1212
<AssemblyName>Stateless.Tests</AssemblyName>
13-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<SignAssembly>true</SignAssembly>
1616
<AssemblyOriginatorKeyFile>Stateless.Tests.snk</AssemblyOriginatorKeyFile>
@@ -33,6 +33,7 @@
3333
<IsWebBootstrapper>false</IsWebBootstrapper>
3434
<UseApplicationTrust>false</UseApplicationTrust>
3535
<BootstrapperEnabled>true</BootstrapperEnabled>
36+
<TargetFrameworkProfile />
3637
</PropertyGroup>
3738
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3839
<DebugSymbols>true</DebugSymbols>

Stateless/Properties/AssemblyInfo.cs

-8
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

17-
// Setting ComVisible to false makes the types in this assembly not visible
18-
// to COM components. If you need to access a type in this assembly from
19-
// COM, set the ComVisible attribute to true on that type.
20-
[assembly: ComVisible(false)]
21-
22-
// The following GUID is for the ID of the typelib if this project is exposed to COM
23-
[assembly: Guid("9dc58fba-dbaa-42d8-b07a-ea23d121a1e9")]
24-
2517
// Version information for an assembly consists of the following four values:
2618
//
2719
// Major Version

Stateless/Stateless.csproj

+70-51
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
66
<ProductVersion>9.0.30729</ProductVersion>
77
<SchemaVersion>2.0</SchemaVersion>
8+
<TargetFrameworkProfile>Profile2</TargetFrameworkProfile>
89
<ProjectGuid>{A15EEC02-60EC-4705-A58B-A6ECD55A9628}</ProjectGuid>
910
<OutputType>Library</OutputType>
1011
<AppDesignerFolder>Properties</AppDesignerFolder>
1112
<RootNamespace>Stateless</RootNamespace>
1213
<AssemblyName>Stateless</AssemblyName>
13-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1415
<FileAlignment>512</FileAlignment>
1516
<SignAssembly>true</SignAssembly>
1617
<AssemblyOriginatorKeyFile>Stateless.snk</AssemblyOriginatorKeyFile>
17-
<FileUpgradeFlags>
18-
</FileUpgradeFlags>
1918
<OldToolsVersion>3.5</OldToolsVersion>
2019
<UpgradeBackupLocation />
2120
<PublishUrl>publish\</PublishUrl>
@@ -33,6 +32,7 @@
3332
<IsWebBootstrapper>false</IsWebBootstrapper>
3433
<UseApplicationTrust>false</UseApplicationTrust>
3534
<BootstrapperEnabled>true</BootstrapperEnabled>
35+
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
3636
</PropertyGroup>
3737
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3838
<DebugSymbols>true</DebugSymbols>
@@ -59,55 +59,88 @@
5959
</PropertyGroup>
6060
<ItemGroup>
6161
<Reference Include="System" />
62-
<Reference Include="System.Core">
63-
<RequiredTargetFramework>3.5</RequiredTargetFramework>
64-
</Reference>
65-
<Reference Include="System.Xml.Linq">
66-
<RequiredTargetFramework>3.5</RequiredTargetFramework>
67-
</Reference>
68-
<Reference Include="System.Data.DataSetExtensions">
69-
<RequiredTargetFramework>3.5</RequiredTargetFramework>
70-
</Reference>
71-
<Reference Include="System.Data" />
62+
<Reference Include="System.Core" />
63+
<Reference Include="System.Net" />
64+
<Reference Include="System.Runtime.Serialization" />
65+
<Reference Include="System.ServiceModel" />
7266
<Reference Include="System.Xml" />
67+
<Reference Include="System.Xml.Serialization" />
7368
</ItemGroup>
7469
<ItemGroup>
75-
<Compile Include="DynamicTriggerBehaviour.cs" />
70+
<Compile Include="DynamicTriggerBehaviour.cs">
71+
<SubType>Code</SubType>
72+
</Compile>
73+
<Compile Include="Enforce.cs">
74+
<SubType>Code</SubType>
75+
</Compile>
76+
<Compile Include="IgnoredTriggerBehaviour.cs">
77+
<SubType>Code</SubType>
78+
</Compile>
79+
<Compile Include="ParameterConversion.cs">
80+
<SubType>Code</SubType>
81+
</Compile>
7682
<Compile Include="ParameterConversionResources.Designer.cs">
77-
<AutoGen>True</AutoGen>
78-
<DesignTime>True</DesignTime>
7983
<DependentUpon>ParameterConversionResources.resx</DependentUpon>
84+
<DesignTime>True</DesignTime>
85+
<AutoGen>True</AutoGen>
86+
</Compile>
87+
<Compile Include="Properties\AssemblyInfo.cs" />
88+
<Compile Include="StateConfiguration.cs">
89+
<SubType>Code</SubType>
8090
</Compile>
8191
<Compile Include="StateConfigurationResources.Designer.cs">
82-
<AutoGen>True</AutoGen>
83-
<DesignTime>True</DesignTime>
8492
<DependentUpon>StateConfigurationResources.resx</DependentUpon>
93+
<DesignTime>True</DesignTime>
94+
<AutoGen>True</AutoGen>
95+
</Compile>
96+
<Compile Include="StateMachine.cs">
97+
<SubType>Code</SubType>
8598
</Compile>
8699
<Compile Include="StateMachineResources.Designer.cs">
87-
<AutoGen>True</AutoGen>
88-
<DesignTime>True</DesignTime>
89100
<DependentUpon>StateMachineResources.resx</DependentUpon>
101+
<DesignTime>True</DesignTime>
102+
<AutoGen>True</AutoGen>
103+
</Compile>
104+
<Compile Include="StateReference.cs">
105+
<SubType>Code</SubType>
106+
</Compile>
107+
<Compile Include="StateRepresentation.cs">
108+
<SubType>Code</SubType>
90109
</Compile>
91110
<Compile Include="StateRepresentationResources.Designer.cs">
92-
<AutoGen>True</AutoGen>
93-
<DesignTime>True</DesignTime>
94111
<DependentUpon>StateRepresentationResources.resx</DependentUpon>
112+
<DesignTime>True</DesignTime>
113+
<AutoGen>True</AutoGen>
114+
</Compile>
115+
<Compile Include="Transition.cs">
116+
<SubType>Code</SubType>
117+
</Compile>
118+
<Compile Include="TransitioningTriggerBehaviour.cs">
119+
<SubType>Code</SubType>
120+
</Compile>
121+
<Compile Include="TriggerBehaviour.cs">
122+
<SubType>Code</SubType>
123+
</Compile>
124+
<Compile Include="TriggerWithParameters.cs">
125+
<SubType>Code</SubType>
95126
</Compile>
96-
<Compile Include="TriggerBehaviour.cs" />
97-
<Compile Include="ParameterConversion.cs" />
98-
<Compile Include="Enforce.cs" />
99-
<Compile Include="IgnoredTriggerBehaviour.cs" />
100-
<Compile Include="StateReference.cs" />
101-
<Compile Include="StateConfiguration.cs" />
102-
<Compile Include="StateMachine.cs" />
103-
<Compile Include="Properties\AssemblyInfo.cs" />
104-
<Compile Include="StateRepresentation.cs" />
105-
<Compile Include="Transition.cs" />
106-
<Compile Include="TransitioningTriggerBehaviour.cs" />
107-
<Compile Include="TriggerWithParameters.cs" />
108127
</ItemGroup>
109128
<ItemGroup>
110-
<None Include="Stateless.snk" />
129+
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
130+
<Visible>False</Visible>
131+
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
132+
<Install>false</Install>
133+
</BootstrapperPackage>
134+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
135+
<Visible>False</Visible>
136+
<ProductName>.NET Framework 3.5 SP1</ProductName>
137+
<Install>true</Install>
138+
</BootstrapperPackage>
139+
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
140+
<Visible>False</Visible>
141+
<ProductName>Windows Installer 3.1</ProductName>
142+
<Install>true</Install>
143+
</BootstrapperPackage>
111144
</ItemGroup>
112145
<ItemGroup>
113146
<EmbeddedResource Include="ParameterConversionResources.resx">
@@ -128,23 +161,9 @@
128161
</EmbeddedResource>
129162
</ItemGroup>
130163
<ItemGroup>
131-
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
132-
<Visible>False</Visible>
133-
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
134-
<Install>false</Install>
135-
</BootstrapperPackage>
136-
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
137-
<Visible>False</Visible>
138-
<ProductName>.NET Framework 3.5 SP1</ProductName>
139-
<Install>true</Install>
140-
</BootstrapperPackage>
141-
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
142-
<Visible>False</Visible>
143-
<ProductName>Windows Installer 3.1</ProductName>
144-
<Install>true</Install>
145-
</BootstrapperPackage>
164+
<None Include="Stateless.snk" />
146165
</ItemGroup>
147-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
166+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
148167
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
149168
Other similar extension points exist, see Microsoft.Common.targets.
150169
<Target Name="BeforeBuild">

TelephoneCallExample/TelephoneCallExample.csproj

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<AppDesignerFolder>Properties</AppDesignerFolder>
1111
<RootNamespace>TelephoneCallExample</RootNamespace>
1212
<AssemblyName>TelephoneCallExample</AssemblyName>
13-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<FileUpgradeFlags>
1616
</FileUpgradeFlags>
@@ -31,6 +31,7 @@
3131
<IsWebBootstrapper>false</IsWebBootstrapper>
3232
<UseApplicationTrust>false</UseApplicationTrust>
3333
<BootstrapperEnabled>true</BootstrapperEnabled>
34+
<TargetFrameworkProfile />
3435
</PropertyGroup>
3536
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3637
<DebugSymbols>true</DebugSymbols>
@@ -92,6 +93,9 @@
9293
<Install>true</Install>
9394
</BootstrapperPackage>
9495
</ItemGroup>
96+
<ItemGroup>
97+
<None Include="app.config" />
98+
</ItemGroup>
9599
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
96100
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
97101
Other similar extension points exist, see Microsoft.Common.targets.

TelephoneCallExample/app.config

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
5+
</startup>
6+
</configuration>

0 commit comments

Comments
 (0)