Browse Source

Several build related changes in this commit:
1. Refactoring of build to allow multiple target frameworks
2. Addition of multiple Silverlight versions
3. Renamed *_Silverlight2 configurations to *_Silverlight
4. Added batch files for each framework build (Build20, Build35, Build40)
5. Moved the package building into MSBuild tasks
6. BuildAll.bat now builds all packages in one build
7. Removed Generate*Package.bat batch files (replaced by BuildAll.bat)
8. Removed the ability to build with 3.5 MSBuild
9. Source is only generated with Release/2.0 build of ProtoGen
10. Removed unit testing proto files from packaging
11. Removed the remaining 'pause' statements from all batch files
12. RunBenchmarks target now builds with .NET 2.0 instead of 4.0
13. Benchmark arguments can now be specified with BenchmarkArgs parameter
14. ProtoBench now supports '/log:path' so console can still see progress
15. Updated PublishRelease.bat and *.nuspec for new build output
16. Updated ProtocolBuffers.Serialization.csproj to omit extensions for 2.0
17. Added NUnit console configurations for each .NET framework version

csharptest 14 years ago
parent
commit
d444748edc

+ 2 - 0
.hgignore

@@ -9,6 +9,8 @@ _ReSharper.*
 *.user
 *.user
 *.suo
 *.suo
 
 
+lib/NUnit 2.2.8.0/nunit-console.exe.config
+
 
 
 syntax: regexp
 syntax: regexp
 build/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,5}/
 build/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,5}/

+ 0 - 10
build/Build.bat

@@ -1,10 +0,0 @@
-@echo off
-SET BUILD_TARGET=%1
-SET BUILD_CONFIG=%2
-
-IF "%BUILD_TARGET%"=="" SET BUILD_TARGET=Rebuild
-IF "%BUILD_CONFIG%"=="" SET BUILD_CONFIG=Debug
-
-CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.csproj %3 %4 %5 %6 /t:%BUILD_TARGET% /p:BuildConfiguration=%BUILD_CONFIG% /p:Platform="Any CPU" /p:BuildTools=4.0 /toolsversion:4.0"
-
-pause

+ 8 - 0
build/Build20.bat

@@ -0,0 +1,8 @@
+@echo off
+SET BUILD_TARGET=%~1
+SET BUILD_CONFIG=%~2
+
+IF "%BUILD_TARGET%"=="" SET BUILD_TARGET=Rebuild
+IF "%BUILD_CONFIG%"=="" SET BUILD_CONFIG=Debug
+
+CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.csproj /toolsversion:4.0 %3 %4 %5 %6 "/t:%BUILD_TARGET%" "/p:BuildConfiguration=%BUILD_CONFIG%;TargetVersion=2"

+ 2 - 42
build/BuildAll.bat

@@ -1,42 +1,2 @@
-@ECHO OFF
-
-SET PREV_WORKING_DIR=%CD%
-CD %~dp0
-
-REM -- 3.5 Debug build, ensure this continues to work
-%WINDIR%\Microsoft.NET\Framework\v3.5\MSBuild.exe build.csproj /t:Rebuild /p:BuildConfiguration=Debug /p:Platform="Any CPU" /p:BuildTools=3.5 /toolsversion:3.5"
-IF ERRORLEVEL 1 GOTO ERROR
-
-REM -- 4.0 Debug build
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild /p:BuildConfiguration=Debug /p:Platform="Any CPU"
-IF ERRORLEVEL 1 GOTO ERROR
-
-REM -- 4.0 Release build
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild /p:BuildConfiguration=Release /p:Platform="Any CPU"
-IF ERRORLEVEL 1 GOTO ERROR
-
-IF EXIST "%ProgramFiles%\MSBuild\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" GOTO SILVERLIGHT
-IF EXIST "%ProgramFiles(x86)%\MSBuild\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" GOTO SILVERLIGHT
-
-ECHO Unable to locate %ProgramFiles(x86)%\MSBuild\Microsoft\Silverlight\v2.0
-GOTO ERROR
-
-:SILVERLIGHT
-
-REM -- 4.0 Debug_Silverlight2 build
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU"
-IF ERRORLEVEL 1 GOTO ERROR
-
-REM -- 4.0 Release_Silverlight2 build
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU"
-IF ERRORLEVEL 1 GOTO ERROR
-
-GOTO END
-
-:ERROR
-CD %PREV_WORKING_DIR%
-PAUSE
-
-:END
-CD %PREV_WORKING_DIR%
-SET PREV_WORKING_DIR=
+@echo off
+CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.csproj /t:FullBuild /toolsversion:4.0 %1 %2 %3 %4 %5 %6

+ 1 - 4
build/BuildSilverlight2.bat

@@ -1,5 +1,2 @@
 @echo off
 @echo off
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU"
-
-pause
+CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.csproj /toolsversion:4.0 /t:RunBenchmarks %1 %2 %3 %4 "/p:BuildConfiguration=Debug;TargetVersion=2"

+ 109 - 33
build/Common.targets

@@ -2,10 +2,43 @@
 
 
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 
 
+<!-- **********************************************************************************************
+Targets For FullBuild
+*********************************************************************************************** -->
+
+  <Target Name="_FullBuild" DependsOnTargets="_CleanOutputDirectory;_BuildProtoGen;_GenerateSource;_CopyGeneratedSource">
+    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Rebuild;TargetVersion=2" Targets="_BuildAllConfigurations" />
+    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Rebuild;TargetVersion=3" Targets="_BuildAllConfigurations" />
+    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Rebuild;TargetVersion=4" Targets="_BuildAllConfigurations" />
+  </Target>
+
+  <Target Name="_BuildAllConfigurations">
+    <!-- Release Package -->
+    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Rebuild;Platform=$(Platform);TargetVersion=$(TargetVersion);BuildConfiguration=Release" Targets="_BuildConfiguration" />
+    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Rebuild;Platform=$(Platform);TargetVersion=$(TargetVersion);BuildConfiguration=Release_Silverlight" Targets="_BuildConfiguration" />
+    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Rebuild;Platform=$(Platform);TargetVersion=$(TargetVersion);PackageName=Release-$(ForcedFrameworkVersion)" Targets="_GeneratePackage" />
+    <!-- Full Package -->
+    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Rebuild;Platform=$(Platform);TargetVersion=$(TargetVersion);BuildConfiguration=Debug" Targets="_BuildConfiguration" />
+    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Rebuild;Platform=$(Platform);TargetVersion=$(TargetVersion);BuildConfiguration=Debug_Silverlight" Targets="_BuildConfiguration" />
+    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Rebuild;Platform=$(Platform);TargetVersion=$(TargetVersion);PackageName=Full-$(ForcedFrameworkVersion)" Targets="_GeneratePackage" />
+  </Target>
+
+  <Target Name="_BuildConfiguration" DependsOnTargets="_ReportConfig;_Clean;_BuildSolution;_Test;_PreparePackageComponent" />
+
+  <Target Name="_ReportConfig">
+    <Message Importance="high" Text="
+
+Building $(BuildConfiguration) configuration for .NET Framework $(ForcedFrameworkVersion) $(Platform)" />
+  </Target>
+
+<!-- **********************************************************************************************
+Targets For Build
+*********************************************************************************************** -->
+
   <Target Name="_BuildSolution">
   <Target Name="_BuildSolution">
     <Message Text="Running $(SolutionTarget) $(BuildConfiguration) with $(BuildTools) on $(SolutionFile)" Importance="normal" />
     <Message Text="Running $(SolutionTarget) $(BuildConfiguration) with $(BuildTools) on $(SolutionFile)" Importance="normal" />
     <MSBuild Targets="$(SolutionTarget)" Projects="$(SolutionFile)" ToolsVersion="$(BuildTools)"
     <MSBuild Targets="$(SolutionTarget)" Projects="$(SolutionFile)" ToolsVersion="$(BuildTools)"
-             Properties="Configuration=$(BuildConfiguration);$(ForcedFrameworkVersion)TreatWarningsAsErrors=true;"
+             Properties="Configuration=$(BuildConfiguration);Platform=$(Platform);TargetFrameworkVersion=$(ForcedFrameworkVersion);TreatWarningsAsErrors=true;SilverlightVersion=$(SilverlightVersion)"
              />
              />
   </Target>
   </Target>
 
 
@@ -13,73 +46,119 @@
     <RemoveDir Directories="@(WorkingDirectories)" Condition="Exists(%(WorkingDirectories.Identity))" />
     <RemoveDir Directories="@(WorkingDirectories)" Condition="Exists(%(WorkingDirectories.Identity))" />
     <MakeDir Directories="@(WorkingDirectories)" />
     <MakeDir Directories="@(WorkingDirectories)" />
 
 
-    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Clean;BuildConfiguration=$(BuildConfiguration)" Targets="_BuildSolution" ContinueOnError="true" />
+    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Clean;BuildConfiguration=$(BuildConfiguration);Platform=$(Platform)" Targets="_BuildSolution" ContinueOnError="true" />
   </Target>
   </Target>
 
 
   <Target Name="_Compile">
   <Target Name="_Compile">
-    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Rebuild;BuildConfiguration=$(BuildConfiguration)" Targets="_BuildSolution" />
+    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Rebuild;BuildConfiguration=$(BuildConfiguration);Platform=$(Platform)" Targets="_BuildSolution" />
+  </Target>
+
+  <Target Name="Requires20">
+    <Error Text="Must be run with TargetVersion=2" Condition=" '$(TargetVersion)' != '2' " />
+  </Target>
+
+  <Target Name="RequiresRelease">
+    <Error Text="Must be run with BuildConfiguration=Release" Condition=" '$(BuildConfiguration)' != 'Release' " />
   </Target>
   </Target>
 
 
-  <Target Name="_CompileGeneratedSource" DependsOnTargets="_CopyGeneratedSource">
-    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="Step=Two;SolutionTarget=Build;BuildConfiguration=$(BuildConfiguration)" Targets="_BuildSolution" />
+  <!-- **********************************************************************************************
+Targets For GenerateSource
+*********************************************************************************************** -->
+
+  <Target Name="_BuildProtoGen">
+    <MSBuild Targets="Build" ToolsVersion="3.5"
+             Projects="$(ProjectDirectory)\src\ProtocolBuffers\ProtocolBuffers.csproj;$(ProjectDirectory)\src\ProtoGen\ProtoGen.csproj" 
+             Properties="Step=_BuildProtoGen;Configuration=Release;Platform=AnyCPU;TargetFrameworkVersion=v2.0;DebugType=none;DocumentationFile=;TreatWarningsAsErrors=true;OutputPath=$(BuildOutputDirectory)\ProtoGen;" />
+  </Target>
+
+  <Target Name="_CleanTempSource">
+    <Message Importance="normal" Text="Cleaning source directory $(SourceTempDirectory)"/>
+    <RemoveDir Directories="$(SourceTempDirectory)" Condition="Exists($(SourceTempDirectory))" />
+    <MakeDir Directories="$(SourceTempDirectory)" />
   </Target>
   </Target>
   
   
-  <Target Name="_GenerateSource">
-    <Exec Command="$(ProtocExePath) --proto_path=$(ProtosDirectory) --descriptor_set_out=compiled.pb @(Protos->'%(RelativeDir)%(Filename)%(Extension)', ' ')" WorkingDirectory="$(BuildTempDirectory)" />
-    <Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(BuildTempDirectory)" />
+  <Target Name="_GenerateSource" DependsOnTargets="_CleanTempSource">
+    <Message Importance="high" Text="Generating source from proto files" />
+    <Exec Command="$(ProtocExePath) --proto_path=$(ProtosDirectory) --descriptor_set_out=compiled.pb @(Protos->'%(RelativeDir)%(Filename)%(Extension)', ' ')" WorkingDirectory="$(SourceTempDirectory)" />
+    <Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(SourceTempDirectory)" />
     <!-- Generate the AddressBookProtos.cs directly -->
     <!-- Generate the AddressBookProtos.cs directly -->
