aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2012-10-12 18:22:48 -0500
committerrogerk <devnull@localhost>2012-10-12 18:22:48 -0500
commitad73b4250d906757b290a8a53d4544a623a7e0d8 (patch)
treec423bc677dafa155103ea5bcf01a16f8e0ca4de4 /src/ProtocolBuffers
parent3cf3315370c3aff09353bb0bf3808d67c9e92eda (diff)
downloadprotobuf-ad73b4250d906757b290a8a53d4544a623a7e0d8.tar.gz
protobuf-ad73b4250d906757b290a8a53d4544a623a7e0d8.tar.bz2
protobuf-ad73b4250d906757b290a8a53d4544a623a7e0d8.zip
Fixing build for SILVERLIGHT and COMPACT_FRAMEWORK before adding more build
variations (WP). Changes are primarily superficial since they are to support the Serialization assembly and unit tests compiling in the CF which has not been done before.
Diffstat (limited to 'src/ProtocolBuffers')
-rw-r--r--src/ProtocolBuffers/CodedInputStream.cs2
-rw-r--r--src/ProtocolBuffers/CodedOutputStream.cs2
-rw-r--r--src/ProtocolBuffers/CustomSerialization.cs2
-rw-r--r--src/ProtocolBuffers/EnumLite.cs2
-rw-r--r--src/ProtocolBuffers/Properties/AssemblyInfo.cs2
-rw-r--r--src/ProtocolBuffers/ProtocolBuffers.csproj1
-rw-r--r--src/ProtocolBuffers/ProtocolBuffersLite.csproj1
-rw-r--r--src/ProtocolBuffers/ThrowHelper.cs2
8 files changed, 8 insertions, 6 deletions
diff --git a/src/ProtocolBuffers/CodedInputStream.cs b/src/ProtocolBuffers/CodedInputStream.cs
index be88d154..230c585c 100644
--- a/src/ProtocolBuffers/CodedInputStream.cs
+++ b/src/ProtocolBuffers/CodedInputStream.cs
@@ -231,7 +231,7 @@ namespace Google.ProtocolBuffers
/// </summary>
public bool ReadDouble(ref double value)
{
-#if SILVERLIGHT || COMPACT_FRAMEWORK_35
+#if SILVERLIGHT || COMPACT_FRAMEWORK
if (BitConverter.IsLittleEndian && 8 <= bufferSize - bufferPos)
{
value = BitConverter.ToDouble(buffer, bufferPos);
diff --git a/src/ProtocolBuffers/CodedOutputStream.cs b/src/ProtocolBuffers/CodedOutputStream.cs
index 889ade7f..f4d637c1 100644
--- a/src/ProtocolBuffers/CodedOutputStream.cs
+++ b/src/ProtocolBuffers/CodedOutputStream.cs
@@ -496,7 +496,7 @@ namespace Google.ProtocolBuffers
/// </summary>
public void WriteDoubleNoTag(double value)
{
-#if SILVERLIGHT || COMPACT_FRAMEWORK_35
+#if SILVERLIGHT || COMPACT_FRAMEWORK
byte[] rawBytes = BitConverter.GetBytes(value);
if (!BitConverter.IsLittleEndian)
ByteArray.Reverse(rawBytes);
diff --git a/src/ProtocolBuffers/CustomSerialization.cs b/src/ProtocolBuffers/CustomSerialization.cs
index 6b7a38eb..22d87379 100644
--- a/src/ProtocolBuffers/CustomSerialization.cs
+++ b/src/ProtocolBuffers/CustomSerialization.cs
@@ -40,7 +40,7 @@ using System.Runtime.Serialization;
/*
* This entire source file is not supported on the Silverlight platform
*/
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !COMPACT_FRAMEWORK
namespace Google.ProtocolBuffers
{
/*
diff --git a/src/ProtocolBuffers/EnumLite.cs b/src/ProtocolBuffers/EnumLite.cs
index a6a25f4e..450ecb77 100644
--- a/src/ProtocolBuffers/EnumLite.cs
+++ b/src/ProtocolBuffers/EnumLite.cs
@@ -98,7 +98,7 @@ namespace Google.ProtocolBuffers
public EnumLiteMap()
{
items = new SortedList<int, IEnumLite>();
-#if SILVERLIGHT
+#if SILVERLIGHT || COMPACT_FRAMEWORK
// Silverlight doesn't support Enum.GetValues
// TODO(jonskeet): Validate that this reflection is permitted, e.g. in Windows Phone 7
foreach (System.Reflection.FieldInfo fi in typeof(TEnum).GetFields(System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public))
diff --git a/src/ProtocolBuffers/Properties/AssemblyInfo.cs b/src/ProtocolBuffers/Properties/AssemblyInfo.cs
index 55da8510..95bc4a61 100644
--- a/src/ProtocolBuffers/Properties/AssemblyInfo.cs
+++ b/src/ProtocolBuffers/Properties/AssemblyInfo.cs
@@ -68,7 +68,7 @@ using System.Runtime.CompilerServices;
// [assembly: AssemblyVersion("2.4.1.473")]
[assembly: AssemblyVersion("2.4.1.473")]
-#if !COMPACT_FRAMEWORK_35
+#if !COMPACT_FRAMEWORK
[assembly: AssemblyFileVersion("2.4.1.473")]
#endif
diff --git a/src/ProtocolBuffers/ProtocolBuffers.csproj b/src/ProtocolBuffers/ProtocolBuffers.csproj
index e473f8b5..bc7211ed 100644
--- a/src/ProtocolBuffers/ProtocolBuffers.csproj
+++ b/src/ProtocolBuffers/ProtocolBuffers.csproj
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
+ <TargetFrameworkClass>CLIENTPROFILE</TargetFrameworkClass>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
diff --git a/src/ProtocolBuffers/ProtocolBuffersLite.csproj b/src/ProtocolBuffers/ProtocolBuffersLite.csproj
index 4773c5ad..645112ce 100644
--- a/src/ProtocolBuffers/ProtocolBuffersLite.csproj
+++ b/src/ProtocolBuffers/ProtocolBuffersLite.csproj
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
+ <TargetFrameworkClass>CLIENTPROFILE</TargetFrameworkClass>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
diff --git a/src/ProtocolBuffers/ThrowHelper.cs b/src/ProtocolBuffers/ThrowHelper.cs
index f04a7f16..22584dd0 100644
--- a/src/ProtocolBuffers/ThrowHelper.cs
+++ b/src/ProtocolBuffers/ThrowHelper.cs
@@ -82,7 +82,7 @@ namespace Google.ProtocolBuffers
public static Exception CreateMissingMethod(Type type, string methodName)
{
-#if SILVERLIGHT
+#if SILVERLIGHT || COMPACT_FRAMEWORK
return new MissingMethodException(String.Format("The method '{0}' was not found on type {1}", methodName, type));
#else
return new MissingMethodException(String.Format("{0}", type), methodName);