aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml12
-rw-r--r--Makefile.am26
-rw-r--r--appveyor.bat9
-rw-r--r--appveyor.yml6
-rw-r--r--conformance/Makefile.am2
-rw-r--r--csharp/.gitignore21
-rw-r--r--csharp/build_packages.bat7
-rwxr-xr-xcsharp/buildall.sh15
-rw-r--r--csharp/src/AddressBook/AddressBook.csproj75
-rw-r--r--csharp/src/AddressBook/AddressBook.xproj19
-rw-r--r--csharp/src/AddressBook/Properties/AssemblyInfo.cs18
-rw-r--r--csharp/src/AddressBook/SampleUsage.cs2
-rw-r--r--csharp/src/AddressBook/app.config3
-rw-r--r--csharp/src/AddressBook/project.json20
-rw-r--r--csharp/src/Google.Protobuf.Conformance/App.config6
-rw-r--r--csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.csproj61
-rw-r--r--csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.xproj19
-rw-r--r--csharp/src/Google.Protobuf.Conformance/Properties/AssemblyInfo.cs48
-rw-r--r--csharp/src/Google.Protobuf.Conformance/project.json19
-rw-r--r--csharp/src/Google.Protobuf.JsonDump/Google.Protobuf.JsonDump.csproj68
-rw-r--r--csharp/src/Google.Protobuf.JsonDump/Google.Protobuf.JsonDump.xproj19
-rw-r--r--csharp/src/Google.Protobuf.JsonDump/Program.cs3
-rw-r--r--csharp/src/Google.Protobuf.JsonDump/Properties/AssemblyInfo.cs19
-rw-r--r--csharp/src/Google.Protobuf.JsonDump/app.config3
-rw-r--r--csharp/src/Google.Protobuf.JsonDump/project.json19
-rw-r--r--csharp/src/Google.Protobuf.Test/FieldCodecTest.cs3
-rw-r--r--csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj143
-rw-r--r--csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.xproj19
-rw-r--r--csharp/src/Google.Protobuf.Test/Properties/AppManifest.xml6
-rw-r--r--csharp/src/Google.Protobuf.Test/Properties/AssemblyInfo.cs20
-rw-r--r--csharp/src/Google.Protobuf.Test/WellKnownTypes/AnyTest.cs2
-rw-r--r--csharp/src/Google.Protobuf.Test/WellKnownTypes/FieldMaskTest.cs4
-rw-r--r--csharp/src/Google.Protobuf.Test/packages.config5
-rw-r--r--csharp/src/Google.Protobuf.Test/project.json44
-rw-r--r--csharp/src/Google.Protobuf.sln65
-rw-r--r--csharp/src/Google.Protobuf/Google.Protobuf.csproj168
-rw-r--r--csharp/src/Google.Protobuf/Google.Protobuf.nuspec54
-rw-r--r--csharp/src/Google.Protobuf/Google.Protobuf.xproj19
-rw-r--r--csharp/src/Google.Protobuf/Properties/AssemblyInfo.cs18
-rw-r--r--csharp/src/Google.Protobuf/packages.config4
-rw-r--r--csharp/src/Google.Protobuf/project.json65
-rw-r--r--jenkins/docker/Dockerfile7
-rwxr-xr-xtests.sh20
43 files changed, 367 insertions, 818 deletions
diff --git a/.travis.yml b/.travis.yml
index 46abbb9e..7cfe0dfb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,7 +14,6 @@ script:
env:
- CONFIG=cpp
- CONFIG=cpp_distcheck
- - CONFIG=csharp
- CONFIG=golang
- CONFIG=java_jdk6
- CONFIG=java_jdk7
@@ -52,10 +51,6 @@ matrix:
env: CONFIG=javanano_jdk7
- os: osx
env: CONFIG=javanano_oracle7
- # Requires installing mono, currently travis.sh is doing that with apt-get
- # which doesn't work on OS X.
- - os: osx
- env: CONFIG=csharp
# Requires installing golang, currently travis.sh is doing that with apt-get
# which doesn't work on OS X.
- os: osx
@@ -70,6 +65,13 @@ matrix:
env: CONFIG=objectivec_osx
- os: linux
env: CONFIG=objectivec_cocoapods_integration
+ # The dotnet environment requires Ubuntu 14.04 or 16.04. This
+ # configuration is effectively an "extra" one, outside the
+ # autogenerated matrix.
+ include:
+ - os: linux
+ env: CONFIG=csharp
+ dist: trusty
allow_failures:
# These currently do not work on OS X but are being worked on by @haberman.
- os: osx
diff --git a/Makefile.am b/Makefile.am
index 72cc9149..80df3358 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -59,22 +59,19 @@ csharp_EXTRA_DIST= \
csharp/keys/README.md \
csharp/protos/unittest_issues.proto \
csharp/src/AddressBook/AddPerson.cs \
- csharp/src/AddressBook/AddressBook.csproj \
csharp/src/AddressBook/Addressbook.cs \
+ csharp/src/AddressBook/AddressBook.xproj \
csharp/src/AddressBook/ListPeople.cs \
csharp/src/AddressBook/Program.cs \
- csharp/src/AddressBook/Properties/AssemblyInfo.cs \
csharp/src/AddressBook/SampleUsage.cs \
- csharp/src/AddressBook/app.config \
- csharp/src/Google.Protobuf.Conformance/App.config \
+ csharp/src/AddressBook/project.json \
csharp/src/Google.Protobuf.Conformance/Conformance.cs \
- csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.csproj \
+ csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.xproj \
csharp/src/Google.Protobuf.Conformance/Program.cs \
- csharp/src/Google.Protobuf.Conformance/Properties/AssemblyInfo.cs \
- csharp/src/Google.Protobuf.JsonDump/Google.Protobuf.JsonDump.csproj \
+ csharp/src/Google.Protobuf.Conformance/project.json \
+ csharp/src/Google.Protobuf.JsonDump/Google.Protobuf.JsonDump.xproj \
csharp/src/Google.Protobuf.JsonDump/Program.cs \
- csharp/src/Google.Protobuf.JsonDump/Properties/AssemblyInfo.cs \
- csharp/src/Google.Protobuf.JsonDump/app.config \
+ csharp/src/Google.Protobuf.JsonDump/project.json \
csharp/src/Google.Protobuf.Test/ByteStringTest.cs \
csharp/src/Google.Protobuf.Test/CodedInputStreamExtensions.cs \
csharp/src/Google.Protobuf.Test/CodedInputStreamTest.cs \
@@ -87,13 +84,11 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf.Test/EqualityTester.cs \
csharp/src/Google.Protobuf.Test/FieldCodecTest.cs \
csharp/src/Google.Protobuf.Test/GeneratedMessageTest.cs \
- csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj \
+ csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.xproj \
csharp/src/Google.Protobuf.Test/IssuesTest.cs \
csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs \
csharp/src/Google.Protobuf.Test/JsonParserTest.cs \
csharp/src/Google.Protobuf.Test/JsonTokenizerTest.cs \
- csharp/src/Google.Protobuf.Test/Properties/AppManifest.xml \
- csharp/src/Google.Protobuf.Test/Properties/AssemblyInfo.cs \
csharp/src/Google.Protobuf.Test/Reflection/DescriptorsTest.cs \
csharp/src/Google.Protobuf.Test/Reflection/FieldAccessTest.cs \
csharp/src/Google.Protobuf.Test/Reflection/TypeRegistryTest.cs \
@@ -110,7 +105,7 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf.Test/WellKnownTypes/DurationTest.cs \
csharp/src/Google.Protobuf.Test/WellKnownTypes/TimestampTest.cs \
csharp/src/Google.Protobuf.Test/WellKnownTypes/WrappersTest.cs \
- csharp/src/Google.Protobuf.Test/packages.config \
+ csharp/src/Google.Protobuf.Test/project.json \
csharp/src/Google.Protobuf.sln \
csharp/src/Google.Protobuf/ByteArray.cs \
csharp/src/Google.Protobuf/ByteString.cs \
@@ -124,8 +119,7 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf/Compatibility/TypeExtensions.cs \
csharp/src/Google.Protobuf/FieldCodec.cs \
csharp/src/Google.Protobuf/FrameworkPortability.cs \
- csharp/src/Google.Protobuf/Google.Protobuf.csproj \
- csharp/src/Google.Protobuf/Google.Protobuf.nuspec \
+ csharp/src/Google.Protobuf/Google.Protobuf.xproj \
csharp/src/Google.Protobuf/IDeepCloneable.cs \
csharp/src/Google.Protobuf/IMessage.cs \
csharp/src/Google.Protobuf/InvalidJsonException.cs \
@@ -183,7 +177,7 @@ csharp_EXTRA_DIST= \
csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs \
csharp/src/Google.Protobuf/WellKnownTypes/WrappersPartial.cs \
csharp/src/Google.Protobuf/WireFormat.cs \
- csharp/src/Google.Protobuf/packages.config \
+ csharp/src/Google.Protobuf/project.json \
csharp/src/packages/repositories.config
java_EXTRA_DIST= \
diff --git a/appveyor.bat b/appveyor.bat
index 9a46b928..0e6dd520 100644
--- a/appveyor.bat
+++ b/appveyor.bat
@@ -19,9 +19,12 @@ goto :EOF
:build_csharp
echo Building C#
cd csharp\src
-nuget restore
-msbuild Google.Protobuf.sln /p:Platform="Any CPU" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" || goto error
-nunit-console Google.Protobuf.Test\bin\%configuration%\Google.Protobuf.Test.dll || goto error
+dotnet restore
+dotnet build -c %configuration% Google.Protobuf Google.Protobuf.Test Google.Protobuf.Conformance || goto error
+
+echo Testing C#
+dotnet test -c %configuration% Google.Protobuf.Test || goto error
+
goto :EOF
:error
diff --git a/appveyor.yml b/appveyor.yml
index c84ecae2..ce797c69 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -14,10 +14,16 @@ environment:
- language: csharp
+# Our build scripts run tests automatically; we don't want AppVeyor
+# to try to detect them itself.
+test: off
+
install:
- ps: Start-FileDownload https://googlemock.googlecode.com/files/gmock-1.7.0.zip
- 7z x gmock-1.7.0.zip
- rename gmock-1.7.0 gmock
+ - ps: Start-FileDownload https://go.microsoft.com/fwlink/?LinkID=809122 -FileName dotnetsdk.exe
+ - dotnetsdk.exe /install /quiet /norestart
before_build:
- if %platform%==Win32 set generator=Visual Studio 12
diff --git a/conformance/Makefile.am b/conformance/Makefile.am
index 5538cc75..78be9c8a 100644
--- a/conformance/Makefile.am
+++ b/conformance/Makefile.am
@@ -246,7 +246,7 @@ conformance-java-lite: javac_middleman_lite
conformance-csharp: $(other_language_protoc_outputs)
@echo "Writing shortcut script conformance-csharp..."
@echo '#! /bin/sh' > conformance-csharp
- @echo 'mono ../csharp/src/Google.Protobuf.Conformance/bin/Release/Google.Protobuf.Conformance.exe "$$@"' >> conformance-csharp
+ @echo 'dotnet ../csharp/src/Google.Protobuf.Conformance/bin/Release/netcoreapp1.0/Google.Protobuf.Conformance.dll "$$@"' >> conformance-csharp
@chmod +x conformance-csharp
# Targets for actually running tests.
diff --git a/csharp/.gitignore b/csharp/.gitignore
index c88f741e..8ba88499 100644
--- a/csharp/.gitignore
+++ b/csharp/.gitignore
@@ -1,16 +1,10 @@
-#
-# Untracked directories
-#
-src/AddressBook/bin
-src/AddressBook/obj
-src/Google.Protobuf/bin/
-src/Google.Protobuf/obj/
-src/Google.Protobuf.Conformance/bin/
-src/Google.Protobuf.Conformance/obj/
-src/Google.Protobuf.Test/bin/
-src/Google.Protobuf.Test/obj/
-src/Google.Protobuf.JsonDump/bin/
-src/Google.Protobuf.JsonDump/obj/
+# Output
+bin
+obj
+project.lock.json
+TestResult.xml
+
+# Possibly legacy now?
mono/bin
mono/tmp
mono/protoc
@@ -23,6 +17,7 @@ lib/NUnit
#
# Untracked files
#
+.vs
*.user
*.suo
*.nupkg
diff --git a/csharp/build_packages.bat b/csharp/build_packages.bat
index 1502f063..37732e7c 100644
--- a/csharp/build_packages.bat
+++ b/csharp/build_packages.bat
@@ -1,10 +1,7 @@
@rem Builds Google.Protobuf NuGet packages
-@rem Adjust the location of nuget.exe
-set NUGET=C:\nuget\nuget.exe
-
-@rem Build src/Google.Protobuf.sln solution in Release configuration first.
-%NUGET% pack src\Google.Protobuf\Google.Protobuf.nuspec -Symbols || goto :error
+dotnet restore src
+dotnet pack -c Release src\Google.Protobuf || goto :error
goto :EOF
diff --git a/csharp/buildall.sh b/csharp/buildall.sh
index 45af705f..cab32229 100755
--- a/csharp/buildall.sh
+++ b/csharp/buildall.sh
@@ -1,17 +1,16 @@
#!/bin/bash
-# Use mono to build solution and run all tests.
-# Adjust these to reflect the location of nunit-console in your system.
-NUNIT_CONSOLE=nunit-console
-
-# The rest you can leave intact
CONFIG=Release
SRC=$(dirname $0)/src
set -ex
-echo Building the solution.
-xbuild /p:Configuration=$CONFIG $SRC/Google.Protobuf.sln
+echo Building relevant projects.
+dotnet build -c $CONFIG $SRC/Google.Protobuf $SRC/Google.Protobuf.Test $SRC/Google.Protobuf.Conformance
echo Running tests.
-$NUNIT_CONSOLE $SRC/Google.Protobuf.Test/bin/$CONFIG/Google.Protobuf.Test.dll
+# Only test netcoreapp1.0, which uses the .NET Core runtime.
+# If we want to test the .NET 4.5 version separately, we could
+# run Mono explicitly. However, we don't have any differences between
+# the .NET 4.5 and netstandard1.0 assemblies.
+dotnet test -c $CONFIG -f netcoreapp1.0 $SRC/Google.Protobuf.Test
diff --git a/csharp/src/AddressBook/AddressBook.csproj b/csharp/src/AddressBook/AddressBook.csproj
deleted file mode 100644
index 8f8ca7e2..00000000
--- a/csharp/src/AddressBook/AddressBook.csproj
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{A31F5FB2-4FF3-432A-B35B-5CD203606311}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.Protobuf.Examples.AddressBook</RootNamespace>
- <AssemblyName>AddressBook</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <StartupObject>Google.Protobuf.Examples.AddressBook.Program</StartupObject>
- <TargetFrameworkProfile>
- </TargetFrameworkProfile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
- <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="AddPerson.cs" />
- <Compile Include="Addressbook.cs" />
- <Compile Include="SampleUsage.cs" />
- <Compile Include="ListPeople.cs" />
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Google.Protobuf\Google.Protobuf.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>Google.Protobuf</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="app.config" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/csharp/src/AddressBook/AddressBook.xproj b/csharp/src/AddressBook/AddressBook.xproj
new file mode 100644
index 00000000..4c9925e8
--- /dev/null
+++ b/csharp/src/AddressBook/AddressBook.xproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>afb63919-1e05-43b4-802a-8fb8c9b2f463</ProjectGuid>
+ <RootNamespace>AddressBook</RootNamespace>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
+ <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <SchemaVersion>2.0</SchemaVersion>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
+</Project> \ No newline at end of file
diff --git a/csharp/src/AddressBook/Properties/AssemblyInfo.cs b/csharp/src/AddressBook/Properties/AssemblyInfo.cs
deleted file mode 100644
index 9cb014c0..00000000
--- a/csharp/src/AddressBook/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("AddressBook")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("AddressBook")]
-[assembly: AssemblyCopyright("Copyright © 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-[assembly: AssemblyVersion("3.0.0.0")]
-[assembly: AssemblyFileVersion("3.0.0.0")]
diff --git a/csharp/src/AddressBook/SampleUsage.cs b/csharp/src/AddressBook/SampleUsage.cs
index aaaedda4..941d865a 100644
--- a/csharp/src/AddressBook/SampleUsage.cs
+++ b/csharp/src/AddressBook/SampleUsage.cs
@@ -66,7 +66,7 @@ namespace Google.Protobuf.Examples.AddressBook
// The message performs a deep-comparison on equality:
if (restored.People.Count != 1 || !person.Equals(restored.People[0]))
{
- throw new ApplicationException("There is a bad person in here!");
+ throw new Exception("There is a bad person in here!");
}
}
}
diff --git a/csharp/src/AddressBook/app.config b/csharp/src/AddressBook/app.config
deleted file mode 100644
index a80813af..00000000
--- a/csharp/src/AddressBook/app.config
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0"?>
-<configuration>
- <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
diff --git a/csharp/src/AddressBook/project.json b/csharp/src/AddressBook/project.json
new file mode 100644
index 00000000..c500bdc2
--- /dev/null
+++ b/csharp/src/AddressBook/project.json
@@ -0,0 +1,20 @@
+{
+ "buildOptions": {
+ "debugType": "portable",
+ "emitEntryPoint": true,
+ "additionalArguments": [ "/main:Google.Protobuf.Examples.AddressBook.Program" ]
+ },
+ "dependencies": {
+ "Google.Protobuf": { "target": "project" }
+ },
+ "frameworks": {
+ "netcoreapp1.0": {
+ "dependencies": {
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
+ }
+ }
+ }
+}
diff --git a/csharp/src/Google.Protobuf.Conformance/App.config b/csharp/src/Google.Protobuf.Conformance/App.config
deleted file mode 100644
index 8e156463..00000000
--- a/csharp/src/Google.Protobuf.Conformance/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
- <startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
- </startup>
-</configuration> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.csproj b/csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.csproj
deleted file mode 100644
index 82f728d1..00000000
--- a/csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.csproj
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{0607D1B8-80D6-4B35-9857-1263C1B32B94}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.Protobuf.Conformance</RootNamespace>
- <AssemblyName>Google.Protobuf.Conformance</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="Microsoft.CSharp" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Conformance.cs" />
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Google.Protobuf\Google.Protobuf.csproj">
- <Project>{6908bdce-d925-43f3-94ac-a531e6df2591}</Project>
- <Name>Google.Protobuf</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.xproj b/csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.xproj
new file mode 100644
index 00000000..99ff1465
--- /dev/null
+++ b/csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.xproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>dddc055b-e185-4181-bab0-072f0f984569</ProjectGuid>
+ <RootNamespace>Google.Protobuf.Conformance</RootNamespace>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
+ <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <SchemaVersion>2.0</SchemaVersion>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
+</Project> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf.Conformance/Properties/AssemblyInfo.cs b/csharp/src/Google.Protobuf.Conformance/Properties/AssemblyInfo.cs
deleted file mode 100644
index d22e90fd..00000000
--- a/csharp/src/Google.Protobuf.Conformance/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-#region Copyright notice and license
-// Protocol Buffers - Google's data interchange format
-// Copyright 2015 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#endregion
-
-using System.Reflection;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Google.Protobuf.Conformance")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Google.Protobuf.Conformance")]
-[assembly: AssemblyCopyright("Copyright © 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-[assembly: AssemblyVersion("3.0.0.0")]
-[assembly: AssemblyFileVersion("3.0.0.0")]
diff --git a/csharp/src/Google.Protobuf.Conformance/project.json b/csharp/src/Google.Protobuf.Conformance/project.json
new file mode 100644
index 00000000..84b23c45
--- /dev/null
+++ b/csharp/src/Google.Protobuf.Conformance/project.json
@@ -0,0 +1,19 @@
+{
+ "buildOptions": {
+ "debugType": "portable",
+ "emitEntryPoint": true
+ },
+ "dependencies": {
+ "Google.Protobuf": { "target": "project" }
+ },
+ "frameworks": {
+ "netcoreapp1.0": {
+ "dependencies": {
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
+ }
+ }
+ }
+}
diff --git a/csharp/src/Google.Protobuf.JsonDump/Google.Protobuf.JsonDump.csproj b/csharp/src/Google.Protobuf.JsonDump/Google.Protobuf.JsonDump.csproj
deleted file mode 100644
index ede1f778..00000000
--- a/csharp/src/Google.Protobuf.JsonDump/Google.Protobuf.JsonDump.csproj
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{D7282E99-2DC3-405B-946F-177DB2FD2AE2}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.Protobuf.JsonDump</RootNamespace>
- <AssemblyName>Google.Protobuf.JsonDump</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <TargetFrameworkProfile>
- </TargetFrameworkProfile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
- <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Google.Protobuf\Google.Protobuf.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>Google.Protobuf</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="app.config" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf.JsonDump/Google.Protobuf.JsonDump.xproj b/csharp/src/Google.Protobuf.JsonDump/Google.Protobuf.JsonDump.xproj
new file mode 100644
index 00000000..27095be5
--- /dev/null
+++ b/csharp/src/Google.Protobuf.JsonDump/Google.Protobuf.JsonDump.xproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>9695e08f-9829-497d-b95c-b38f28d48690</ProjectGuid>
+ <RootNamespace>Google.Protobuf.JsonDump</RootNamespace>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
+ <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <SchemaVersion>2.0</SchemaVersion>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
+</Project> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf.JsonDump/Program.cs b/csharp/src/Google.Protobuf.JsonDump/Program.cs
index 99e60e90..296b2f3f 100644
--- a/csharp/src/Google.Protobuf.JsonDump/Program.cs
+++ b/csharp/src/Google.Protobuf.JsonDump/Program.cs
@@ -32,6 +32,7 @@
using System;
using System.IO;
+using System.Reflection;
namespace Google.Protobuf.ProtoDump
{
@@ -55,7 +56,7 @@ namespace Google.Protobuf.ProtoDump
Console.Error.WriteLine("Unable to load type {0}.", args[0]);
return 1;
}
- if (!typeof(IMessage).IsAssignableFrom(type))
+ if (!typeof(IMessage).GetTypeInfo().IsAssignableFrom(type))
{
Console.Error.WriteLine("Type {0} doesn't implement IMessage.", args[0]);
return 1;
diff --git a/csharp/src/Google.Protobuf.JsonDump/Properties/AssemblyInfo.cs b/csharp/src/Google.Protobuf.JsonDump/Properties/AssemblyInfo.cs
deleted file mode 100644
index d980b013..00000000
--- a/csharp/src/Google.Protobuf.JsonDump/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("ProtoDump")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ProtoDump")]
-[assembly: AssemblyCopyright("Copyright © 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-[assembly: AssemblyVersion("3.0.0.0")]
-[assembly: AssemblyFileVersion("3.0.0.0")]
diff --git a/csharp/src/Google.Protobuf.JsonDump/app.config b/csharp/src/Google.Protobuf.JsonDump/app.config
deleted file mode 100644
index 51278a45..00000000
--- a/csharp/src/Google.Protobuf.JsonDump/app.config
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
diff --git a/csharp/src/Google.Protobuf.JsonDump/project.json b/csharp/src/Google.Protobuf.JsonDump/project.json
new file mode 100644
index 00000000..84b23c45
--- /dev/null
+++ b/csharp/src/Google.Protobuf.JsonDump/project.json
@@ -0,0 +1,19 @@
+{
+ "buildOptions": {
+ "debugType": "portable",
+ "emitEntryPoint": true
+ },
+ "dependencies": {
+ "Google.Protobuf": { "target": "project" }
+ },
+ "frameworks": {
+ "netcoreapp1.0": {
+ "dependencies": {
+ "Microsoft.NETCore.App": {
+ "type": "platform",
+ "version": "1.0.0"
+ }
+ }
+ }
+ }
+}
diff --git a/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs b/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs
index c616470e..0e2bad59 100644
--- a/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs
+++ b/csharp/src/Google.Protobuf.Test/FieldCodecTest.cs
@@ -32,6 +32,7 @@
using System.Collections.Generic;
using System.IO;
+using System.Reflection;
using Google.Protobuf.TestProtos;
using NUnit.Framework;
@@ -162,7 +163,7 @@ namespace Google.Protobuf
codedOutput.Flush();
Assert.AreEqual(0, stream.Position);
Assert.AreEqual(0, codec.CalculateSizeWithTag(codec.DefaultValue));
- if (typeof(T).IsValueType)
+ if (typeof(T).GetTypeInfo().IsValueType)
{
Assert.AreEqual(default(T), codec.DefaultValue);
}
diff --git a/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj b/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj
deleted file mode 100644
index 4f37c5e2..00000000
--- a/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DD01ED24-3750-4567-9A23-1DB676A15610}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.Protobuf</RootNamespace>
- <AssemblyName>Google.Protobuf.Test</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <OldToolsVersion>3.5</OldToolsVersion>
- <TargetFrameworkProfile>
- </TargetFrameworkProfile>
- <NuGetPackageImportStamp>
- </NuGetPackageImportStamp>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
- <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
- <DefineConstants>DEBUG;TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <Prefer32Bit>false</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseSigned|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\ReleaseSigned</OutputPath>
- <IntermediateOutputPath>obj\ReleaseSigned\</IntermediateOutputPath>
- <DefineConstants>TRACE;$(EnvironmentFlavor);$(EnvironmentTemplate)</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <Prefer32Bit>false</Prefer32Bit>
- <SignAssembly>True</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.Protobuf.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="nunit.core, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="nunit.core.interfaces, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.core.interfaces.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="nunit.util, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
- <HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\nunit.util.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="NUnit.VisualStudio.TestAdapter, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4cb40d35494691ac, processorArchitecture=MSIL">
- <HintPath>..\packages\NUnitTestAdapter.2.0.0\lib\NUnit.VisualStudio.TestAdapter.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="ByteStringTest.cs" />
- <Compile Include="CodedInputStreamExtensions.cs" />
- <Compile Include="CodedInputStreamTest.cs" />
- <Compile Include="CodedOutputStreamTest.cs" />
- <Compile Include="Compatibility\PropertyInfoExtensionsTest.cs" />
- <Compile Include="Compatibility\TypeExtensionsTest.cs" />
- <Compile Include="EqualityTester.cs" />
- <Compile Include="FieldCodecTest.cs" />
- <Compile Include="GeneratedMessageTest.cs" />
- <Compile Include="Collections\MapFieldTest.cs" />
- <Compile Include="Collections\RepeatedFieldTest.cs" />
- <Compile Include="JsonFormatterTest.cs" />
- <Compile Include="JsonParserTest.cs" />
- <Compile Include="JsonTokenizerTest.cs" />
- <Compile Include="Reflection\DescriptorsTest.cs" />
- <Compile Include="Reflection\FieldAccessTest.cs" />
- <Compile Include="Reflection\TypeRegistryTest.cs" />
- <Compile Include="SampleEnum.cs" />
- <Compile Include="SampleMessages.cs" />
- <Compile Include="TestProtos\ForeignMessagePartial.cs" />
- <Compile Include="TestProtos\MapUnittestProto3.cs" />
- <Compile Include="TestProtos\UnittestImportProto3.cs" />
- <Compile Include="TestProtos\UnittestImportPublicProto3.cs" />
- <Compile Include="TestProtos\UnittestIssues.cs" />
- <Compile Include="TestProtos\UnittestProto3.cs" />
- <Compile Include="DeprecatedMemberTest.cs" />
- <Compile Include="IssuesTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="TestCornerCases.cs" />
- <Compile Include="TestProtos\UnittestWellKnownTypes.cs" />
- <Compile Include="WellKnownTypes\AnyTest.cs" />
- <Compile Include="WellKnownTypes\DurationTest.cs" />
- <Compile Include="WellKnownTypes\FieldMaskTest.cs" />
- <Compile Include="WellKnownTypes\TimestampTest.cs" />
- <Compile Include="WellKnownTypes\WrappersTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Google.Protobuf\Google.Protobuf.csproj">
- <Project>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</Project>
- <Name>Google.Protobuf</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="packages.config" />
- </ItemGroup>
- <ItemGroup>
- <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
- </ItemGroup>
- <ItemGroup />
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.xproj b/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.xproj
new file mode 100644
index 00000000..a9a1cc04
--- /dev/null
+++ b/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.xproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>580eb013-d3c7-4578-b845-015f4a3b0591</ProjectGuid>
+ <RootNamespace>Google.Protobuf.Test</RootNamespace>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
+ <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <SchemaVersion>2.0</SchemaVersion>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
+</Project> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf.Test/Properties/AppManifest.xml b/csharp/src/Google.Protobuf.Test/Properties/AppManifest.xml
deleted file mode 100644
index a9552327..00000000
--- a/csharp/src/Google.Protobuf.Test/Properties/AppManifest.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
->
- <Deployment.Parts>
- </Deployment.Parts>
-</Deployment>
diff --git a/csharp/src/Google.Protobuf.Test/Properties/AssemblyInfo.cs b/csharp/src/Google.Protobuf.Test/Properties/AssemblyInfo.cs
deleted file mode 100644
index d00acf85..00000000
--- a/csharp/src/Google.Protobuf.Test/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("Google.Protobuf.Test")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Google.Protobuf.Test")]
-[assembly: AssemblyCopyright("Copyright © 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-[assembly: AssemblyVersion("3.0.0.0")]
-[assembly: AssemblyFileVersion("3.0.0.0")]
diff --git a/csharp/src/Google.Protobuf.Test/WellKnownTypes/AnyTest.cs b/csharp/src/Google.Protobuf.Test/WellKnownTypes/AnyTest.cs
index f21be7d9..4aecc998 100644
--- a/csharp/src/Google.Protobuf.Test/WellKnownTypes/AnyTest.cs
+++ b/csharp/src/Google.Protobuf.Test/WellKnownTypes/AnyTest.cs
@@ -96,7 +96,7 @@ namespace Google.Protobuf.WellKnownTypes
var message = SampleMessages.CreateFullTestAllTypes();
var any = Any.Pack(message);
var text = any.ToString();
- Assert.That(text, Is.StringContaining("\"@value\": \"" + message.ToByteString().ToBase64() + "\""));
+ Assert.That(text, Does.Contain("\"@value\": \"" + message.ToByteString().ToBase64() + "\""));
}
[Test]
diff --git a/csharp/src/Google.Protobuf.Test/WellKnownTypes/FieldMaskTest.cs b/csharp/src/Google.Protobuf.Test/WellKnownTypes/FieldMaskTest.cs
index 89bc8275..1d9908b4 100644
--- a/csharp/src/Google.Protobuf.Test/WellKnownTypes/FieldMaskTest.cs
+++ b/csharp/src/Google.Protobuf.Test/WellKnownTypes/FieldMaskTest.cs
@@ -46,8 +46,8 @@ namespace Google.Protobuf.WellKnownTypes
var mask = new FieldMask { Paths = { input } };
var text = mask.ToString();
// More specific test below
- Assert.That(text, Is.StringContaining("@warning"));
- Assert.That(text, Is.StringContaining(input));
+ Assert.That(text, Does.Contain("@warning"));
+ Assert.That(text, Does.Contain(input));
}
[Test]
diff --git a/csharp/src/Google.Protobuf.Test/packages.config b/csharp/src/Google.Protobuf.Test/packages.config
deleted file mode 100644
index c7653992..00000000
--- a/csharp/src/Google.Protobuf.Test/packages.config
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="NUnit" version="2.6.4" targetFramework="net45" userInstalled="true" />
- <package id="NUnitTestAdapter" version="2.0.0" targetFramework="net45" userInstalled="true" />
-</packages> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf.Test/project.json b/csharp/src/Google.Protobuf.Test/project.json
new file mode 100644
index 00000000..87b732c9
--- /dev/null
+++ b/csharp/src/Google.Protobuf.Test/project.json
@@ -0,0 +1,44 @@
+{
+ "buildOptions": {
+ "debugType": "portable",
+ "keyFile": "../../keys/Google.Protobuf.snk"
+ },
+
+ "configurations": {
+ "Debug": {
+ "buildOptions": {
+ "define": [ "DEBUG", "TRACE" ]
+ }
+ },
+ "Release": {
+ "buildOptions": {
+ "define": [ "RELEASE", "TRACE" ],
+ "optimize": true
+ }
+ }
+ },
+
+ "dependencies": {
+ "Google.Protobuf": { "target": "project" },
+ "NUnit": "3.4.0",
+ "dotnet-test-nunit": "3.4.0-alpha-2",
+ },
+
+ "testRunner": "nunit",
+
+ "frameworks": {
+ "netcoreapp1.0": {
+ "imports" : [ "dnxcore50", "netcoreapp1.0", "portable-net45+win8" ],
+ "buildOptions": {
+ "define": [ "PCL" ]
+ },
+ "dependencies": {
+ "Microsoft.NETCore.App": {
+ "version": "1.0.0",
+ "type": "platform"
+ },
+ "System.Console": "4.0.0"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf.sln b/csharp/src/Google.Protobuf.sln
index 72d87f76..3c62bba3 100644
--- a/csharp/src/Google.Protobuf.sln
+++ b/csharp/src/Google.Protobuf.sln
@@ -1,54 +1,43 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2015
-VisualStudioVersion = 14.0.24720.0
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 14.0.24720.0
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Protobuf", "Google.Protobuf\Google.Protobuf.csproj", "{6908BDCE-D925-43F3-94AC-A531E6DF2591}"
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AddressBook", "AddressBook\AddressBook.xproj", "{AFB63919-1E05-43B4-802A-8FB8C9B2F463}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Protobuf.Test", "Google.Protobuf.Test\Google.Protobuf.Test.csproj", "{DD01ED24-3750-4567-9A23-1DB676A15610}"
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Google.Protobuf", "Google.Protobuf\Google.Protobuf.xproj", "{9B576380-726D-4142-8238-60A43AB0E35A}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddressBook", "AddressBook\AddressBook.csproj", "{A31F5FB2-4FF3-432A-B35B-5CD203606311}"
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Google.Protobuf.Test", "Google.Protobuf.Test\Google.Protobuf.Test.xproj", "{580EB013-D3C7-4578-B845-015F4A3B0591}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Protobuf.JsonDump", "Google.Protobuf.JsonDump\Google.Protobuf.JsonDump.csproj", "{D7282E99-2DC3-405B-946F-177DB2FD2AE2}"
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Google.Protobuf.Conformance", "Google.Protobuf.Conformance\Google.Protobuf.Conformance.xproj", "{DDDC055B-E185-4181-BAB0-072F0F984569}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Google.Protobuf.Conformance", "Google.Protobuf.Conformance\Google.Protobuf.Conformance.csproj", "{0607D1B8-80D6-4B35-9857-1263C1B32B94}"
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Google.Protobuf.JsonDump", "Google.Protobuf.JsonDump\Google.Protobuf.JsonDump.xproj", "{9695E08F-9829-497D-B95C-B38F28D48690}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
- ReleaseSigned|Any CPU = ReleaseSigned|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {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}.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}.ReleaseSigned|Any CPU.ActiveCfg = ReleaseSigned|Any CPU
- {6908BDCE-D925-43F3-94AC-A531E6DF2591}.ReleaseSigned|Any CPU.Build.0 = ReleaseSigned|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}.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}.ReleaseSigned|Any CPU.ActiveCfg = ReleaseSigned|Any CPU
- {DD01ED24-3750-4567-9A23-1DB676A15610}.ReleaseSigned|Any CPU.Build.0 = ReleaseSigned|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}.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}.ReleaseSigned|Any CPU.ActiveCfg = Release|Any CPU
- {A31F5FB2-4FF3-432A-B35B-5CD203606311}.ReleaseSigned|Any CPU.Build.0 = Release|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}.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}.ReleaseSigned|Any CPU.ActiveCfg = Release|Any CPU
- {D7282E99-2DC3-405B-946F-177DB2FD2AE2}.ReleaseSigned|Any CPU.Build.0 = Release|Any CPU
- {0607D1B8-80D6-4B35-9857-1263C1B32B94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0607D1B8-80D6-4B35-9857-1263C1B32B94}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0607D1B8-80D6-4B35-9857-1263C1B32B94}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0607D1B8-80D6-4B35-9857-1263C1B32B94}.Release|Any CPU.Build.0 = Release|Any CPU
- {0607D1B8-80D6-4B35-9857-1263C1B32B94}.ReleaseSigned|Any CPU.ActiveCfg = Release|Any CPU
- {0607D1B8-80D6-4B35-9857-1263C1B32B94}.ReleaseSigned|Any CPU.Build.0 = Release|Any CPU
+ {AFB63919-1E05-43B4-802A-8FB8C9B2F463}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AFB63919-1E05-43B4-802A-8FB8C9B2F463}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AFB63919-1E05-43B4-802A-8FB8C9B2F463}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AFB63919-1E05-43B4-802A-8FB8C9B2F463}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9B576380-726D-4142-8238-60A43AB0E35A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9B576380-726D-4142-8238-60A43AB0E35A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9B576380-726D-4142-8238-60A43AB0E35A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9B576380-726D-4142-8238-60A43AB0E35A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {580EB013-D3C7-4578-B845-015F4A3B0591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {580EB013-D3C7-4578-B845-015F4A3B0591}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {580EB013-D3C7-4578-B845-015F4A3B0591}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {580EB013-D3C7-4578-B845-015F4A3B0591}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DDDC055B-E185-4181-BAB0-072F0F984569}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DDDC055B-E185-4181-BAB0-072F0F984569}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DDDC055B-E185-4181-BAB0-072F0F984569}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DDDC055B-E185-4181-BAB0-072F0F984569}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9695E08F-9829-497D-B95C-B38F28D48690}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9695E08F-9829-497D-B95C-B38F28D48690}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9695E08F-9829-497D-B95C-B38F28D48690}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9695E08F-9829-497D-B95C-B38F28D48690}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.csproj b/csharp/src/Google.Protobuf/Google.Protobuf.csproj
deleted file mode 100644
index 5557612a..00000000
--- a/csharp/src/Google.Protobuf/Google.Protobuf.csproj
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{6908BDCE-D925-43F3-94AC-A531E6DF2591}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Google.Protobuf</RootNamespace>
- <AssemblyName>Google.Protobuf</AssemblyName>
- <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <OldToolsVersion>3.5</OldToolsVersion>
- <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
- <NuGetPackageImportStamp>
- </NuGetPackageImportStamp>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
- <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
- <DocumentationFile>bin\Debug\Google.Protobuf.xml</DocumentationFile>
- <NoWarn>
- </NoWarn>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <IntermediateOutputPath>obj\Release\</IntermediateOutputPath>
- <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
- <NoWarn>
- </NoWarn>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseSigned|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\ReleaseSigned</OutputPath>
- <IntermediateOutputPath>obj\ReleaseSigned\</IntermediateOutputPath>
- <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
- <NoWarn>
- </NoWarn>
- <DefineConstants>TRACE;SIGNED</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <NoStdLib>true</NoStdLib>
- <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
- <SignAssembly>True</SignAssembly>
- <AssemblyOriginatorKeyFile>..\..\keys\Google.Protobuf.snk</AssemblyOriginatorKeyFile>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="mscorlib" />
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="ByteArray.cs" />
- <Compile Include="ByteString.cs" />
- <Compile Include="CodedOutputStream.ComputeSize.cs" />
- <Compile Include="CodedInputStream.cs" />
- <Compile Include="CodedOutputStream.cs" />
- <Compile Include="Collections\MapField.cs" />
- <Compile Include="Collections\ReadOnlyDictionary.cs" />
- <Compile Include="Collections\RepeatedField.cs" />
- <Compile Include="Compatibility\PropertyInfoExtensions.cs" />
- <Compile Include="Compatibility\TypeExtensions.cs" />
- <Compile Include="FieldCodec.cs" />
- <Compile Include="FrameworkPortability.cs" />
- <Compile Include="ICustomDiagnosticMessage.cs" />
- <Compile Include="IDeepCloneable.cs" />
- <Compile Include="InvalidJsonException.cs" />
- <Compile Include="JsonFormatter.cs" />
- <Compile Include="JsonParser.cs" />
- <Compile Include="JsonToken.cs" />
- <Compile Include="JsonTokenizer.cs" />
- <Compile Include="MessageExtensions.cs" />
- <Compile Include="IMessage.cs" />
- <Compile Include="InvalidProtocolBufferException.cs" />
- <Compile Include="LimitedInputStream.cs" />
- <Compile Include="MessageParser.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Reflection\Descriptor.cs" />
- <Compile Include="Reflection\DescriptorBase.cs" />
- <Compile Include="Reflection\DescriptorPool.cs" />
- <Compile Include="Reflection\DescriptorUtil.cs" />
- <Compile Include="Reflection\DescriptorValidationException.cs" />
- <Compile Include="Reflection\EnumDescriptor.cs" />
- <Compile Include="Reflection\EnumValueDescriptor.cs" />
- <Compile Include="Reflection\FieldAccessorBase.cs" />
- <Compile Include="Reflection\FieldDescriptor.cs" />
- <Compile Include="Reflection\FieldType.cs" />
- <Compile Include="Reflection\FileDescriptor.cs" />
- <Compile Include="Reflection\GeneratedClrTypeInfo.cs" />
- <Compile Include="Reflection\IDescriptor.cs" />
- <Compile Include="Reflection\IFieldAccessor.cs" />
- <Compile Include="Reflection\MapFieldAccessor.cs" />
- <Compile Include="Reflection\MessageDescriptor.cs" />
- <Compile Include="Reflection\MethodDescriptor.cs" />
- <Compile Include="Reflection\OneofAccessor.cs" />
- <Compile Include="Reflection\OneofDescriptor.cs" />
- <Compile Include="Reflection\OriginalNameAttribute.cs" />
- <Compile Include="Reflection\PackageDescriptor.cs" />
- <Compile Include="Reflection\PartialClasses.cs" />
- <Compile Include="Reflection\ReflectionUtil.cs" />
- <Compile Include="Reflection\RepeatedFieldAccessor.cs" />
- <Compile Include="Reflection\ServiceDescriptor.cs" />
- <Compile Include="Reflection\SingleFieldAccessor.cs" />
- <Compile Include="ProtoPreconditions.cs" />
- <Compile Include="Reflection\TypeRegistry.cs" />
- <Compile Include="WellKnownTypes\Any.cs" />
- <Compile Include="WellKnownTypes\AnyPartial.cs" />
- <Compile Include="WellKnownTypes\Api.cs" />
- <Compile Include="WellKnownTypes\Duration.cs" />
- <Compile Include="WellKnownTypes\DurationPartial.cs" />
- <Compile Include="WellKnownTypes\Empty.cs" />
- <Compile Include="WellKnownTypes\FieldMask.cs" />
- <Compile Include="WellKnownTypes\FieldMaskPartial.cs" />
- <Compile Include="WellKnownTypes\SourceContext.cs" />
- <Compile Include="WellKnownTypes\Struct.cs" />
- <Compile Include="WellKnownTypes\TimeExtensions.cs" />
- <Compile Include="WellKnownTypes\Timestamp.cs" />
- <Compile Include="WellKnownTypes\TimestampPartial.cs" />
- <Compile Include="WellKnownTypes\Type.cs" />
- <Compile Include="WellKnownTypes\ValuePartial.cs" />
- <Compile Include="WellKnownTypes\Wrappers.cs" />
- <Compile Include="WellKnownTypes\WrappersPartial.cs" />
- <Compile Include="WireFormat.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Google.Protobuf.nuspec" />
- <None Include="packages.config" />
- </ItemGroup>
- <ItemGroup />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
- <Import Project="..\packages\NuSpec.ReferenceGenerator.1.4.1\build\portable-net45+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10\NuSpec.ReferenceGenerator.targets" Condition="Exists('..\packages\NuSpec.ReferenceGenerator.1.4.1\build\portable-net45+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10\NuSpec.ReferenceGenerator.targets')" />
- <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
- <PropertyGroup>
- <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
- </PropertyGroup>
- <Error Condition="!Exists('..\packages\NuSpec.ReferenceGenerator.1.4.1\build\portable-net45+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10\NuSpec.ReferenceGenerator.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NuSpec.ReferenceGenerator.1.4.1\build\portable-net45+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10\NuSpec.ReferenceGenerator.targets'))" />
- </Target>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.nuspec b/csharp/src/Google.Protobuf/Google.Protobuf.nuspec
deleted file mode 100644
index 2aabf364..00000000
--- a/csharp/src/Google.Protobuf/Google.Protobuf.nuspec
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<package>
- <metadata>
- <id>Google.Protobuf</id>
- <title>Google Protocol Buffers C#</title>
- <summary>C# runtime library for Protocol Buffers - Google's data interchange format.</summary>
- <description>See project site for more info.</description>
- <version>3.0.0-beta3</version>
- <authors>Google Inc.</authors>
- <owners>protobuf-packages</owners>
- <licenseUrl>https://github.com/google/protobuf/blob/master/LICENSE</licenseUrl>
- <projectUrl>https://github.com/google/protobuf</projectUrl>
- <requireLicenseAcceptance>false</requireLicenseAcceptance>
- <releaseNotes>C# proto3 support</releaseNotes>
- <copyright>Copyright 2015, Google Inc.</copyright>
- <tags>Protocol Buffers Binary Serialization Format Google proto proto3</tags>
- <dependencies>
- <!-- Dependencies for older, monolithic-assembly platforms -->
- <group targetFramework="net45" />
- <group targetFramework="wp8" />
- <group targetFramework="win8" />
- <group targetFramework="wpa81" />
- <group targetFramework="xamarin.ios" />
- <group targetFramework="monotouch" />
- <group targetFramework="monoandroid" />
- <!-- Dependencies for newer, more granular platforms (.NET Core etc) -->
- <group targetFramework="dotnet">
- <dependency id="System.Collections" version="4.0.0" />
- <dependency id="System.Diagnostics.Debug" version="4.0.0" />
- <dependency id="System.Globalization" version="4.0.0" />
- <dependency id="System.IO" version="4.0.0" />
- <dependency id="System.Linq" version="4.0.0" />
- <dependency id="System.Linq.Expressions" version="4.0.0" />
- <dependency id="System.ObjectModel" version="4.0.0" />
- <dependency id="System.Reflection" version="4.0.0" />
- <dependency id="System.Reflection.Extensions" version="4.0.0" />
- <dependency id="System.Runtime" version="4.0.0" />
- <dependency id="System.Runtime.Extensions" version="4.0.0" />
- <dependency id="System.Text.Encoding" version="4.0.0" />
- <dependency id="System.Text.RegularExpressions" version="4.0.0" />
- <dependency id="System.Threading" version="4.0.0" />
- </group>
- </dependencies>
- </metadata>
- <files>
- <file src="bin/ReleaseSigned/Google.Protobuf.dll" target="lib/portable-net45+netcore45+wpa81+wp8" />
- <file src="bin/ReleaseSigned/Google.Protobuf.pdb" target="lib/portable-net45+netcore45+wpa81+wp8" />
- <file src="bin/ReleaseSigned/Google.Protobuf.xml" target="lib/portable-net45+netcore45+wpa81+wp8" />
- <file src="bin/ReleaseSigned/Google.Protobuf.dll" target="lib/dotnet" />
- <file src="bin/ReleaseSigned/Google.Protobuf.pdb" target="lib/dotnet" />
- <file src="bin/ReleaseSigned/Google.Protobuf.xml" target="lib/dotnet" />
- <file src="**\*.cs" target="src" />
- </files>
-</package> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.xproj b/csharp/src/Google.Protobuf/Google.Protobuf.xproj
new file mode 100644
index 00000000..c68e0db3
--- /dev/null
+++ b/csharp/src/Google.Protobuf/Google.Protobuf.xproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>9b576380-726d-4142-8238-60a43ab0e35a</ProjectGuid>
+ <RootNamespace>Google.Protobuf</RootNamespace>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
+ <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <SchemaVersion>2.0</SchemaVersion>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
+</Project> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf/Properties/AssemblyInfo.cs b/csharp/src/Google.Protobuf/Properties/AssemblyInfo.cs
index 0516f18e..9b179bd7 100644
--- a/csharp/src/Google.Protobuf/Properties/AssemblyInfo.cs
+++ b/csharp/src/Google.Protobuf/Properties/AssemblyInfo.cs
@@ -30,7 +30,6 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
-using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
@@ -38,30 +37,13 @@ using System.Security;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("Google.Protobuf")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Google.Protobuf")]
-[assembly: AssemblyCopyright("Copyright © 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
#if !NCRUNCH
[assembly: AllowPartiallyTrustedCallers]
#endif
-#if SIGNED
[assembly: InternalsVisibleTo("Google.Protobuf.Test, PublicKey=" +
"002400000480000094000000060200000024000052534131000400000100010025800fbcfc63a1" +
"7c66b303aae80b03a6beaa176bb6bef883be436f2a1579edd80ce23edf151a1f4ced97af83abcd" +
"981207041fd5b2da3b498346fcfcd94910d52f25537c4a43ce3fbe17dc7d43e6cbdb4d8f1242dc" +
"b6bd9b5906be74da8daa7d7280f97130f318a16c07baf118839b156299a48522f9fae2371c9665" +
"c5ae9cb6")]
-#else
-[assembly: InternalsVisibleTo("Google.Protobuf.Test")]
-#endif
-
-[assembly: AssemblyVersion("3.0.0.0")]
-[assembly: AssemblyFileVersion("3.0.0.0")]
-[assembly: AssemblyInformationalVersion("3.0.0-beta3")]
diff --git a/csharp/src/Google.Protobuf/packages.config b/csharp/src/Google.Protobuf/packages.config
deleted file mode 100644
index 40b8fd92..00000000
--- a/csharp/src/Google.Protobuf/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="NuSpec.ReferenceGenerator" version="1.4.1" targetFramework="portable45-net45+win8+wp8+wpa81" developmentDependency="true" />
-</packages> \ No newline at end of file
diff --git a/csharp/src/Google.Protobuf/project.json b/csharp/src/Google.Protobuf/project.json
new file mode 100644
index 00000000..c8eae6d0
--- /dev/null
+++ b/csharp/src/Google.Protobuf/project.json
@@ -0,0 +1,65 @@
+{
+ "version": "3.0.0-beta4",
+ "title": "Google Protocol Buffers",
+ "description": "See project site for more info.",
+ "authors": [ "Google Inc." ],
+ "copyright": "Copyright 2015, Google Inc.",
+
+ "packOptions": {
+ "summary": "C# runtime library for Protocol Buffers - Google's data interchange format.",
+ "tags": [ "Protocol", "Buffers", "Binary", "Serialization", "Format", "Google", "proto", "proto3" ],
+ "owners": [ "protobuf-packages" ],
+ "licenseUrl": "https://github.com/google/protobuf/blob/master/LICENSE",
+ "projectUrl": "https://github.com/google/protobuf",
+ "releaseNotes": "C# proto3 support",
+ "requireLicenseAcceptance": false,
+ "repository": {
+ "url": "https://github.com/nodatime/nodatime.git"
+ }
+ },
+
+ "buildOptions": {
+ "debugType": "portable",
+ "keyFile": "../../keys/Google.Protobuf.snk",
+ "xmlDoc": true
+ },
+
+ "configurations": {
+ "Debug": {
+ "buildOptions": {
+ "define": [ "DEBUG", "TRACE" ]
+ }
+ },
+ "Release": {
+ "buildOptions": {
+ "define": [ "RELEASE", "TRACE" ],
+ "optimize": true
+ }
+ }
+ },
+
+ "frameworks": {
+ // This target allows the package to be installed in a .NET 4.5+
+ // project without asking for myriad other dependencies.
+ "net45": {
+ },
+ "netstandard1.0": {
+ "dependencies": {
+ "System.Collections": "4.0.11",
+ "System.Diagnostics.Debug": "4.0.11",
+ "System.Globalization": "4.0.11",
+ "System.IO": "4.1.0",
+ "System.Linq": "4.1.0",
+ "System.Linq.Expressions": "4.1.0",
+ "System.ObjectModel": "4.0.12",
+ "System.Reflection": "4.1.0",
+ "System.Reflection.Extensions": "4.0.1",
+ "System.Runtime": "4.1.0",
+ "System.Runtime.Extensions": "4.1.0",
+ "System.Text.Encoding": "4.0.11",
+ "System.Text.RegularExpressions": "4.1.0",
+ "System.Threading": "4.0.11"
+ }
+ }
+ }
+}
diff --git a/jenkins/docker/Dockerfile b/jenkins/docker/Dockerfile
index 8467aeff..c928ac71 100644
--- a/jenkins/docker/Dockerfile
+++ b/jenkins/docker/Dockerfile
@@ -23,6 +23,13 @@ run echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /e
echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
+# Install dotnet SDK based on https://www.microsoft.com/net/core#debian
+# (Ubuntu instructions need apt to support https)
+RUN apt-get update && apt-get install -y curl libunwind8 gettext && \
+ curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=809130 && \
+ mkdir -p /opt/dotnet && tar zxf dotnet.tar.gz -C /opt/dotnet && \
+ ln -s /opt/dotnet/dotnet /usr/local/bin
+
# Install dependencies. We start with the basic ones require to build protoc
# and the C++ build
RUN apt-get update && apt-get install -y \
diff --git a/tests.sh b/tests.sh
index 72465a7b..99e5df4e 100755
--- a/tests.sh
+++ b/tests.sh
@@ -57,15 +57,27 @@ build_csharp() {
if [ "$TRAVIS" == "true" ]; then
# Install latest version of Mono
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
+ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1397BC53640DB551
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
- echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update -qq
sudo apt-get install -qq mono-devel referenceassemblies-pcl nunit
- wget www.nuget.org/NuGet.exe -O nuget.exe
- NUGET=../../nuget.exe
+
+ # Then install the dotnet SDK as per Ubuntu 14.04 instructions on dot.net.
+ sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
+ sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
+ sudo apt-get update -qq
+ sudo apt-get install -qq dotnet-dev-1.0.0-preview2-003121
fi
- (cd csharp/src; mono $NUGET restore)
+ # Perform "dotnet new" once to get the setup preprocessing out of the
+ # way. That spews a lot of output (including backspaces) into logs
+ # otherwise, and can cause problems. It doesn't matter if this step
+ # is performed multiple times; it's cheap after the first time anyway.
+ mkdir dotnettmp
+ (cd dotnettmp; dotnet new > /dev/null)
+ rm -rf dotnettmp
+
+ (cd csharp/src; dotnet restore)
csharp/buildall.sh
cd conformance && make test_csharp && cd ..
}