-    <Exec Command="$(ProtogenExePath) --protoc_dir=$(LibDirectory) --proto_path=$(ProtosDirectory) $(ProtosDirectory)\tutorial\addressbook.proto -namespace=Google.ProtocolBuffers.Examples.AddressBook -umbrella_classname=AddressBookProtos" WorkingDirectory="$(BuildTempDirectory)" />
+    <Exec Command="$(ProtogenExePath) --protoc_dir=$(LibDirectory) --proto_path=$(ProtosDirectory) $(ProtosDirectory)\tutorial\addressbook.proto -namespace=Google.ProtocolBuffers.Examples.AddressBook -umbrella_classname=AddressBookProtos" WorkingDirectory="$(SourceTempDirectory)" />
   </Target>
   </Target>
 
 
   <Target Name="_CopyGeneratedSource" DependsOnTargets="_GenerateSource">
   <Target Name="_CopyGeneratedSource" DependsOnTargets="_GenerateSource">
     <Copy SourceFiles="%(GeneratedSource.Identity)" DestinationFiles="%(GeneratedSource.TargetDirectory)\%(GeneratedSource.Filename)%(GeneratedSource.Extension)" />
     <Copy SourceFiles="%(GeneratedSource.Identity)" DestinationFiles="%(GeneratedSource.TargetDirectory)\%(GeneratedSource.Filename)%(GeneratedSource.Extension)" />
   </Target>
   </Target>
 
 
-  <Target Name="_Test" DependsOnTargets="_CompileGeneratedSource" Condition="$(BuildConfiguration)=='Debug' or $(BuildConfiguration)=='Release'">
+<!-- **********************************************************************************************
+Targets For Test
+*********************************************************************************************** -->
+  
+  <Target Name="_Test" Condition="$(BuildConfiguration)=='Debug' or $(BuildConfiguration)=='Release'">
     <CallTarget Targets="_RunTests" />
     <CallTarget Targets="_RunTests" />
   </Target>
   </Target>
 
 
   <Target Name="_RunTests">
   <Target Name="_RunTests">
-    <Exec Command="&quot;$(NUnitExePath)&quot; /noshadow %(TestContainer.Identity) /xml:$(BuildTempDirectory)\..\%(TestContainer.Filename).$(BuildConfiguration).xml" />
+    <Copy SourceFiles="$(NUnitExeConfig)" DestinationFiles="$(NUnitExePath).config" />
+    <Exec Command="&quot;$(NUnitExePath)&quot; /nologo /noshadow %(TestContainer.Identity) /xml:$(BuildTempDirectory)\%(TestContainer.Filename).$(BuildConfiguration).xml" />
   </Target>
   </Target>
+
+<!-- **********************************************************************************************
+Targets For Package
+*********************************************************************************************** -->
   
   
-  <!--## Package Generation ##-->
   <Target Name="_CleanOutputDirectory">
   <Target Name="_CleanOutputDirectory">
-    <RemoveDir Directories="$(ProjectDirectory)\build_output\Package" ContinueOnError="true" />
-    <RemoveDir Directories="$(ProjectDirectory)\build_output" ContinueOnError="true" />
-    <MakeDir Directories="$(ProjectDirectory)\build_output" ContinueOnError="true" />
+    <RemoveDir Directories="$(BuildOutputPackage)" ContinueOnError="true" />
+    <RemoveDir Directories="$(BuildOutputDirectory)" ContinueOnError="true" />
+    <MakeDir Directories="$(BuildOutputDirectory)" ContinueOnError="true" />
   </Target>
   </Target>
   
   
   <Target Name="_PreparePackageComponent">
   <Target Name="_PreparePackageComponent">
-    <Copy SourceFiles="@(DynamicPackageItem)" DestinationFolder="$(ProjectDirectory)\build_output\Package\$(BuildConfiguration)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)" />
+    <Copy SourceFiles="@(DynamicPackageItem)" DestinationFolder="$(BuildOutputPackage)\$(BuildConfiguration)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)" />
   </Target>
   </Target>
 
 
   <Target Name="_GeneratePackage">
   <Target Name="_GeneratePackage">
-    <Copy SourceFiles="@(StaticPackageItem)" DestinationFolder="$(ProjectDirectory)\build_output\Package\%(StaticPackageItem.TargetDirectory)\%(StaticPackageItem.RecursiveDir)" />
-    <Exec Command="&quot;$(ZipExePath)&quot; a -tzip ..\$(PackageName) * -r" WorkingDirectory="$(ProjectDirectory)\build_output\Package" />
+    <Copy SourceFiles="@(StaticPackageItem)" DestinationFolder="$(BuildOutputPackage)\%(StaticPackageItem.TargetDirectory)\%(StaticPackageItem.RecursiveDir)" />
+    <Exec Command="&quot;$(ZipExePath)&quot; a -tzip ..\$(PackageName).zip * -r" WorkingDirectory="$(BuildOutputPackage)" />
   </Target>
   </Target>
 
 
-  <!--## Benchmark ##-->
-  <Target Name="_GenerateBenchmarkSource" DependsOnTargets="_Clean;_Compile">
+
+<!-- **********************************************************************************************
+Targets For Benchmark
+*********************************************************************************************** -->
+
+  <Target Name="_GenerateBenchmarkSource">
     <PropertyGroup>
     <PropertyGroup>
       <Args>$(BenchmarkProtosDirectory)\google_size.proto $(BenchmarkProtosDirectory)\google_speed.proto</Args>
       <Args>$(BenchmarkProtosDirectory)\google_size.proto $(BenchmarkProtosDirectory)\google_speed.proto</Args>
     </PropertyGroup>
     </PropertyGroup>
 
 
-    <Exec Command="$(ProtocExePath) --proto_path=$(BenchmarkProtosDirectory);$(ProtosDirectory) --include_imports=compiled.pb --descriptor_set_out=compiled.pb $(Args)" WorkingDirectory="$(BuildTempDirectory)" />
-    <Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(BuildTempDirectory)" />
+    <Exec Command="$(ProtocExePath) --proto_path=$(BenchmarkProtosDirectory);$(ProtosDirectory) --include_imports=compiled.pb --descriptor_set_out=compiled.pb $(Args)" WorkingDirectory="$(SourceTempDirectory)" />
+    <Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(SourceTempDirectory)" />
+  </Target>
+
+  <Target Name="_CompileBenchmarkAssemblyInFramework20" Condition=" '$(MSBuildToolsVersion)' != '2.0' ">
+    <MSBuild Projects="$(MSBuildProjectFullPath)" Properties="SolutionTarget=Rebuild;BuildConfiguration=$(BuildConfiguration);Platform=$(Platform)" 
+             Targets="_CompileBenchmarkAssembly" ToolsVersion="2.0" />
   </Target>
   </Target>
 
 
   <Target Name="_CompileBenchmarkAssembly" DependsOnTargets="_GenerateBenchmarkSource">
   <Target Name="_CompileBenchmarkAssembly" DependsOnTargets="_GenerateBenchmarkSource">
+    <Error Text="Must be run with Framework 2.0" Condition=" '$(MSBuildToolsVersion)' != '2.0' " />
+
     <ItemGroup>
     <ItemGroup>
-      <BenchmarkSources Include="$(BuildTempDirectory)\GoogleSizeProtoFile.cs" />
-      <BenchmarkSources Include="$(BuildTempDirectory)\GoogleSpeedProtoFile.cs" />
+      <BenchmarkSources Include="$(SourceTempDirectory)\GoogleSizeProtoFile.cs" />
+      <BenchmarkSources Include="$(SourceTempDirectory)\GoogleSpeedProtoFile.cs" />
       <BenchmarkSources Include="$(SourceDirectory)\ProtoBench\Properties\AssemblyInfo.cs" />
       <BenchmarkSources Include="$(SourceDirectory)\ProtoBench\Properties\AssemblyInfo.cs" />
     </ItemGroup>
     </ItemGroup>
 
 
-    <Csc TargetType="library" OutputAssembly="$(BuildTempDirectory)\BenchmarkTypes.dll" Optimize="true" Sources="@(BenchmarkSources)" References="$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.dll" />
+    <Csc
+      TargetType="library" 
+      OutputAssembly="$(BuildTempDirectory)\BenchmarkTypes.dll" 
+      Optimize="true" 
+      Sources="@(BenchmarkSources)" 
+      References="$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.dll" 
+      />
   </Target>
   </Target>
 
 
-  <Target Name="_PrepareBenchmarkEnvironment" DependsOnTargets="_CompileBenchmarkAssembly">
+  <Target Name="_PrepareBenchmarkEnvironment" DependsOnTargets="_CompileBenchmarkAssemblyInFramework20">
     <ItemGroup>
     <ItemGroup>
       <BenchmarkResources Include="$(BenchmarkProtosDirectory)\google_message1.dat" />
       <BenchmarkResources Include="$(BenchmarkProtosDirectory)\google_message1.dat" />
       <BenchmarkResources Include="$(BenchmarkProtosDirectory)\google_message2.dat" />
       <BenchmarkResources Include="$(BenchmarkProtosDirectory)\google_message2.dat" />
@@ -93,7 +172,6 @@
 
 
   <Target Name="_RunBenchmarks" DependsOnTargets="_PrepareBenchmarkEnvironment">
   <Target Name="_RunBenchmarks" DependsOnTargets="_PrepareBenchmarkEnvironment">
     <ItemGroup>
     <ItemGroup>
-      <BenchmarkParameter Include="/v2" />
       <BenchmarkParameter Include="Google.ProtocolBuffers.ProtoBench.SizeMessage1,BenchmarkTypes" />
       <BenchmarkParameter Include="Google.ProtocolBuffers.ProtoBench.SizeMessage1,BenchmarkTypes" />
       <BenchmarkParameter Include="google_message1.dat" />
       <BenchmarkParameter Include="google_message1.dat" />
       <BenchmarkParameter Include="Google.ProtocolBuffers.ProtoBench.SpeedMessage1,BenchmarkTypes" />
       <BenchmarkParameter Include="Google.ProtocolBuffers.ProtoBench.SpeedMessage1,BenchmarkTypes" />
@@ -104,12 +182,10 @@
       <BenchmarkParameter Include="google_message2.dat" />
       <BenchmarkParameter Include="google_message2.dat" />
     </ItemGroup>
     </ItemGroup>
 
 
-    <PropertyGroup>
-      <BenchmarkParameterList>@(BenchmarkParameter)</BenchmarkParameterList>
-      <Args>$(BenchmarkParameterList.Replace(`;`,` `))</Args>
-    </PropertyGroup>
-    
-    <Exec Command="&quot;$(ProtoBenchExePath)&quot; @(BenchmarkParameter->'%(Identity)', ' ') > &quot;$(BuildTempDirectory)\..\BenchmarkResults.txt&quot;" WorkingDirectory="$(BuildTempDirectory)" />
+    <Message Text="Running $(ProtoBenchExePath) from $(BuildTempDirectory)" />
+    <Exec Command="&quot;$(ProtoBenchExePath)&quot; $(BenchmarkArgs) @(BenchmarkParameter->'%(Identity)', ' ') &quot;/log:$(BenchmarkOutputFile)&quot;"
+          WorkingDirectory="$(BuildTempDirectory)" />
+
   </Target>
   </Target>
 
 
 </Project>
 </Project>

+ 0 - 19
build/GenerateCompletePackage.bat

@@ -1,19 +0,0 @@
-@ECHO OFF
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:PrepareOutputDirectory
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Debug /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageName=AllBinariesAndSource.zip /p:Platform="Any CPU"
-
-:END

+ 0 - 13
build/GenerateReleasePackage.bat

@@ -1,13 +0,0 @@
-@ECHO OFF
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:PrepareOutputDirectory
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Rebuild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU" %PROTOBUF_KEY_FILE%
-IF ERRORLEVEL 1 GOTO END
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageName=ReleaseBinaries.zip /p:Platform="Any CPU"
-
-:END

+ 13 - 7
build/Google.ProtocolBuffers.nuspec

@@ -43,16 +43,22 @@ Language Guide  - http://code.google.com/apis/protocolbuffers/docs/proto.html
   </metadata>
   </metadata>
   <files>
   <files>
     <!-- Release Binaries -->
     <!-- Release Binaries -->
