aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2012-10-16 13:39:17 -0500
committerrogerk <devnull@localhost>2012-10-16 13:39:17 -0500
commit40f65d4c9e6711706366daab7fb2fcfc1309f910 (patch)
treef9c72001384759908fa72302075051b2dbeae958
parent3c491937d30cf250e0324038065802889740bc36 (diff)
downloadprotobuf-40f65d4c9e6711706366daab7fb2fcfc1309f910.tar.gz
protobuf-40f65d4c9e6711706366daab7fb2fcfc1309f910.tar.bz2
protobuf-40f65d4c9e6711706366daab7fb2fcfc1309f910.zip
Working project templates for Silverlight testing of SL2..4 and PL4
-rw-r--r--build/target.csproj6
-rw-r--r--csproj_templates/CF35.csproj3
-rw-r--r--csproj_templates/NET35.csproj3
-rw-r--r--csproj_templates/NET40.csproj3
-rw-r--r--csproj_templates/PL40.csproj27
-rw-r--r--csproj_templates/SL20.csproj6
-rw-r--r--csproj_templates/SL30.csproj9
-rw-r--r--csproj_templates/SL40.csproj9
-rw-r--r--csproj_templates/SLTest.targets31
-rw-r--r--src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj3
-rw-r--r--src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj3
-rw-r--r--src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj3
12 files changed, 95 insertions, 11 deletions
diff --git a/build/target.csproj b/build/target.csproj
index 0436b83d..5babb6ff 100644
--- a/build/target.csproj
+++ b/build/target.csproj
@@ -82,7 +82,7 @@ Target Versions
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetVersion)' == 'PL40' ">
<BuildTools>4.0</BuildTools>
- <TestFramework>NONE</TestFramework>
+ <TestFramework>SILVERLIGHT</TestFramework>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<BuildOutputDirectory>$(ProjectDirectory)\build_output\$(Configuration)\portable-net40+sl4+sl5+wp7+wp8+win8</BuildOutputDirectory>
</PropertyGroup>
@@ -101,7 +101,7 @@ File Groups
<StatLightTestContainer Include="$(SourceDirectory)\ProtocolBuffers.Test\bin\$(TargetVersion)\$(Configuration)\Google.ProtocolBuffers.Test.xap" />
<StatLightTestContainer Include="$(SourceDirectory)\ProtocolBuffersLite.Test\bin\$(TargetVersion)\$(Configuration)\Google.ProtocolBuffersLite.Test.xap" />
- <StatLightTestContainer Include="$(SourceDirectory)\ProtocolBuffersLite.Test\bin\$(TargetVersion)\$(Configuration)\Google.ProtocolBuffersLiteMixed.Test.xap" />
+ <StatLightTestContainer Include="$(SourceDirectory)\ProtocolBuffersLite.Test\bin\$(TargetVersion)\$(Configuration)\Google.ProtocolBuffersMixedLite.Test.xap" />
<PublishItem Include="$(SourceDirectory)\ProtocolBuffers\bin\$(TargetVersion)\$(Configuration)\Google.ProtocolBuffers.dll" />
<PublishItem Include="$(SourceDirectory)\ProtocolBuffers\bin\$(TargetVersion)\$(Configuration)\Google.ProtocolBuffers.pdb" />
@@ -160,7 +160,7 @@ Targets For Test
</Target>
<Target Name="_RunStatLight">
- <Exec Condition=" 'a' == 'b' "
+ <Exec
Command="&quot;$(StatLightExePath)&quot; -x %(StatLightTestContainer.Identity) --ReportOutputFileType=NUnit --ReportOutputFile=$(BuildTempDirectory)\%(StatLightTestContainer.Filename).xml" />
</Target>
diff --git a/csproj_templates/CF35.csproj b/csproj_templates/CF35.csproj
index fb42a1a7..eae866f0 100644
--- a/csproj_templates/CF35.csproj
+++ b/csproj_templates/CF35.csproj
@@ -23,6 +23,9 @@
<DefineConstants>$(DefineConstants);NOSERIALIZABLE;NOFILEVERSION</DefineConstants>
<NoConfig>true</NoConfig>
</PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System.Core" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
diff --git a/csproj_templates/NET35.csproj b/csproj_templates/NET35.csproj
index b69f7a59..80ef69aa 100644
--- a/csproj_templates/NET35.csproj
+++ b/csproj_templates/NET35.csproj
@@ -14,4 +14,7 @@
<IntermediateOutputPath>obj\NET35\Release\</IntermediateOutputPath>
<DefineConstants>$(DefineConstants)</DefineConstants>
</PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System.Core" />
+ </ItemGroup>
</Project> \ No newline at end of file
diff --git a/csproj_templates/NET40.csproj b/csproj_templates/NET40.csproj
index 0783be2d..691845a6 100644
--- a/csproj_templates/NET40.csproj
+++ b/csproj_templates/NET40.csproj
@@ -14,4 +14,7 @@
<IntermediateOutputPath>obj\NET40\Release\</IntermediateOutputPath>
<DefineConstants>$(DefineConstants)</DefineConstants>
</PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System.Core" />
+ </ItemGroup>
</Project> \ No newline at end of file
diff --git a/csproj_templates/PL40.csproj b/csproj_templates/PL40.csproj
index ad969bdc..fa3b098e 100644
--- a/csproj_templates/PL40.csproj
+++ b/csproj_templates/PL40.csproj
@@ -1,4 +1,6 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build"
+ xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
+ xmlns:cs="urn:schemas-csharp-project:template">
<PropertyGroup>
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
<EnvironmentFlavor>PORTABLE_LIBRARY</EnvironmentFlavor>
@@ -17,7 +19,21 @@
<IntermediateOutputPath>obj\PL40\Release\</IntermediateOutputPath>
<DefineConstants>$(DefineConstants);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
</PropertyGroup>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+ <ItemGroup>
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <Import cs:Precondition=" '$(ProjectType)' != 'TEST' "
+ Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+ <!-- Portable Library will be tested as silverlight -->
+ <PropertyGroup cs:Precondition=" '$(ProjectType)' == 'TEST' ">
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <ValidateXaml>false</ValidateXaml>
+ <ThrowErrorsInValidation>false</ThrowErrorsInValidation>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <cs:Import Project="SLTest.targets" cs:Precondition=" '$(ProjectType)' == 'TEST' " />
+ <Import cs:Precondition=" '$(ProjectType)' == 'TEST' "
+ Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@@ -25,4 +41,11 @@
<Target Name="AfterBuild">
</Target>
-->
+ <ProjectExtensions cs:Precondition=" '$(ProjectType)' == 'TEST' ">
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/csproj_templates/SL20.csproj b/csproj_templates/SL20.csproj
index 48de13fc..ba6f20d3 100644
--- a/csproj_templates/SL20.csproj
+++ b/csproj_templates/SL20.csproj
@@ -1,4 +1,6 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="3.5" DefaultTargets="Build"
+ xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
+ xmlns:cs="urn:schemas-csharp-project:template">
<PropertyGroup>
<EnvironmentFlavor>SILVERLIGHT</EnvironmentFlavor>
<EnvironmentTemplate>SL20</EnvironmentTemplate>
@@ -20,6 +22,8 @@
<DefineConstants>$(DefineConstants);NOSERIALIZABLE;NOSORTEDLIST;NOEXTENSIONS</DefineConstants>
<NoConfig>true</NoConfig>
</PropertyGroup>
+ <!-- Preprocess include of silverlight testing -->
+ <cs:Import Project="SLTest.targets" cs:Precondition=" '$(ProjectType)' == 'TEST' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/csproj_templates/SL30.csproj b/csproj_templates/SL30.csproj
index 04146183..32f9088c 100644
--- a/csproj_templates/SL30.csproj
+++ b/csproj_templates/SL30.csproj
@@ -1,4 +1,6 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="3.5" DefaultTargets="Build"
+ xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
+ xmlns:cs="urn:schemas-csharp-project:template">
<PropertyGroup>
<EnvironmentFlavor>SILVERLIGHT</EnvironmentFlavor>
<EnvironmentTemplate>SL30</EnvironmentTemplate>
@@ -20,6 +22,11 @@
<DefineConstants>$(DefineConstants);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
<NoConfig>true</NoConfig>
</PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <!-- Preprocess include of silverlight testing -->
+ <cs:Import Project="SLTest.targets" cs:Precondition=" '$(ProjectType)' == 'TEST' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/csproj_templates/SL40.csproj b/csproj_templates/SL40.csproj
index 144a689e..08569ff3 100644
--- a/csproj_templates/SL40.csproj
+++ b/csproj_templates/SL40.csproj
@@ -1,4 +1,6 @@
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build"
+ xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
+ xmlns:cs="urn:schemas-csharp-project:template">
<PropertyGroup>
<EnvironmentFlavor>SILVERLIGHT</EnvironmentFlavor>
<EnvironmentTemplate>SL40</EnvironmentTemplate>
@@ -21,6 +23,11 @@
<DefineConstants>$(DefineConstants);NOSERIALIZABLE;NOSORTEDLIST</DefineConstants>
<NoConfig>true</NoConfig>
</PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <!-- Preprocess include of silverlight testing -->
+ <cs:Import Project="SLTest.targets" cs:Precondition=" '$(ProjectType)' == 'TEST' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/csproj_templates/SLTest.targets b/csproj_templates/SLTest.targets
new file mode 100644
index 00000000..49fb104f
--- /dev/null
+++ b/csproj_templates/SLTest.targets
@@ -0,0 +1,31 @@
+<Project ToolsVersion="3.5" DefaultTargets="Build"
+ xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
+ xmlns:cs="urn:schemas-csharp-project:template">
+
+ <PropertyGroup>
+ <SilverlightApplication>true</SilverlightApplication>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>$(AssemblyName).xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>$(RootNamespace).App</SilverlightAppEntry>
+ <TestPageFileName>TestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System.Windows" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <None Include="Properties\AppManifest.xml" />
+ <ApplicationDefinition Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ </ItemGroup>
+
+</Project> \ No newline at end of file
diff --git a/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj b/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
index c75be051..ae7e22c5 100644
--- a/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
+++ b/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj
@@ -3,6 +3,7 @@
<PropertyGroup>
<EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
<EnvironmentTemplate>NET35</EnvironmentTemplate>
+ <ProjectType>TEST</ProjectType>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -169,7 +170,7 @@
<Target Name="AfterBuild">
</Target>
-->
- <PropertyGroup>
+ <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
<StartAction>Program</StartAction>
<StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
<StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
diff --git a/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj b/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj
index 7cf48eec..73630e3f 100644
--- a/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj
+++ b/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj
@@ -3,6 +3,7 @@
<PropertyGroup>
<EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
<EnvironmentTemplate>NET35</EnvironmentTemplate>
+ <ProjectType>TEST</ProjectType>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -112,7 +113,7 @@
<Target Name="AfterBuild">
</Target>
-->
- <PropertyGroup>
+ <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
<StartAction>Program</StartAction>
<StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
<StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>
diff --git a/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj b/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj
index 970e8b95..e6480b13 100644
--- a/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj
+++ b/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj
@@ -3,6 +3,7 @@
<PropertyGroup>
<EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
<EnvironmentTemplate>NET35</EnvironmentTemplate>
+ <ProjectType>TEST</ProjectType>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -105,7 +106,7 @@
<Target Name="AfterBuild">
</Target>
-->
- <PropertyGroup>
+ <PropertyGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
<StartAction>Program</StartAction>
<StartProgram>$(ProjectDir)..\..\lib\NUnit\tools\nunit-console.exe</StartProgram>
<StartArguments>/nologo /noshadow /labels /wait $(AssemblyName).dll</StartArguments>