diff options
author | csharptest <roger@csharptest.net> | 2012-10-14 11:38:17 -0500 |
---|---|---|
committer | rogerk <devnull@localhost> | 2012-10-14 11:38:17 -0500 |
commit | 7d53c1291202b1b503fb611829514e17fdef053b (patch) | |
tree | de91adbc95c622ba67cbf4600f2eeac56e36aae7 | |
parent | ad73b4250d906757b290a8a53d4544a623a7e0d8 (diff) | |
download | protobuf-7d53c1291202b1b503fb611829514e17fdef053b.tar.gz protobuf-7d53c1291202b1b503fb611829514e17fdef053b.tar.bz2 protobuf-7d53c1291202b1b503fb611829514e17fdef053b.zip |
Refactored SilverlightCompatibility.cs => FrameworkPortability.cs added NewLine const
13 files changed, 48 insertions, 114 deletions
diff --git a/src/ProtocolBuffers.Serialization/Http/MessageFormatFactory.cs b/src/ProtocolBuffers.Serialization/Http/MessageFormatFactory.cs index 68de9411..b3679bab 100644 --- a/src/ProtocolBuffers.Serialization/Http/MessageFormatFactory.cs +++ b/src/ProtocolBuffers.Serialization/Http/MessageFormatFactory.cs @@ -63,7 +63,6 @@ namespace Google.ProtocolBuffers.Serialization.Http Encoding = new UTF8Encoding(false),
Indent = true,
IndentChars = " ",
- NewLineChars = Environment.NewLine,
};
// Don't know how else to change xml writer options?
codedOutput = writer = XmlFormatWriter.CreateInstance(XmlWriter.Create(output, settings));
diff --git a/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs b/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs index de8a76b4..4fe6ea7c 100644 --- a/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs +++ b/src/ProtocolBuffers.Serialization/JsonFormatWriter.cs @@ -226,7 +226,7 @@ namespace Google.ProtocolBuffers.Serialization /// <summary> Sets the output formatting to use Environment.NewLine with 4-character indentions </summary>
public JsonFormatWriter Formatted()
{
- NewLine = Environment.NewLine;
+ NewLine = FrameworkPortability.NewLine;
Indent = " ";
Whitespace = " ";
return this;
diff --git a/src/ProtocolBuffers.Serialization/ProtocolBuffers.Serialization.csproj b/src/ProtocolBuffers.Serialization/ProtocolBuffers.Serialization.csproj index b349fcfd..ac0e355a 100644 --- a/src/ProtocolBuffers.Serialization/ProtocolBuffers.Serialization.csproj +++ b/src/ProtocolBuffers.Serialization/ProtocolBuffers.Serialization.csproj @@ -1,7 +1,8 @@ <?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>
+ <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
+ <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -11,7 +12,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers.Serialization</RootNamespace>
<AssemblyName>Google.ProtocolBuffers.Serialization</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
diff --git a/src/ProtocolBuffers.Serialization/ProtocolBuffersLite.Serialization.csproj b/src/ProtocolBuffers.Serialization/ProtocolBuffersLite.Serialization.csproj index c2605735..c5005345 100644 --- a/src/ProtocolBuffers.Serialization/ProtocolBuffersLite.Serialization.csproj +++ b/src/ProtocolBuffers.Serialization/ProtocolBuffersLite.Serialization.csproj @@ -1,7 +1,8 @@ <?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>
+ <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
+ <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -11,7 +12,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers.Serialization</RootNamespace>
<AssemblyName>Google.ProtocolBuffersLite.Serialization</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
diff --git a/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj b/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj index 3ef8a946..0d9f0abe 100644 --- a/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj +++ b/src/ProtocolBuffers.Test/ProtocolBuffers.Test.csproj @@ -1,7 +1,8 @@ <?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>
+ <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
+ <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -11,31 +12,11 @@ <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffers.Test</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- <TrackFileAccess>false</TrackFileAccess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -45,8 +26,8 @@ <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
- <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <NoStdLib>true</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -55,21 +36,21 @@ <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
- <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <NoStdLib>true</NoStdLib>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetFrameworkClass)' == 'CLIENTPROFILE' ">
+ <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
<Reference Include="nunit.framework">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
- <ItemGroup Condition=" '$(TargetFrameworkClass)' != 'CLIENTPROFILE' ">
+ <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
<Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
diff --git a/src/ProtocolBuffers/CustomSerialization.cs b/src/ProtocolBuffers/CustomSerialization.cs index 22d87379..256f2e67 100644 --- a/src/ProtocolBuffers/CustomSerialization.cs +++ b/src/ProtocolBuffers/CustomSerialization.cs @@ -33,14 +33,14 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
-
-using System;
-using System.Runtime.Serialization;
-
/*
* This entire source file is not supported on the Silverlight platform
*/
#if !SILVERLIGHT && !COMPACT_FRAMEWORK
+
+using System;
+using System.Runtime.Serialization;
+
namespace Google.ProtocolBuffers
{
/*
diff --git a/src/ProtocolBuffers/Descriptors/DescriptorPool.cs b/src/ProtocolBuffers/Descriptors/DescriptorPool.cs index 78f6ef1b..ae819801 100644 --- a/src/ProtocolBuffers/Descriptors/DescriptorPool.cs +++ b/src/ProtocolBuffers/Descriptors/DescriptorPool.cs @@ -167,7 +167,7 @@ namespace Google.ProtocolBuffers.Descriptors }
private static readonly Regex ValidationRegex = new Regex("^[_A-Za-z][_A-Za-z0-9]*$",
- SilverlightCompatibility.CompiledRegexWhereAvailable);
+ FrameworkPortability.CompiledRegexWhereAvailable);
/// <summary>
/// Verifies that the descriptor's name is valid (i.e. it contains
diff --git a/src/ProtocolBuffers/ProtocolBuffers.csproj b/src/ProtocolBuffers/ProtocolBuffers.csproj index bc7211ed..9dbb37ae 100644 --- a/src/ProtocolBuffers/ProtocolBuffers.csproj +++ b/src/ProtocolBuffers/ProtocolBuffers.csproj @@ -1,7 +1,8 @@ <?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>
+ <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
+ <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -11,7 +12,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffers</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
@@ -27,6 +28,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -38,6 +40,7 @@ <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<ItemGroup>
diff --git a/src/ProtocolBuffers/ProtocolBuffersLite.csproj b/src/ProtocolBuffers/ProtocolBuffersLite.csproj index 645112ce..d3bd1f84 100644 --- a/src/ProtocolBuffers/ProtocolBuffersLite.csproj +++ b/src/ProtocolBuffers/ProtocolBuffersLite.csproj @@ -1,7 +1,8 @@ <?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>
+ <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
+ <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -11,7 +12,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffersLite</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
diff --git a/src/ProtocolBuffers/SilverlightCompatibility.cs b/src/ProtocolBuffers/SilverlightCompatibility.cs deleted file mode 100644 index e4d474b0..00000000 --- a/src/ProtocolBuffers/SilverlightCompatibility.cs +++ /dev/null @@ -1,52 +0,0 @@ -#region Copyright notice and license
-
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// http://github.com/jskeet/dotnet-protobufs/
-// Original C++/Java/Python code:
-// http://code.google.com/p/protobuf/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#endregion
-
-using System.Text.RegularExpressions;
-
-namespace Google.ProtocolBuffers
-{
- /// <summary>
- /// Class containing helpful workarounds for Silverlight compatibility
- /// </summary>
- internal static class SilverlightCompatibility
- {
-#if SILVERLIGHT
- internal const RegexOptions CompiledRegexWhereAvailable = RegexOptions.None;
-#else
- internal const RegexOptions CompiledRegexWhereAvailable = RegexOptions.Compiled;
-#endif
- }
-}
\ No newline at end of file diff --git a/src/ProtocolBuffers/TextTokenizer.cs b/src/ProtocolBuffers/TextTokenizer.cs index 22f73223..7fdbd1d6 100644 --- a/src/ProtocolBuffers/TextTokenizer.cs +++ b/src/ProtocolBuffers/TextTokenizer.cs @@ -80,7 +80,7 @@ namespace Google.ProtocolBuffers // Note: atomic groups used to mimic possessive quantifiers in Java in both of these regexes
internal static readonly Regex WhitespaceAndCommentPattern = new Regex("\\G(?>(\\s|(#.*$))+)",
- SilverlightCompatibility.
+ FrameworkPortability.
CompiledRegexWhereAvailable |
RegexOptions.Multiline);
@@ -89,18 +89,18 @@ namespace Google.ProtocolBuffers "\\G[0-9+-](?>[0-9a-zA-Z_.+-]*)|" + // a number
"\\G\"(?>([^\"\\\n\\\\]|\\\\.)*)(\"|\\\\?$)|" + // a double-quoted string
"\\G\'(?>([^\"\\\n\\\\]|\\\\.)*)(\'|\\\\?$)", // a single-quoted string
- SilverlightCompatibility.CompiledRegexWhereAvailable | RegexOptions.Multiline);
+ FrameworkPortability.CompiledRegexWhereAvailable | RegexOptions.Multiline);
private static readonly Regex DoubleInfinity = new Regex("^-?inf(inity)?$",
- SilverlightCompatibility.CompiledRegexWhereAvailable |
+ FrameworkPortability.CompiledRegexWhereAvailable |
RegexOptions.IgnoreCase);
private static readonly Regex FloatInfinity = new Regex("^-?inf(inity)?f?$",
- SilverlightCompatibility.CompiledRegexWhereAvailable |
+ FrameworkPortability.CompiledRegexWhereAvailable |
RegexOptions.IgnoreCase);
private static readonly Regex FloatNan = new Regex("^nanf?$",
- SilverlightCompatibility.CompiledRegexWhereAvailable |
+ FrameworkPortability.CompiledRegexWhereAvailable |
RegexOptions.IgnoreCase);
/** Construct a tokenizer that parses tokens from the given text. */
diff --git a/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj b/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj index 55cf43b7..2178d522 100644 --- a/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj +++ b/src/ProtocolBuffersLite.Test/ProtocolBuffersLite.Test.csproj @@ -1,7 +1,8 @@ <?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>
+ <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
+ <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -11,14 +12,11 @@ <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffersLite.Test</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
- <UpgradeBackupLocation />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -28,6 +26,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -37,6 +36,7 @@ <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoStdLib>true</NoStdLib>
</PropertyGroup>
<ItemGroup>
@@ -44,13 +44,13 @@ <Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetFrameworkClass)' == 'CLIENTPROFILE' ">
+ <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
<Reference Include="nunit.framework">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
- <ItemGroup Condition=" '$(TargetFrameworkClass)' != 'CLIENTPROFILE' ">
+ <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
<Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
diff --git a/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj b/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj index 42f18c32..6bdb0818 100644 --- a/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj +++ b/src/ProtocolBuffersLite.Test/ProtocolBuffersLiteMixed.Test.csproj @@ -1,7 +1,8 @@ <?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>
+ <EnvironmentFlavor>CLIENTPROFILE</EnvironmentFlavor>
+ <EnvironmentTemplate>NET35</EnvironmentTemplate>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
@@ -11,14 +12,11 @@ <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Google.ProtocolBuffers</RootNamespace>
<AssemblyName>Google.ProtocolBuffersMixedLite.Test</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\keys\Google.ProtocolBuffers.snk</AssemblyOriginatorKeyFile>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
- <UpgradeBackupLocation />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -27,8 +25,9 @@ <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
- <NoStdLib>true</NoStdLib>
<WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <NoStdLib>true</NoStdLib>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -36,21 +35,22 @@ <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
- <NoStdLib>true</NoStdLib>
<WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <NoStdLib>true</NoStdLib>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetFrameworkClass)' == 'CLIENTPROFILE' ">
+ <ItemGroup Condition=" '$(EnvironmentFlavor)' == 'CLIENTPROFILE' ">
<Reference Include="nunit.framework">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
</Reference>
</ItemGroup>
- <ItemGroup Condition=" '$(TargetFrameworkClass)' != 'CLIENTPROFILE' ">
+ <ItemGroup Condition=" '$(EnvironmentFlavor)' != 'CLIENTPROFILE' ">
<Reference Include="Microsoft.Silverlight.Testing, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\Microsoft.Silverlight.Testing\April2010\Microsoft.Silverlight.Testing.dll</HintPath>
|