-    <file src="..\build_output\Package\Release\Google.ProtocolBuffers.???" target="lib\net20" />
-    <file src="..\build_output\Package\Release\Google.ProtocolBuffers.Serialization.???" target="lib\net20" />
+    <file src="..\build_output\v2.0\Release\Google.ProtocolBuffers.???" target="lib\net20" />
+    <file src="..\build_output\v2.0\Release\Google.ProtocolBuffers.Serialization.???" target="lib\net20" />
+    <file src="..\build_output\v3.5\Release\Google.ProtocolBuffers.???" target="lib\net35" />
+    <file src="..\build_output\v3.5\Release\Google.ProtocolBuffers.Serialization.???" target="lib\net35" />
+    <file src="..\build_output\v4.0\Release\Google.ProtocolBuffers.???" target="lib\net40" />
+    <file src="..\build_output\v4.0\Release\Google.ProtocolBuffers.Serialization.???" target="lib\net40" />
     <!-- Silverlight Binaries -->
     <!-- Silverlight Binaries -->
-    <file src="..\build_output\Package\Release_Silverlight2\Google.ProtocolBuffers.???" target="lib\sl20" />
-    <file src="..\build_output\Package\Release_Silverlight2\Google.ProtocolBuffers.Serialization.???" target="lib\sl20" />
+    <file src="..\build_output\v2.0\Release_Silverlight\Google.ProtocolBuffers.???" target="lib\sl20" />
+    <file src="..\build_output\v2.0\Release_Silverlight\Google.ProtocolBuffers.Serialization.???" target="lib\sl20" />
+    <file src="..\build_output\v3.5\Release_Silverlight\Google.ProtocolBuffers.???" target="lib\sl30" />
+    <file src="..\build_output\v3.5\Release_Silverlight\Google.ProtocolBuffers.Serialization.???" target="lib\sl30" />
+    <file src="..\build_output\v4.0\Release_Silverlight\Google.ProtocolBuffers.???" target="lib\sl40" />
+    <file src="..\build_output\v4.0\Release_Silverlight\Google.ProtocolBuffers.Serialization.???" target="lib\sl40" />
     <!-- Tools -->
     <!-- Tools -->
     <file src="..\lib\Protoc.exe" target="tools" />
     <file src="..\lib\Protoc.exe" target="tools" />
-    <file src="..\build_output\Package\Release\Google.ProtocolBuffers.dll" target="tools" />
-    <file src="..\build_output\Package\Release\ProtoGen.exe" target="tools" />
-    <file src="..\build_output\Package\Release\ProtoGen.exe.config" target="tools" />
+    <file src="..\build_output\ProtoGen\*" target="tools" />
     <!-- Content -->
     <!-- Content -->
     <file src="..\CHANGES.txt" target="content"/>
     <file src="..\CHANGES.txt" target="content"/>
     <file src="..\license.txt" target="content\licenses"/>
     <file src="..\license.txt" target="content\licenses"/>

+ 14 - 8
build/Google.ProtocolBuffersLite.nuspec

@@ -43,23 +43,29 @@ Language Guide  - http://code.google.com/apis/protocolbuffers/docs/proto.html
   </metadata>
   </metadata>
   <files>
   <files>
     <!-- Release Binaries -->
     <!-- Release Binaries -->
-    <file src="..\build_output\Package\Release\Google.ProtocolBuffersLite.???" target="lib\net20" />
-    <file src="..\build_output\Package\Release\Google.ProtocolBuffersLite.Serialization.???" target="lib\net20" />
+    <file src="..\build_output\v2.0\Release\Google.ProtocolBuffersLite.???" target="lib\net20" />
+    <file src="..\build_output\v2.0\Release\Google.ProtocolBuffersLite.Serialization.???" target="lib\net20" />
+    <file src="..\build_output\v3.5\Release\Google.ProtocolBuffersLite.???" target="lib\net35" />
+    <file src="..\build_output\v3.5\Release\Google.ProtocolBuffersLite.Serialization.???" target="lib\net35" />
+    <file src="..\build_output\v4.0\Release\Google.ProtocolBuffersLite.???" target="lib\net40" />
+    <file src="..\build_output\v4.0\Release\Google.ProtocolBuffersLite.Serialization.???" target="lib\net40" />
     <!-- Silverlight Binaries -->
     <!-- Silverlight Binaries -->
-    <file src="..\build_output\Package\Release_Silverlight2\Google.ProtocolBuffersLite.???" target="lib\sl20" />
-    <file src="..\build_output\Package\Release_Silverlight2\Google.ProtocolBuffersLite.Serialization.???" target="lib\sl20" />
+    <file src="..\build_output\v2.0\Release_Silverlight\Google.ProtocolBuffersLite.???" target="lib\sl20" />
+    <file src="..\build_output\v2.0\Release_Silverlight\Google.ProtocolBuffersLite.Serialization.???" target="lib\sl20" />
+    <file src="..\build_output\v3.5\Release_Silverlight\Google.ProtocolBuffersLite.???" target="lib\sl30" />
+    <file src="..\build_output\v3.5\Release_Silverlight\Google.ProtocolBuffersLite.Serialization.???" target="lib\sl30" />
+    <file src="..\build_output\v4.0\Release_Silverlight\Google.ProtocolBuffersLite.???" target="lib\sl40" />
+    <file src="..\build_output\v4.0\Release_Silverlight\Google.ProtocolBuffersLite.Serialization.???" target="lib\sl40" />
     <!-- Tools -->
     <!-- Tools -->
     <file src="..\lib\Protoc.exe" target="tools" />
     <file src="..\lib\Protoc.exe" target="tools" />
-    <file src="..\build_output\Package\Release\Google.ProtocolBuffers.dll" target="tools" />
-    <file src="..\build_output\Package\Release\ProtoGen.exe" target="tools" />
-    <file src="..\build_output\Package\Release\ProtoGen.exe.config" target="tools" />
+    <file src="..\build_output\ProtoGen\*" target="tools" />
     <!-- Content -->
     <!-- Content -->
     <file src="..\CHANGES.txt" target="content"/>
     <file src="..\CHANGES.txt" target="content"/>
     <file src="..\license.txt" target="content\licenses"/>
     <file src="..\license.txt" target="content\licenses"/>
     <file src="..\lib\protoc-license.txt" target="content\licenses"/>
     <file src="..\lib\protoc-license.txt" target="content\licenses"/>
     <file src="..\protos\google\protobuf\descriptor.proto" target="content\protos\google\protobuf" />
     <file src="..\protos\google\protobuf\descriptor.proto" target="content\protos\google\protobuf" />
     <file src="..\protos\google\protobuf\csharp_options.proto" target="content\protos\google\protobuf" />
     <file src="..\protos\google\protobuf\csharp_options.proto" target="content\protos\google\protobuf" />
-	
+
     <file src="..\src\ProtocolBuffers\**\*.cs" target="src\ProtocolBuffers\"/>
     <file src="..\src\ProtocolBuffers\**\*.cs" target="src\ProtocolBuffers\"/>
     <file src="..\src\ProtocolBuffers.Serialization\**\*.cs" target="src\ProtocolBuffers.Serialization\"/>
     <file src="..\src\ProtocolBuffers.Serialization\**\*.cs" target="src\ProtocolBuffers.Serialization\"/>
   </files>
   </files>

+ 18 - 9
build/PublishRelease.bat

@@ -22,19 +22,24 @@ CMD.exe /Q /C "CD .. && lib\StampVersion.exe /major:2 /minor:4 /build:1 /revisio
 IF EXIST "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\sn.exe" SET WIN7SDK_DIR=C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\
 IF EXIST "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\sn.exe" SET WIN7SDK_DIR=C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\
 
 
 IF NOT EXIST "..\release-key" hg clone https://bitbucket.org/rknapp/protobuf-csharp-port-keyfile ..\release-key
 IF NOT EXIST "..\release-key" hg clone https://bitbucket.org/rknapp/protobuf-csharp-port-keyfile ..\release-key
-SET PROTOBUF_KEY_FILE="/p:AssemblyOriginatorKeyFile=%~dp0..\release-key\Google.ProtocolBuffers.snk"
 
 
 MD "%2"
 MD "%2"
-CMD.exe /Q /C "GenerateCompletePackage.bat"
-COPY /y ..\build_output\AllBinariesAndSource.zip %2\protobuf-csharp-port-%2-full-binaries.zip
-CMD.exe /Q /C "GenerateReleasePackage.bat"
-COPY /y ..\build_output\ReleaseBinaries.zip %2\protobuf-csharp-port-%2-release-binaries.zip
+CMD.exe /Q /C "BuildAll.bat /verbosity:minimal "/p:AssemblyOriginatorKeyFile=%~dp0..\release-key\Google.ProtocolBuffers.snk"
+
+COPY /y ..\build_output\Release-v2.0.zip %2\protobuf-csharp-port-%2-net20-release-binaries.zip
+COPY /y ..\build_output\Release-v3.5.zip %2\protobuf-csharp-port-%2-net35-release-binaries.zip
+COPY /y ..\build_output\Release-v4.0.zip %2\protobuf-csharp-port-%2-net40-release-binaries.zip
+
+COPY /y ..\build_output\Full-v2.0.zip %2\protobuf-csharp-port-%2-net20-full-binaries.zip
+COPY /y ..\build_output\Full-v3.5.zip %2\protobuf-csharp-port-%2-net35-full-binaries.zip
+COPY /y ..\build_output\Full-v4.0.zip %2\protobuf-csharp-port-%2-net40-full-binaries.zip
+
 ..\lib\NuGet.exe pack Google.ProtocolBuffers.nuspec -Symbols -Version %2 -NoPackageAnalysis -OutputDirectory %2
 ..\lib\NuGet.exe pack Google.ProtocolBuffers.nuspec -Symbols -Version %2 -NoPackageAnalysis -OutputDirectory %2
 ..\lib\NuGet.exe pack Google.ProtocolBuffersLite.nuspec -Symbols -Version %2 -NoPackageAnalysis -OutputDirectory %2
 ..\lib\NuGet.exe pack Google.ProtocolBuffersLite.nuspec -Symbols -Version %2 -NoPackageAnalysis -OutputDirectory %2
+
 hg archive %2\protobuf-csharp-port-%2-source.zip
 hg archive %2\protobuf-csharp-port-%2-source.zip
 
 
-SET PROTOBUF_KEY_FILE=
-"%WIN7SDK_DIR%sn.exe" -T ..\build_output\Package\Release\Google.ProtocolBuffers.dll
+"%WIN7SDK_DIR%sn.exe" -T ..\build_output\v2.0\Release\Google.ProtocolBuffers.dll
 @ECHO.
 @ECHO.
 @ECHO ***********************************************************
 @ECHO ***********************************************************
 @ECHO IMPORTANT: Verify the above key output is: 55f7125234beb589
 @ECHO IMPORTANT: Verify the above key output is: 55f7125234beb589
@@ -61,8 +66,12 @@ hg push
 SET GOOGLEUPLOAD=python.exe googlecode_upload.py --project protobuf-csharp-port --user "%3" --password "%4"
 SET GOOGLEUPLOAD=python.exe googlecode_upload.py --project protobuf-csharp-port --user "%3" --password "%4"
 
 
 %GOOGLEUPLOAD% --labels Type-Source,Featured --summary "Version %2 source" %2\protobuf-csharp-port-%2-source.zip
 %GOOGLEUPLOAD% --labels Type-Source,Featured --summary "Version %2 source" %2\protobuf-csharp-port-%2-source.zip
-%GOOGLEUPLOAD% --labels Type-Executable,Featured --summary "Version %2 binaries (all configurations)" %2\protobuf-csharp-port-%2-full-binaries.zip
-%GOOGLEUPLOAD% --labels Type-Executable,Featured --summary "Version %2 binaries (release only)" %2\protobuf-csharp-port-%2-release-binaries.zip
+%GOOGLEUPLOAD% --labels Type-Executable,Featured --summary "Version %2 binaries for .NET 2.0 (all configurations)" %2\protobuf-csharp-port-%2-net20-full-binaries.zip
+%GOOGLEUPLOAD% --labels Type-Executable,Featured --summary "Version %2 binaries for .NET 3.5 (all configurations)" %2\protobuf-csharp-port-%2-net35-full-binaries.zip
+%GOOGLEUPLOAD% --labels Type-Executable,Featured --summary "Version %2 binaries for .NET 4.0 (all configurations)" %2\protobuf-csharp-port-%2-net40-full-binaries.zip
+%GOOGLEUPLOAD% --labels Type-Executable,Featured --summary "Version %2 binaries for .NET 2.0 (release only)" %2\protobuf-csharp-port-%2-net20-release-binaries.zip
+%GOOGLEUPLOAD% --labels Type-Executable,Featured --summary "Version %2 binaries for .NET 3.5 (release only)" %2\protobuf-csharp-port-%2-net35-release-binaries.zip
+%GOOGLEUPLOAD% --labels Type-Executable,Featured --summary "Version %2 binaries for .NET 4.0 (release only)" %2\protobuf-csharp-port-%2-net40-release-binaries.zip
 
 
 @SET GOOGLEUPLOAD=
 @SET GOOGLEUPLOAD=
 @ECHO.
 @ECHO.

+ 1 - 4
build/RunBenchmarks.bat

@@ -1,5 +1,2 @@
 @echo off
 @echo off
-
-%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild %~dp0\build.csproj /m /t:RunBenchmarks /p:BuildConfiguration=Release /p:Platform="Any CPU"
-
-pause
+CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.csproj /toolsversion:4.0 /t:RunBenchmarks %1 %2 %3 %4 "/p:BuildConfiguration=Release;TargetVersion=2"

+ 65 - 43
build/build.csproj

@@ -4,29 +4,45 @@
   <PropertyGroup>
   <PropertyGroup>
     <ProjectName>Protocol Buffers</ProjectName>
     <ProjectName>Protocol Buffers</ProjectName>
     <BuildConfiguration Condition=" '$(BuildConfiguration)' == '' ">Error</BuildConfiguration>
     <BuildConfiguration Condition=" '$(BuildConfiguration)' == '' ">Error</BuildConfiguration>
-    <BuildTools Condition=" '$(BuildTools)' == '' ">4.0</BuildTools>
-    <ForcedFrameworkVersion Condition=" '$(BuildTools)' == '3.5' ">TargetFrameworkVersion=v2.0;</ForcedFrameworkVersion>
-
+    <Platform>Any CPU</Platform>
+    <!-- BuildToolsVersion -->
+    <BuildTools>3.5</BuildTools>
+    <BuildTools Condition=" '$(TargetVersion)' == '4' ">4.0</BuildTools>
+    <!-- TargetFrameworkVersion -->
+    <ForcedFrameworkVersion>v2.0</ForcedFrameworkVersion>
+    <ForcedFrameworkVersion Condition=" '$(TargetVersion)' == '3' ">v3.5</ForcedFrameworkVersion>
+    <ForcedFrameworkVersion Condition=" '$(TargetVersion)' == '4' ">v4.0</ForcedFrameworkVersion>
+    <TargetFrameworkVersion>$(ForcedFrameworkVersion)</TargetFrameworkVersion>
+    <!-- SilverlightVersion -->
+    <SilverlightVersion>v2.0</SilverlightVersion>
+    <SilverlightVersion Condition=" '$(TargetVersion)' == '3' ">v3.0</SilverlightVersion>
+    <SilverlightVersion Condition=" '$(TargetVersion)' == '4' ">v4.0</SilverlightVersion>
     <!--Directory Paths-->
     <!--Directory Paths-->
     <ProjectDirectory>$(MSBuildProjectDirectory)\..</ProjectDirectory>
     <ProjectDirectory>$(MSBuildProjectDirectory)\..</ProjectDirectory>
     <SourceDirectory>$(ProjectDirectory)\src</SourceDirectory>
     <SourceDirectory>$(ProjectDirectory)\src</SourceDirectory>
     <LibDirectory>$(ProjectDirectory)\lib</LibDirectory>
     <LibDirectory>$(ProjectDirectory)\lib</LibDirectory>
     <ProtosDirectory>$(ProjectDirectory)\protos</ProtosDirectory>
     <ProtosDirectory>$(ProjectDirectory)\protos</ProtosDirectory>
+
+    <SourceTempDirectory>$(ProjectDirectory)\build_temp\GeneratedSource</SourceTempDirectory>
+    <BuildTempDirectory>$(ProjectDirectory)\build_temp\$(BuildConfiguration)$(TargetVersion)</BuildTempDirectory>
+    <BuildOutputDirectory>$(ProjectDirectory)\build_output</BuildOutputDirectory>
+    <BuildOutputPackage>$(BuildOutputDirectory)\$(ForcedFrameworkVersion)</BuildOutputPackage>
+
+    <BenchmarkArgs>/v2 /fast /formats</BenchmarkArgs>
+    <BenchmarkOutputFile>$(BuildTempDirectory)\..\BenchmarkResults.txt</BenchmarkOutputFile>
     <BenchmarkProtosDirectory>$(ProjectDirectory)\benchmarks</BenchmarkProtosDirectory>
     <BenchmarkProtosDirectory>$(ProjectDirectory)\benchmarks</BenchmarkProtosDirectory>
-    <BuildTempDirectory>$(ProjectDirectory)\build_temp\$(BuildConfiguration)</BuildTempDirectory>
-    <BuildOutputDirectory>$(ProjectDirectory)\build_output\$(BuildConfiguration)</BuildOutputDirectory>
 
 
     <PackageName Condition=" '$(PackageName)' == '' ">$(BuildConfiguration)</PackageName>
     <PackageName Condition=" '$(PackageName)' == '' ">$(BuildConfiguration)</PackageName>
     
     
     <!--File Paths-->
     <!--File Paths-->
-    <SolutionFile Condition=" '$(BuildTools)' == '4.0' ">$(SourceDirectory)\ProtocolBuffers.sln</SolutionFile>
-    <SolutionFile Condition=" '$(BuildTools)' == '3.5' ">$(SourceDirectory)\ProtocolBuffers2008.sln</SolutionFile>
+    <SolutionFile>$(SourceDirectory)\ProtocolBuffers.sln</SolutionFile>
 
 
     <!--Tool Paths-->
     <!--Tool Paths-->
     <ProtocExePath>$(LibDirectory)\protoc.exe</ProtocExePath>
     <ProtocExePath>$(LibDirectory)\protoc.exe</ProtocExePath>
-    <ProtogenExePath>$(SourceDirectory)\ProtoGen\bin\$(BuildConfiguration)\protogen.exe</ProtogenExePath>
+    <ProtogenExePath>$(BuildOutputDirectory)\ProtoGen\protogen.exe</ProtogenExePath>
     <ProtoBenchExePath>$(BuildTempDirectory)\ProtoBench.exe</ProtoBenchExePath>
     <ProtoBenchExePath>$(BuildTempDirectory)\ProtoBench.exe</ProtoBenchExePath>
     <NUnitExePath>$(LibDirectory)\NUnit 2.2.8.0\nunit-console.exe</NUnitExePath>
     <NUnitExePath>$(LibDirectory)\NUnit 2.2.8.0\nunit-console.exe</NUnitExePath>
+    <NUnitExeConfig>$(LibDirectory)\NUnit 2.2.8.0\nunit-console.$(ForcedFrameworkVersion).config</NUnitExeConfig>
     <ZipExePath>$(LibDirectory)\7-Zip 9.20\7za.exe</ZipExePath>
     <ZipExePath>$(LibDirectory)\7-Zip 9.20\7za.exe</ZipExePath>
   </PropertyGroup>
   </PropertyGroup>
 
 
@@ -34,7 +50,6 @@
 
 
   <ItemGroup>
   <ItemGroup>
     <WorkingDirectories Include="$(BuildTempDirectory)" />
     <WorkingDirectories Include="$(BuildTempDirectory)" />
-    <WorkingDirectories Include="$(BuildOutputDirectory)" />
 
 
     <Protos Include="$(ProtosDirectory)\extest\unittest_issues.proto" />
     <Protos Include="$(ProtosDirectory)\extest\unittest_issues.proto" />
     <Protos Include="$(ProtosDirectory)\extest\unittest_extras.proto" />
     <Protos Include="$(ProtosDirectory)\extest\unittest_extras.proto" />
@@ -62,92 +77,92 @@
     <Protos Include="$(ProtosDirectory)\google\test\google_speed.proto" />
     <Protos Include="$(ProtosDirectory)\google\test\google_speed.proto" />
 
 
     <!-- Main protos -->
     <!-- Main protos -->
-    <GeneratedSource Include="$(BuildTempDirectory)\CSharpOptions.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\CSharpOptions.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers\DescriptorProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers\DescriptorProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\DescriptorProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\DescriptorProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers\DescriptorProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers\DescriptorProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
         
         
     <!-- Address book sample -->
     <!-- Address book sample -->
-    <GeneratedSource Include="$(BuildTempDirectory)\AddressBookProtos.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\AddressBookProtos.cs">
       <TargetDirectory>$(SourceDirectory)\AddressBook</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\AddressBook</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
     <!-- Unit test -->
     <!-- Unit test -->
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestExtrasProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestExtrasProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestExtrasIssuesProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestExtrasIssuesProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestXmlSerializerTestProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestXmlSerializerTestProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestCSharpOptionsProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestCSharpOptionsProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestCustomOptionsProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestCustomOptionsProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestEmbedOptimizeForProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestEmbedOptimizeForProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestEmptyProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestEmptyProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestImportLiteProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestImportLiteProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>  
     </GeneratedSource>  
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestImportProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestImportProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestMessageSetProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestMessageSetProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestNoGenericServicesProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestNoGenericServicesProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestOptimizeForProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestOptimizeForProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestRpcInterop.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestRpcInterop.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestRpcInteropLite.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestRpcInteropLite.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestGenericServices.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestGenericServices.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
     <!-- Lite unit test -->
     <!-- Lite unit test -->
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestExtrasFullProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestExtrasFullProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestExtrasLiteProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestExtrasLiteProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestImportLiteProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestImportLiteProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestImportProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestImportProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestLiteImportNonLiteProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestLiteImportNonLiteProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestLiteProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestLiteProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffersLite.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestGoogleSizeProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestGoogleSizeProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
-    <GeneratedSource Include="$(BuildTempDirectory)\UnitTestGoogleSpeedProtoFile.cs">
+    <GeneratedSource Include="$(SourceTempDirectory)\UnitTestGoogleSpeedProtoFile.cs">
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
       <TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
     </GeneratedSource>
     </GeneratedSource>
 
 
@@ -167,8 +182,14 @@
 
 
     <StaticPackageItem Include="$(ProjectDirectory)\CHANGES.txt" />
     <StaticPackageItem Include="$(ProjectDirectory)\CHANGES.txt" />
     <StaticPackageItem Include="$(ProjectDirectory)\license.txt" />
     <StaticPackageItem Include="$(ProjectDirectory)\license.txt" />
-    <StaticPackageItem Include="$(ProjectDirectory)\protos\**\*.*">
-      <TargetDirectory>\protos</TargetDirectory>
+    <StaticPackageItem Include="$(ProjectDirectory)\protos\google\protobuf\descriptor.proto">
+      <TargetDirectory>\protos\google\protobuf</TargetDirectory>
+    </StaticPackageItem>
+    <StaticPackageItem Include="$(ProjectDirectory)\protos\google\protobuf\csharp_options.proto">
+      <TargetDirectory>\protos\google\protobuf</TargetDirectory>
+    </StaticPackageItem>
+    <StaticPackageItem Include="$(ProjectDirectory)\protos\tutorial\addressbook.proto">
+      <TargetDirectory>\protos\tutorial</TargetDirectory>
     </StaticPackageItem>
     </StaticPackageItem>
     <StaticPackageItem Include="$(LibDirectory)\Protoc*">
     <StaticPackageItem Include="$(LibDirectory)\Protoc*">
       <TargetDirectory>\Protoc</TargetDirectory>
       <TargetDirectory>\Protoc</TargetDirectory>
@@ -178,14 +199,15 @@
 
 
   <!-- targets -->
   <!-- targets -->
   <Target Name="Clean" DependsOnTargets="_Clean" />
   <Target Name="Clean" DependsOnTargets="_Clean" />
-  <Target Name="Build" DependsOnTargets="_Compile;_Test" />
+  <Target Name="Build" DependsOnTargets="GenerateSource;_Compile;_Test" />
   <Target Name="Test" DependsOnTargets="_RunTests" />
   <Target Name="Test" DependsOnTargets="_RunTests" />
   <Target Name="Rebuild" DependsOnTargets="Clean;Build" />
   <Target Name="Rebuild" DependsOnTargets="Clean;Build" />
-  <Target Name="GenerateSource" DependsOnTargets="_GenerateSource;_CopyGeneratedSource" />
+  <Target Name="GenerateSource" DependsOnTargets="_BuildProtoGen;_GenerateSource;_CopyGeneratedSource" />
   <Target Name="BuildPackage" DependsOnTargets="PrepareOutputDirectory;PreparePackageComponent;GeneratePackage" />
   <Target Name="BuildPackage" DependsOnTargets="PrepareOutputDirectory;PreparePackageComponent;GeneratePackage" />
   <Target Name="PrepareOutputDirectory" DependsOnTargets="_CleanOutputDirectory" />
   <Target Name="PrepareOutputDirectory" DependsOnTargets="_CleanOutputDirectory" />
   <Target Name="PreparePackageComponent" DependsOnTargets="_PreparePackageComponent" />
   <Target Name="PreparePackageComponent" DependsOnTargets="_PreparePackageComponent" />
   <Target Name="GeneratePackage" DependsOnTargets="_GeneratePackage" />
   <Target Name="GeneratePackage" DependsOnTargets="_GeneratePackage" />
-  <Target Name="RunBenchmarks" DependsOnTargets="_RunBenchmarks" />
-  
+  <Target Name="RunBenchmarks" DependsOnTargets="Requires20;RequiresRelease;Rebuild;_RunBenchmarks" />
+  <Target Name="FullBuild" DependsOnTargets="_FullBuild" />
+
 </Project>
 </Project>

+ 3 - 3
build/build35.bat

@@ -1,8 +1,8 @@
 @echo off
 @echo off
-SET BUILD_TARGET=%1
-SET BUILD_CONFIG=%2
+SET BUILD_TARGET=%~1
+SET BUILD_CONFIG=%~2
 
 
 IF "%BUILD_TARGET%"=="" SET BUILD_TARGET=Rebuild
 IF "%BUILD_TARGET%"=="" SET BUILD_TARGET=Rebuild
 IF "%BUILD_CONFIG%"=="" SET BUILD_CONFIG=Debug
 IF "%BUILD_CONFIG%"=="" SET BUILD_CONFIG=Debug
 
 
-CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v3.5\MSBuild.exe build.csproj %3 %4 %5 %6 /t:%BUILD_TARGET% /p:BuildConfiguration=%BUILD_CONFIG% /p:Platform="Any CPU" /p:BuildTools=3.5 /toolsversion:3.5"
+CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.csproj /toolsversion:4.0 %3 %4 %5 %6 "/t:%BUILD_TARGET%" "/p:BuildConfiguration=%BUILD_CONFIG%;TargetVersion=3"

+ 8 - 0
build/build40.bat

@@ -0,0 +1,8 @@
+@echo off
+SET BUILD_TARGET=%~1
+SET BUILD_CONFIG=%~2
+
+IF "%BUILD_TARGET%"=="" SET BUILD_TARGET=Rebuild
+IF "%BUILD_CONFIG%"=="" SET BUILD_CONFIG=Debug
+
+CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.csproj /toolsversion:4.0 %3 %4 %5 %6 "/t:%BUILD_TARGET%" "/p:BuildConfiguration=%BUILD_CONFIG%;TargetVersion=4"

+ 5 - 0
lib/NUnit 2.2.8.0/nunit-console.exe.config → lib/NUnit 2.2.8.0/nunit-console.v2.0.config

@@ -1,5 +1,10 @@
 <?xml version="1.0" encoding="Windows-1252"?>
 <?xml version="1.0" encoding="Windows-1252"?>
 <configuration>
 <configuration>
+
+  <startup>
+    <requiredRuntime version="v2.0.50727" />
+  </startup>
+
     <!--
     <!--
      Application settings for NUnit-console.exe. Do NOT put settings
      Application settings for NUnit-console.exe. Do NOT put settings
 	 for use by your tests here.
 	 for use by your tests here.

+ 102 - 0
lib/NUnit 2.2.8.0/nunit-console.v3.5.config

@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<configuration>
+
+  <startup>
+    <requiredRuntime version="v2.0.50727" />
+  </startup>
+
+    <!--
+     Application settings for NUnit-console.exe. Do NOT put settings
+	 for use by your tests here.
+	-->
+  <appSettings>
+
+	<!--
+	 Specify the location to be used by .NET for the cache
+	-->
+    <add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" />
+  
+  </appSettings>
+  
+    <!-- 
+     The startup section may be used to specify the runtime versions 
+     supported in the order that they will be used if more than one
+     is present. As supplied, this section is commented out, which
+     causes nunit-console to use the version of the framework with
+     which it was built.
+  	 
+	 Since .NET 1.0 does not recognize the <supportedRuntime> elements,
+	 a <requiredRuntime> element is used in case it is the only version
+	 of the framework that is installed.
+    -->
+    <!--
+  <startup>
+	  <supportedRuntime version="v2.0.50727" />
+	  <supportedRuntime version="v2.0.50215" />
+	  <supportedRuntime version="v2.0.40607" />
+	  <supportedRuntime version="v1.1.4322" />
+	  <supportedRuntime version="v1.0.3705" />
+	
+	  <requiredRuntime version="v1.0.3705" />
+  </startup>
+  -->
+
+   <!--
+    The following <runtime> section allows running nunit under 
+    .NET 1.0 by redirecting assemblies. The appliesTo attribute
+    causes the section to be ignored except under .NET 1.0version 1
+    on a machine with only the .NET version 1.0 runtime installed.
+    If application and its tests were built for .NET 1.1 you will
+    also need to redirect system assemblies in the test config file.
+   -->
+  
+ <runtime>
+    
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
+			appliesTo="v1.0.3705">
+
+      <dependentAssembly> 
+        <assemblyIdentity name="System" 
+                          publicKeyToken="b77a5c561934e089" 
+                          culture="neutral"/>
+        <bindingRedirect  oldVersion="1.0.5000.0" 
+                          newVersion="1.0.3300.0"/>
+      </dependentAssembly>
+
+      <dependentAssembly> 
+        <assemblyIdentity name="System.Data" 
+                          publicKeyToken="b77a5c561934e089" 
+                          culture="neutral"/>
+        <bindingRedirect  oldVersion="1.0.5000.0" 
+                          newVersion="1.0.3300.0"/>
+      </dependentAssembly>
+
+      <dependentAssembly> 
+        <assemblyIdentity name="System.Drawing" 
+                          publicKeyToken="b03f5f7f11d50a3a" 
+                          culture="neutral"/>
+        <bindingRedirect  oldVersion="1.0.5000.0" 
+                          newVersion="1.0.3300.0"/>
+      </dependentAssembly>
+
+      <dependentAssembly> 
+        <assemblyIdentity name="System.Windows.Forms" 
+                          publicKeyToken="b77a5c561934e089" 
+                          culture="neutral"/>
+        <bindingRedirect  oldVersion="1.0.5000.0" 
+                          newVersion="1.0.3300.0"/>
+      </dependentAssembly>
+
+      <dependentAssembly> 
+        <assemblyIdentity name="System.Xml" 
+                          publicKeyToken="b77a5c561934e089" 
+                          culture="neutral"/>
+        <bindingRedirect  oldVersion="1.0.5000.0" 
+                          newVersion="1.0.3300.0"/>
+      </dependentAssembly>
+
+    </assemblyBinding>
+
+  </runtime>
+  
+</configuration>

+ 102 - 0
lib/NUnit 2.2.8.0/nunit-console.v4.0.config

@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<configuration>
+
+  <startup useLegacyV2RuntimeActivationPolicy="true">
+    <requiredRuntime version="v4.0.30319" safemode="true"/>
+  </startup>
+
+    <!--
+     Application settings for NUnit-console.exe. Do NOT put settings
+	 for use by your tests here.
+	-->
+  <appSettings>
+
+	<!--
+	 Specify the location to be used by .NET for the cache
+	-->
+    <add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" />
+  
+  </appSettings>
+  
+    <!-- 
+     The startup section may be used to specify the runtime versions 
+     supported in the order that they will be used if more than one
+     is present. As supplied, this section is commented out, which
+     causes nunit-console to use the version of the framework with
+     which it was built.
+  	 
+	 Since .NET 1.0 does not recognize the <supportedRuntime> elements,
+	 a <requiredRuntime> element is used in case it is the only version
+	 of the framework that is installed.
+    -->
+    <!--
+  <startup>
+	  <supportedRuntime version="v2.0.50727" />
+	  <supportedRuntime version="v2.0.50215" />
+	  <supportedRuntime version="v2.0.40607" />
+	  <supportedRuntime version="v1.1.4322" />
+	  <supportedRuntime version="v1.0.3705" />
+	
+	  <requiredRuntime version="v1.0.3705" />
+  </startup>
+  -->
+
+   <!--
+    The following <runtime> section allows running nunit under 
+    .NET 1.0 by redirecting assemblies. The appliesTo attribute
+    causes the section to be ignored except under .NET 1.0version 1
+    on a machine with only the .NET version 1.0 runtime installed.
+    If application and its tests were built for .NET 1.1 you will
+    also need to redirect system assemblies in the test config file.
+   -->
+  
+ <runtime>
+    
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
+			appliesTo="v1.0.3705">
+
+      <dependentAssembly> 
+        <assemblyIdentity name="System" 
+                          publicKeyToken="b77a5c561934e089" 
+                          culture="neutral"/>
+        <bindingRedirect  oldVersion="1.0.5000.0" 
+                          newVersion="1.0.3300.0"/>
+      </dependentAssembly>
+
+      <dependentAssembly> 
+        <assemblyIdentity name="System.Data" 
+                          publicKeyToken="b77a5c561934e089" 
+                          culture="neutral"/>
+        <bindingRedirect  oldVersion="1.0.5000.0" 
+                          newVersion="1.0.3300.0"/>
+      </dependentAssembly>
+
+      <dependentAssembly> 
+        <assemblyIdentity name="System.Drawing" 
+                          publicKeyToken="b03f5f7f11d50a3a" 
+                          culture="neutral"/>
+        <bindingRedirect  oldVersion="1.0.5000.0" 
+                          newVersion="1.0.3300.0"/>
+      </dependentAssembly>
+
+      <dependentAssembly> 
+        <assemblyIdentity name="System.Windows.Forms" 
+                          publicKeyToken="b77a5c561934e089" 
+                          culture="neutral"/>
+        <bindingRedirect  oldVersion="1.0.5000.0" 
+                          newVersion="1.0.3300.0"/>
+      </dependentAssembly>
+
+      <dependentAssembly> 
+        <assemblyIdentity name="System.Xml" 
+                          publicKeyToken="b77a5c561934e089" 
+                          culture="neutral"/>
+        <bindingRedirect  oldVersion="1.0.5000.0" 
+                          newVersion="1.0.3300.0"/>
+      </dependentAssembly>
+
+    </assemblyBinding>
+
+  </runtime>
+  
+</configuration>

+ 27 - 6
src/ProtoBench/Program.cs

@@ -62,6 +62,15 @@ namespace Google.ProtocolBuffers.ProtoBench
 
 
         private static BenchmarkTest RunBenchmark;
         private static BenchmarkTest RunBenchmark;
 
 
+        private static string _logFile;
+        static void WriteLine(string format, params object[] arg)
+        {
+            if (arg.Length > 0) format = String.Format(format, arg);
+            Console.Out.WriteLine(format);
+            if (!String.IsNullOrEmpty(_logFile))
+                File.AppendAllText(_logFile, format + Environment.NewLine);
+        }
+
         [STAThread]
         [STAThread]
         public static int Main(string[] args)
         public static int Main(string[] args)
         {
         {
@@ -70,6 +79,18 @@ namespace Google.ProtocolBuffers.ProtoBench
             Verbose = temp.Remove("/verbose") || temp.Remove("-verbose");
             Verbose = temp.Remove("/verbose") || temp.Remove("-verbose");
             OtherFormats = temp.Remove("/formats") || temp.Remove("-formats");
             OtherFormats = temp.Remove("/formats") || temp.Remove("-formats");
 
 
+            foreach (string arg in temp)
+            {
+                if (arg.StartsWith("/log:", StringComparison.OrdinalIgnoreCase) || arg.StartsWith("-log:", StringComparison.OrdinalIgnoreCase))
+                {
+                    _logFile = arg.Substring(5);
+                    if (!String.IsNullOrEmpty(_logFile))
+                        File.AppendAllText(_logFile, Environment.NewLine + "Started benchmarks at " + DateTime.Now + Environment.NewLine);
+                    temp.Remove(arg);
+                    break;
+                }
+            }
+
             if (true == (FastTest = (temp.Remove("/fast") || temp.Remove("-fast"))))
             if (true == (FastTest = (temp.Remove("/fast") || temp.Remove("-fast"))))
             {
             {
                 TargetTime = TimeSpan.FromSeconds(10);
                 TargetTime = TimeSpan.FromSeconds(10);
@@ -120,7 +141,7 @@ namespace Google.ProtocolBuffers.ProtoBench
         /// </summary>
         /// </summary>
         public static bool RunTest(string typeName, string file, byte[] inputData)
         public static bool RunTest(string typeName, string file, byte[] inputData)
         {
         {
-            Console.WriteLine("Benchmarking {0} with file {1}", typeName, file);
+            WriteLine("Benchmarking {0} with file {1}", typeName, file);
             IMessage defaultMessage;
             IMessage defaultMessage;
             try
             try
             {
             {
@@ -238,7 +259,7 @@ namespace Google.ProtocolBuffers.ProtoBench
                                  new DictionaryReader(dictionary).Merge(defaultMessage.WeakCreateBuilderForType()).
                                  new DictionaryReader(dictionary).Merge(defaultMessage.WeakCreateBuilderForType()).
                                      WeakBuild());
                                      WeakBuild());
                 }
                 }
-                Console.WriteLine();
+                WriteLine(String.Empty);
                 return true;
                 return true;
             }
             }
             catch (Exception e)
             catch (Exception e)
@@ -281,7 +302,7 @@ namespace Google.ProtocolBuffers.ProtoBench
             double first = (iterations*dataSize)/(elapsed.TotalSeconds*1024*1024);
             double first = (iterations*dataSize)/(elapsed.TotalSeconds*1024*1024);
             if (Verbose)
             if (Verbose)
             {
             {
-                Console.WriteLine("Round ---: Count = {1,6}, Bps = {2,8:f3}", 0, iterations, first);
+                WriteLine("Round ---: Count = {1,6}, Bps = {2,8:f3}", 0, iterations, first);
             }
             }
             elapsed = TimeSpan.Zero;
             elapsed = TimeSpan.Zero;
             int max = (int) TargetTime.TotalSeconds;
             int max = (int) TargetTime.TotalSeconds;
@@ -294,7 +315,7 @@ namespace Google.ProtocolBuffers.ProtoBench
                 double bps = (iterations*dataSize)/(cycle.TotalSeconds*1024*1024);
                 double bps = (iterations*dataSize)/(cycle.TotalSeconds*1024*1024);
                 if (Verbose)
                 if (Verbose)
                 {
                 {
-                    Console.WriteLine("Round {1,3}: Count = {2,6}, Bps = {3,8:f3}",
+                    WriteLine("Round {1,3}: Count = {2,6}, Bps = {3,8:f3}",
                                       0, runs, iterations, bps);
                                       0, runs, iterations, bps);
                 }
                 }
 
 
@@ -308,7 +329,7 @@ namespace Google.ProtocolBuffers.ProtoBench
             }
             }
 
 
             Thread.EndThreadAffinity();
             Thread.EndThreadAffinity();
-            Console.WriteLine(
+            WriteLine(
                 "{1}: averages {2} per {3:f3}s for {4} runs; avg: {5:f3}mbps; best: {6:f3}mbps; worst: {7:f3}mbps",
                 "{1}: averages {2} per {3:f3}s for {4} runs; avg: {5:f3}mbps; best: {6:f3}mbps; worst: {7:f3}mbps",
                 0, name, totalCount/runs, elapsed.TotalSeconds/runs, runs,
                 0, name, totalCount/runs, elapsed.TotalSeconds/runs, runs,
                 (totalCount*dataSize)/(elapsed.TotalSeconds*1024*1024), best, worst);
                 (totalCount*dataSize)/(elapsed.TotalSeconds*1024*1024), best, worst);
@@ -331,7 +352,7 @@ namespace Google.ProtocolBuffers.ProtoBench
             // to avoid overflow issues.
             // to avoid overflow issues.
             iterations = (int) ((TargetTime.Ticks/(double) elapsed.Ticks)*iterations);
             iterations = (int) ((TargetTime.Ticks/(double) elapsed.Ticks)*iterations);
             elapsed = TimeAction(action, iterations);
             elapsed = TimeAction(action, iterations);
-            Console.WriteLine("{0}: {1} iterations in {2:f3}s; {3:f3}MB/s",
+            WriteLine("{0}: {1} iterations in {2:f3}s; {3:f3}MB/s",
                               name, iterations, elapsed.TotalSeconds,
                               name, iterations, elapsed.TotalSeconds,
                               (iterations*dataSize)/(elapsed.TotalSeconds*1024*1024));
                               (iterations*dataSize)/(elapsed.TotalSeconds*1024*1024));
         }
         }

+ 12 - 11
src/ProtocolBuffers.Serialization/ProtocolBuffers.Serialization.csproj

@@ -34,7 +34,8 @@
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <UseApplicationTrust>false</UseApplicationTrust>
     <UseApplicationTrust>false</UseApplicationTrust>
     <BootstrapperEnabled>true</BootstrapperEnabled>
     <BootstrapperEnabled>true</BootstrapperEnabled>
-    <DefineConstants>TRACE;NET20;</DefineConstants>
+    <SilverlightVersion Condition=" '$(SilverlightVersion)' == '' ">v2.0</SilverlightVersion>
+    <DefineConstants Condition=" '$(TargetFrameworkVersion)' == 'v2.0' ">NET20;</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
@@ -43,7 +44,7 @@
     <OutputPath>bin\Debug\</OutputPath>
     <OutputPath>bin\Debug\</OutputPath>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
-    <DefineConstants>$(DefineConstants)DEBUG;</DefineConstants>
+    <DefineConstants>$(DefineConstants)TRACE;DEBUG;</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <NoStdLib>true</NoStdLib>
     <NoStdLib>true</NoStdLib>
@@ -55,32 +56,32 @@
     <OutputPath>bin\Release\</OutputPath>
     <OutputPath>bin\Release\</OutputPath>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
-    <DefineConstants>$(DefineConstants)</DefineConstants>
+    <DefineConstants>$(DefineConstants)TRACE;</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <NoStdLib>true</NoStdLib>
     <NoStdLib>true</NoStdLib>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug_Silverlight2|AnyCPU'">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug_Silverlight|AnyCPU'">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
-    <OutputPath>bin\Debug_Silverlight2\</OutputPath>
+    <OutputPath>bin\Debug_Silverlight\</OutputPath>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
-    <DefineConstants>$(DefineConstants)DEBUG;SILVERLIGHT2</DefineConstants>
+    <DefineConstants>$(DefineConstants)TRACE;DEBUG;SILVERLIGHT2</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <NoStdLib>true</NoStdLib>
     <NoStdLib>true</NoStdLib>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_Silverlight2|AnyCPU'">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_Silverlight|AnyCPU'">
     <DebugType>pdbonly</DebugType>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
     <Optimize>true</Optimize>
-    <OutputPath>bin\Release_Silverlight2\</OutputPath>
+    <OutputPath>bin\Release_Silverlight\</OutputPath>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
-    <DefineConstants>$(DefineConstants)SILVERLIGHT2</DefineConstants>
+    <DefineConstants>$(DefineConstants)TRACE;SILVERLIGHT2</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <NoStdLib>true</NoStdLib>
     <NoStdLib>true</NoStdLib>
@@ -139,8 +140,8 @@
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Debug' " />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Debug' " />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Release' " />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Release' " />
-  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Debug_Silverlight2' " />
-  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Release_Silverlight2' " />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Debug_Silverlight' " />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Release_Silverlight' " />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
   <!-- 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.
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
   <Target Name="BeforeBuild">

+ 12 - 11
src/ProtocolBuffers.Serialization/ProtocolBuffersLite.Serialization.csproj

@@ -34,7 +34,8 @@
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <UseApplicationTrust>false</UseApplicationTrust>
     <UseApplicationTrust>false</UseApplicationTrust>
     <BootstrapperEnabled>true</BootstrapperEnabled>
     <BootstrapperEnabled>true</BootstrapperEnabled>
-    <DefineConstants>TRACE;NET20;</DefineConstants>
+    <SilverlightVersion Condition=" '$(SilverlightVersion)' == '' ">v2.0</SilverlightVersion>
+    <DefineConstants Condition=" '$(TargetFrameworkVersion)' == 'v2.0' ">NET20;</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
@@ -43,7 +44,7 @@
     <OutputPath>bin\Debug\</OutputPath>
     <OutputPath>bin\Debug\</OutputPath>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
-    <DefineConstants>$(DefineConstants)DEBUG</DefineConstants>
+    <DefineConstants>$(DefineConstants)TRACE;DEBUG</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <NoStdLib>true</NoStdLib>
     <NoStdLib>true</NoStdLib>
@@ -55,32 +56,32 @@
     <OutputPath>bin\Release\</OutputPath>
     <OutputPath>bin\Release\</OutputPath>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
-    <DefineConstants>$(DefineConstants)</DefineConstants>
+    <DefineConstants>$(DefineConstants)TRACE;</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <NoStdLib>true</NoStdLib>
     <NoStdLib>true</NoStdLib>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug_Silverlight2|AnyCPU'">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug_Silverlight|AnyCPU'">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
-    <OutputPath>bin\Debug_Silverlight2\</OutputPath>
+    <OutputPath>bin\Debug_Silverlight\</OutputPath>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
-    <DefineConstants>$(DefineConstants)DEBUG;SILVERLIGHT2</DefineConstants>
+    <DefineConstants>$(DefineConstants)TRACE;DEBUG;SILVERLIGHT2</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <NoStdLib>true</NoStdLib>
     <NoStdLib>true</NoStdLib>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_Silverlight2|AnyCPU'">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_Silverlight|AnyCPU'">
     <DebugType>pdbonly</DebugType>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
     <Optimize>true</Optimize>
-    <OutputPath>bin\Release_Silverlight2\</OutputPath>
+    <OutputPath>bin\Release_Silverlight\</OutputPath>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
-    <DefineConstants>$(DefineConstants)SILVERLIGHT2</DefineConstants>
+    <DefineConstants>$(DefineConstants)TRACE;SILVERLIGHT2</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <NoStdLib>true</NoStdLib>
     <NoStdLib>true</NoStdLib>
@@ -139,8 +140,8 @@
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Debug' " />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Debug' " />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Release' " />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Release' " />
-  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Debug_Silverlight2' " />
-  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Release_Silverlight2' " />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Debug_Silverlight' " />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Release_Silverlight' " />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
   <!-- 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.
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
   <Target Name="BeforeBuild">

+ 39 - 41
src/ProtocolBuffers.sln

@@ -1,6 +1,5 @@
 Microsoft Visual Studio Solution File, Format Version 11.00
 Microsoft Visual Studio Solution File, Format Version 11.00
 # Visual Studio 2010
 # Visual Studio 2010
-
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "proto", "proto", "{1F896D5C-5FC2-4671-9216-781CB8187EC7}"
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "proto", "proto", "{1F896D5C-5FC2-4671-9216-781CB8187EC7}"
 	ProjectSection(SolutionItems) = preProject
 	ProjectSection(SolutionItems) = preProject
 		..\protos\tutorial\addressbook.proto = ..\protos\tutorial\addressbook.proto
 		..\protos\tutorial\addressbook.proto = ..\protos\tutorial\addressbook.proto
@@ -20,8 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unittest", "unittest", "{C8
 		..\protos\google\protobuf\unittest_enormous_descriptor.proto = ..\protos\google\protobuf\unittest_enormous_descriptor.proto
 		..\protos\google\protobuf\unittest_enormous_descriptor.proto = ..\protos\google\protobuf\unittest_enormous_descriptor.proto
 		..\protos\extest\unittest_extras.proto = ..\protos\extest\unittest_extras.proto
 		..\protos\extest\unittest_extras.proto = ..\protos\extest\unittest_extras.proto
 		..\protos\extest\unittest_extras_full.proto = ..\protos\extest\unittest_extras_full.proto
 		..\protos\extest\unittest_extras_full.proto = ..\protos\extest\unittest_extras_full.proto
-		..\protos\extest\unittest_extras_xmltest.proto = ..\protos\extest\unittest_extras_xmltest.proto
 		..\protos\extest\unittest_extras_lite.proto = ..\protos\extest\unittest_extras_lite.proto
 		..\protos\extest\unittest_extras_lite.proto = ..\protos\extest\unittest_extras_lite.proto
+		..\protos\extest\unittest_extras_xmltest.proto = ..\protos\extest\unittest_extras_xmltest.proto
 		..\protos\extest\unittest_generic_services.proto = ..\protos\extest\unittest_generic_services.proto
 		..\protos\extest\unittest_generic_services.proto = ..\protos\extest\unittest_generic_services.proto
 		..\protos\google\protobuf\unittest_import.proto = ..\protos\google\protobuf\unittest_import.proto
 		..\protos\google\protobuf\unittest_import.proto = ..\protos\google\protobuf\unittest_import.proto
 		..\protos\google\protobuf\unittest_import_lite.proto = ..\protos\google\protobuf\unittest_import_lite.proto
 		..\protos\google\protobuf\unittest_import_lite.proto = ..\protos\google\protobuf\unittest_import_lite.proto
@@ -59,14 +58,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffersLiteMixed.Te
 EndProject
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{66ED1950-AD27-42D7-88F8-94355AEC8225}"
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{66ED1950-AD27-42D7-88F8-94355AEC8225}"
 	ProjectSection(SolutionItems) = preProject
 	ProjectSection(SolutionItems) = preProject
-		..\build\Build.bat = ..\build\Build.bat
 		..\build\build.csproj = ..\build\build.csproj
 		..\build\build.csproj = ..\build\build.csproj
+		..\build\Build20.bat = ..\build\Build20.bat
 		..\build\build35.bat = ..\build\build35.bat
 		..\build\build35.bat = ..\build\build35.bat
+		..\build\build40.bat = ..\build\build40.bat
 		..\build\BuildAll.bat = ..\build\BuildAll.bat
 		..\build\BuildAll.bat = ..\build\BuildAll.bat
 		..\build\BuildSilverlight2.bat = ..\build\BuildSilverlight2.bat
 		..\build\BuildSilverlight2.bat = ..\build\BuildSilverlight2.bat
 		..\build\Common.targets = ..\build\Common.targets
 		..\build\Common.targets = ..\build\Common.targets
-		..\build\GenerateCompletePackage.bat = ..\build\GenerateCompletePackage.bat
-		..\build\GenerateReleasePackage.bat = ..\build\GenerateReleasePackage.bat
 		..\build\Google.ProtocolBuffers.nuspec = ..\build\Google.ProtocolBuffers.nuspec
 		..\build\Google.ProtocolBuffers.nuspec = ..\build\Google.ProtocolBuffers.nuspec
 		..\build\Google.ProtocolBuffersLite.nuspec = ..\build\Google.ProtocolBuffersLite.nuspec
 		..\build\Google.ProtocolBuffersLite.nuspec = ..\build\Google.ProtocolBuffersLite.nuspec
 		..\build\PublishRelease.bat = ..\build\PublishRelease.bat
 		..\build\PublishRelease.bat = ..\build\PublishRelease.bat
@@ -79,96 +77,96 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffersLite.Seriali
 EndProject
 EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug_Silverlight2|Any CPU = Debug_Silverlight2|Any CPU
+		Debug_Silverlight|Any CPU = Debug_Silverlight|Any CPU
 		Debug|Any CPU = Debug|Any CPU
 		Debug|Any CPU = Debug|Any CPU
-		Release_Silverlight2|Any CPU = Release_Silverlight2|Any CPU
+		Release_Silverlight|Any CPU = Release_Silverlight|Any CPU
 		Release|Any CPU = Release|Any CPU
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug_Silverlight2|Any CPU
-		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.Build.0 = Debug_Silverlight2|Any CPU
+		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight|Any CPU.ActiveCfg = Debug_Silverlight|Any CPU
+		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight|Any CPU.Build.0 = Debug_Silverlight|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.ActiveCfg = Release_Silverlight2|Any CPU
-		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU
+		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight|Any CPU.ActiveCfg = Release_Silverlight|Any CPU
+		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight|Any CPU.Build.0 = Release_Silverlight|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU
-		{DD01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{DD01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{DD01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{DD01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
-		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release|Any CPU.Build.0 = Release|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release|Any CPU.Build.0 = Release|Any CPU
-		{C268DA4C-4004-47DA-AF23-44C983281A68}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{C268DA4C-4004-47DA-AF23-44C983281A68}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{C268DA4C-4004-47DA-AF23-44C983281A68}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{C268DA4C-4004-47DA-AF23-44C983281A68}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Release|Any CPU.Build.0 = Release|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Release|Any CPU.Build.0 = Release|Any CPU
-		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release|Any CPU.Build.0 = Release|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release|Any CPU.Build.0 = Release|Any CPU
-		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.Build.0 = Release|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.Build.0 = Release|Any CPU
-		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.Build.0 = Release|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.Build.0 = Release|Any CPU
-		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release|Any CPU.Build.0 = Release|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release|Any CPU.Build.0 = Release|Any CPU
-		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug_Silverlight2|Any CPU
-		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.Build.0 = Debug_Silverlight2|Any CPU
+		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight|Any CPU.ActiveCfg = Debug_Silverlight|Any CPU
+		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight|Any CPU.Build.0 = Debug_Silverlight|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.ActiveCfg = Release_Silverlight2|Any CPU
-		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU
+		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight|Any CPU.ActiveCfg = Release_Silverlight|Any CPU
+		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight|Any CPU.Build.0 = Release_Silverlight|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU
-		{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{EE01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{EE01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
-		{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{EEFFED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{EEFFED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
-		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug_Silverlight2|Any CPU
-		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug_Silverlight2|Any CPU.Build.0 = Debug_Silverlight2|Any CPU
+		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug_Silverlight|Any CPU.ActiveCfg = Debug_Silverlight|Any CPU
+		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug_Silverlight|Any CPU.Build.0 = Debug_Silverlight|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{231391AF-449C-4A39-986C-AD7F270F4750}.Release_Silverlight2|Any CPU.ActiveCfg = Release_Silverlight2|Any CPU
-		{231391AF-449C-4A39-986C-AD7F270F4750}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU
+		{231391AF-449C-4A39-986C-AD7F270F4750}.Release_Silverlight|Any CPU.ActiveCfg = Release_Silverlight|Any CPU
+		{231391AF-449C-4A39-986C-AD7F270F4750}.Release_Silverlight|Any CPU.Build.0 = Release_Silverlight|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Release|Any CPU.Build.0 = Release|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Release|Any CPU.Build.0 = Release|Any CPU
-		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug_Silverlight2|Any CPU
-		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug_Silverlight2|Any CPU.Build.0 = Debug_Silverlight2|Any CPU
+		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug_Silverlight|Any CPU.ActiveCfg = Debug_Silverlight|Any CPU
+		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug_Silverlight|Any CPU.Build.0 = Debug_Silverlight|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release_Silverlight2|Any CPU.ActiveCfg = Release_Silverlight2|Any CPU
-		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU
+		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release_Silverlight|Any CPU.ActiveCfg = Release_Silverlight|Any CPU
+		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release_Silverlight|Any CPU.Build.0 = Release_Silverlight|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release|Any CPU.Build.0 = Release|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	EndGlobalSection

+ 7 - 6
src/ProtocolBuffers/ProtocolBuffers.csproj

@@ -34,6 +34,7 @@
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <UseApplicationTrust>false</UseApplicationTrust>
     <UseApplicationTrust>false</UseApplicationTrust>
     <BootstrapperEnabled>true</BootstrapperEnabled>
     <BootstrapperEnabled>true</BootstrapperEnabled>
+    <SilverlightVersion Condition=" '$(SilverlightVersion)' == '' ">v2.0</SilverlightVersion>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
@@ -60,11 +61,11 @@
     <NoStdLib>true</NoStdLib>
     <NoStdLib>true</NoStdLib>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug_Silverlight2|AnyCPU'">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug_Silverlight|AnyCPU'">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
-    <OutputPath>bin\Debug_Silverlight2\</OutputPath>
+    <OutputPath>bin\Debug_Silverlight\</OutputPath>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <DefineConstants>DEBUG;TRACE;SILVERLIGHT2</DefineConstants>
     <DefineConstants>DEBUG;TRACE;SILVERLIGHT2</DefineConstants>
@@ -73,10 +74,10 @@
     <NoStdLib>true</NoStdLib>
     <NoStdLib>true</NoStdLib>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_Silverlight2|AnyCPU'">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_Silverlight|AnyCPU'">
     <DebugType>pdbonly</DebugType>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
     <Optimize>true</Optimize>
-    <OutputPath>bin\Release_Silverlight2\</OutputPath>
+    <OutputPath>bin\Release_Silverlight\</OutputPath>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <DefineConstants>TRACE;SILVERLIGHT2</DefineConstants>
     <DefineConstants>TRACE;SILVERLIGHT2</DefineConstants>
@@ -211,8 +212,8 @@
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Debug' " />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Debug' " />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Release' " />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Release' " />
-  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Debug_Silverlight2' " />
-  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Release_Silverlight2' " />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Debug_Silverlight' " />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Release_Silverlight' " />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
   <!-- 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.
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
   <Target Name="BeforeBuild">

+ 9 - 7
src/ProtocolBuffers/ProtocolBuffersLite.csproj

@@ -18,6 +18,7 @@
     </FileUpgradeFlags>
     </FileUpgradeFlags>
     <OldToolsVersion>3.5</OldToolsVersion>
     <OldToolsVersion>3.5</OldToolsVersion>
     <UpgradeBackupLocation />
     <UpgradeBackupLocation />
+    <SilverlightVersion Condition=" '$(SilverlightVersion)' == '' ">v2.0</SilverlightVersion>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
@@ -42,11 +43,11 @@
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
     <NoStdLib>true</NoStdLib>
     <NoStdLib>true</NoStdLib>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug_Silverlight2|AnyCPU'">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug_Silverlight|AnyCPU'">
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
-    <OutputPath>bin\Debug_Silverlight2\</OutputPath>
+    <OutputPath>bin\Debug_Silverlight\</OutputPath>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <DefineConstants>DEBUG;TRACE;SILVERLIGHT2;LITE</DefineConstants>
     <DefineConstants>DEBUG;TRACE;SILVERLIGHT2;LITE</DefineConstants>
@@ -55,10 +56,10 @@
     <NoStdLib>true</NoStdLib>
     <NoStdLib>true</NoStdLib>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_Silverlight2|AnyCPU'">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_Silverlight|AnyCPU'">
     <DebugType>pdbonly</DebugType>
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
     <Optimize>true</Optimize>
-    <OutputPath>bin\Release_Silverlight2\</OutputPath>
+    <OutputPath>bin\Release_Silverlight\</OutputPath>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <NoWarn>1591, 1570, 1571, 1572, 1573, 1574</NoWarn>
     <DefineConstants>TRACE;SILVERLIGHT2;LITE</DefineConstants>
     <DefineConstants>TRACE;SILVERLIGHT2;LITE</DefineConstants>
@@ -70,7 +71,6 @@
   <ItemGroup>
   <ItemGroup>
     <Reference Include="mscorlib" />
     <Reference Include="mscorlib" />
     <Reference Include="System" />
     <Reference Include="System" />
-    <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
     <Reference Include="System.Xml" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
@@ -115,8 +115,10 @@
     <Compile Include="UninitializedMessageException.cs" />
     <Compile Include="UninitializedMessageException.cs" />
     <Compile Include="WireFormat.cs" />
     <Compile Include="WireFormat.cs" />
   </ItemGroup>
   </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' != 'Silverlight2' " />
-  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\v2.0\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Silverlight2' " />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Debug' " />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" Condition=" '$(Configuration)' == 'Release' " />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Debug_Silverlight' " />
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" Condition=" '$(Configuration)' == 'Release_Silverlight' " />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
   <!-- 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.
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">
   <Target Name="BeforeBuild">

+ 39 - 41
src/ProtocolBuffers2008.sln

@@ -1,6 +1,5 @@
 Microsoft Visual Studio Solution File, Format Version 10.00
 Microsoft Visual Studio Solution File, Format Version 10.00
 # Visual Studio 2008
 # Visual Studio 2008
-
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "proto", "proto", "{1F896D5C-5FC2-4671-9216-781CB8187EC7}"
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "proto", "proto", "{1F896D5C-5FC2-4671-9216-781CB8187EC7}"
 	ProjectSection(SolutionItems) = preProject
 	ProjectSection(SolutionItems) = preProject
 		..\protos\tutorial\addressbook.proto = ..\protos\tutorial\addressbook.proto
 		..\protos\tutorial\addressbook.proto = ..\protos\tutorial\addressbook.proto
@@ -20,8 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unittest", "unittest", "{C8
 		..\protos\google\protobuf\unittest_enormous_descriptor.proto = ..\protos\google\protobuf\unittest_enormous_descriptor.proto
 		..\protos\google\protobuf\unittest_enormous_descriptor.proto = ..\protos\google\protobuf\unittest_enormous_descriptor.proto
 		..\protos\extest\unittest_extras.proto = ..\protos\extest\unittest_extras.proto
 		..\protos\extest\unittest_extras.proto = ..\protos\extest\unittest_extras.proto
 		..\protos\extest\unittest_extras_full.proto = ..\protos\extest\unittest_extras_full.proto
 		..\protos\extest\unittest_extras_full.proto = ..\protos\extest\unittest_extras_full.proto
-		..\protos\extest\unittest_extras_xmltest.proto = ..\protos\extest\unittest_extras_xmltest.proto
 		..\protos\extest\unittest_extras_lite.proto = ..\protos\extest\unittest_extras_lite.proto
 		..\protos\extest\unittest_extras_lite.proto = ..\protos\extest\unittest_extras_lite.proto
+		..\protos\extest\unittest_extras_xmltest.proto = ..\protos\extest\unittest_extras_xmltest.proto
 		..\protos\extest\unittest_generic_services.proto = ..\protos\extest\unittest_generic_services.proto
 		..\protos\extest\unittest_generic_services.proto = ..\protos\extest\unittest_generic_services.proto
 		..\protos\google\protobuf\unittest_import.proto = ..\protos\google\protobuf\unittest_import.proto
 		..\protos\google\protobuf\unittest_import.proto = ..\protos\google\protobuf\unittest_import.proto
 		..\protos\google\protobuf\unittest_import_lite.proto = ..\protos\google\protobuf\unittest_import_lite.proto
 		..\protos\google\protobuf\unittest_import_lite.proto = ..\protos\google\protobuf\unittest_import_lite.proto
@@ -59,14 +58,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffersLiteMixed.Te
 EndProject
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{66ED1950-AD27-42D7-88F8-94355AEC8225}"
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{66ED1950-AD27-42D7-88F8-94355AEC8225}"
 	ProjectSection(SolutionItems) = preProject
 	ProjectSection(SolutionItems) = preProject
-		..\build\Build.bat = ..\build\Build.bat
 		..\build\build.csproj = ..\build\build.csproj
 		..\build\build.csproj = ..\build\build.csproj
+		..\build\Build20.bat = ..\build\Build20.bat
 		..\build\build35.bat = ..\build\build35.bat
 		..\build\build35.bat = ..\build\build35.bat
+		..\build\build40.bat = ..\build\build40.bat
 		..\build\BuildAll.bat = ..\build\BuildAll.bat
 		..\build\BuildAll.bat = ..\build\BuildAll.bat
 		..\build\BuildSilverlight2.bat = ..\build\BuildSilverlight2.bat
 		..\build\BuildSilverlight2.bat = ..\build\BuildSilverlight2.bat
 		..\build\Common.targets = ..\build\Common.targets
 		..\build\Common.targets = ..\build\Common.targets
-		..\build\GenerateCompletePackage.bat = ..\build\GenerateCompletePackage.bat
-		..\build\GenerateReleasePackage.bat = ..\build\GenerateReleasePackage.bat
 		..\build\Google.ProtocolBuffers.nuspec = ..\build\Google.ProtocolBuffers.nuspec
 		..\build\Google.ProtocolBuffers.nuspec = ..\build\Google.ProtocolBuffers.nuspec
 		..\build\Google.ProtocolBuffersLite.nuspec = ..\build\Google.ProtocolBuffersLite.nuspec
 		..\build\Google.ProtocolBuffersLite.nuspec = ..\build\Google.ProtocolBuffersLite.nuspec
 		..\build\PublishRelease.bat = ..\build\PublishRelease.bat
 		..\build\PublishRelease.bat = ..\build\PublishRelease.bat
@@ -79,96 +77,96 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProtocolBuffersLite.Seriali
 EndProject
 EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug_Silverlight2|Any CPU = Debug_Silverlight2|Any CPU
+		Debug_Silverlight|Any CPU = Debug_Silverlight|Any CPU
 		Debug|Any CPU = Debug|Any CPU
 		Debug|Any CPU = Debug|Any CPU
-		Release_Silverlight2|Any CPU = Release_Silverlight2|Any CPU
+		Release_Silverlight|Any CPU = Release_Silverlight|Any CPU
 		Release|Any CPU = Release|Any CPU
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug_Silverlight2|Any CPU
-		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.Build.0 = Debug_Silverlight2|Any CPU
+		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight|Any CPU.ActiveCfg = Debug_Silverlight|Any CPU
+		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight|Any CPU.Build.0 = Debug_Silverlight|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.ActiveCfg = Release_Silverlight2|Any CPU
-		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU
+		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight|Any CPU.ActiveCfg = Release_Silverlight|Any CPU
+		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight|Any CPU.Build.0 = Release_Silverlight|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU
 		{6908BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU
-		{DD01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{DD01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{DD01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{DD01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
 		{DD01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
-		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release|Any CPU.Build.0 = Release|Any CPU
 		{250ADE34-82FD-4BAE-86D5-985FBE589C4A}.Release|Any CPU.Build.0 = Release|Any CPU
-		{C268DA4C-4004-47DA-AF23-44C983281A68}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{C268DA4C-4004-47DA-AF23-44C983281A68}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{C268DA4C-4004-47DA-AF23-44C983281A68}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{C268DA4C-4004-47DA-AF23-44C983281A68}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Release|Any CPU.Build.0 = Release|Any CPU
 		{C268DA4C-4004-47DA-AF23-44C983281A68}.Release|Any CPU.Build.0 = Release|Any CPU
-		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release|Any CPU.Build.0 = Release|Any CPU
 		{A31F5FB2-4FF3-432A-B35B-5CD203606311}.Release|Any CPU.Build.0 = Release|Any CPU
-		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.Build.0 = Release|Any CPU
 		{8F09AF72-3327-4FA7-BC09-070B80221AB9}.Release|Any CPU.Build.0 = Release|Any CPU
-		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.Build.0 = Release|Any CPU
 		{C7A4A435-2813-41C8-AA87-BD914BA5223D}.Release|Any CPU.Build.0 = Release|Any CPU
-		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release|Any CPU.Build.0 = Release|Any CPU
 		{D7282E99-2DC3-405B-946F-177DB2FD2AE2}.Release|Any CPU.Build.0 = Release|Any CPU
-		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug_Silverlight2|Any CPU
-		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight2|Any CPU.Build.0 = Debug_Silverlight2|Any CPU
+		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight|Any CPU.ActiveCfg = Debug_Silverlight|Any CPU
+		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug_Silverlight|Any CPU.Build.0 = Debug_Silverlight|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.ActiveCfg = Release_Silverlight2|Any CPU
-		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU
+		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight|Any CPU.ActiveCfg = Release_Silverlight|Any CPU
+		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release_Silverlight|Any CPU.Build.0 = Release_Silverlight|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU
 		{6969BDCE-D925-43F3-94AC-A531E6DF2591}.Release|Any CPU.Build.0 = Release|Any CPU
-		{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{EE01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{EE01ED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
 		{EE01ED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
-		{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug|Any CPU
+		{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug_Silverlight|Any CPU.ActiveCfg = Debug|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{EEFFED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight2|Any CPU.ActiveCfg = Release|Any CPU
+		{EEFFED24-3750-4567-9A23-1DB676A15610}.Release_Silverlight|Any CPU.ActiveCfg = Release|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
 		{EEFFED24-3750-4567-9A23-1DB676A15610}.Release|Any CPU.Build.0 = Release|Any CPU
-		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug_Silverlight2|Any CPU
-		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug_Silverlight2|Any CPU.Build.0 = Debug_Silverlight2|Any CPU
+		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug_Silverlight|Any CPU.ActiveCfg = Debug_Silverlight|Any CPU
+		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug_Silverlight|Any CPU.Build.0 = Debug_Silverlight|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{231391AF-449C-4A39-986C-AD7F270F4750}.Release_Silverlight2|Any CPU.ActiveCfg = Release_Silverlight2|Any CPU
-		{231391AF-449C-4A39-986C-AD7F270F4750}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU
+		{231391AF-449C-4A39-986C-AD7F270F4750}.Release_Silverlight|Any CPU.ActiveCfg = Release_Silverlight|Any CPU
+		{231391AF-449C-4A39-986C-AD7F270F4750}.Release_Silverlight|Any CPU.Build.0 = Release_Silverlight|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Release|Any CPU.Build.0 = Release|Any CPU
 		{231391AF-449C-4A39-986C-AD7F270F4750}.Release|Any CPU.Build.0 = Release|Any CPU
-		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug_Silverlight2|Any CPU.ActiveCfg = Debug_Silverlight2|Any CPU
-		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug_Silverlight2|Any CPU.Build.0 = Debug_Silverlight2|Any CPU
+		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug_Silverlight|Any CPU.ActiveCfg = Debug_Silverlight|Any CPU
+		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug_Silverlight|Any CPU.Build.0 = Debug_Silverlight|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release_Silverlight2|Any CPU.ActiveCfg = Release_Silverlight2|Any CPU
-		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release_Silverlight2|Any CPU.Build.0 = Release_Silverlight2|Any CPU
+		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release_Silverlight|Any CPU.ActiveCfg = Release_Silverlight|Any CPU
+		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release_Silverlight|Any CPU.Build.0 = Release_Silverlight|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release|Any CPU.Build.0 = Release|Any CPU
 		{E067A59D-9D0A-4A1F-92B1-38E4457241D1}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	EndGlobalSection