diff --git a/CHANGELOG.md b/CHANGELOG.md index 9daad3e541..d5062bd300 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,18 @@ different versioning scheme, following the Haskell community's ### C# ### +* **Breaking change** The code generation MSBuild targets no longer support + Mono's xbuild: only MSBuild is supported. Mono has + [deprecated xbuild in favor MSBuild](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#msbuild) + now that + [MSBuild is open source and cross-platform](https://github.com/Microsoft/msbuild). + These are the MSBuild targets that run `gbc` on `BondCodegen` items. +* **Breaking change** The code generation MSBuild targets now automatically + compile the generated `_grpc.cs` files if `--grpc` is passed to `gbc`. + Explicit `` + lines in MSBuild projects will need to be removed to fix error MSB3105 + about duplicate items. See commit TBD for an example of how to fix this. + [Issue #448](https://github.com/Microsoft/bond/issues/448) * Added `Bond.Box.Create` helper method to create `Bond.Box` instances. * Reflection.IsBonded now recognizes custom IBonded implementations. * Use Newtonsoft's JSON.NET BigInteger support -- when available -- to diff --git a/cs/build/nuget/Common.targets b/cs/build/nuget/Common.targets index 56e6f2265d..ed482ef246 100644 --- a/cs/build/nuget/Common.targets +++ b/cs/build/nuget/Common.targets @@ -127,6 +127,18 @@ %(BondCodegen.Identity) + <_BondGeneratedFiles Include="@(_BondCodegenWithDefaultOptions -> '$(BondOutputDirectory)\%(FileName)_grpc.cs')" + Condition="$(BondOptions.Contains('--grpc')) AND !$(BondOptions.Contains('--grpc=false'))"> + true + %(BondCodegen.Identity) + + + <_BondGeneratedFiles Include="@(BondCodegen -> '$(BondOutputDirectory)\%(FileName)_grpc.cs')" + Condition="$([System.String]::new('%(BondCodegen.Options)').Contains('--grpc')) AND !$([System.String]::new('%(BondCodegen.Options)').Contains('--grpc=false'))"> + true + %(BondCodegen.Identity) + + <_BondGeneratedFileNames Include="@(_BondGeneratedFiles)"/> diff --git a/cs/test/compat/grpc/shared/GrpcCompatShared.csproj b/cs/test/compat/grpc/shared/GrpcCompatShared.csproj index cd0d249236..ae72a96194 100644 --- a/cs/test/compat/grpc/shared/GrpcCompatShared.csproj +++ b/cs/test/compat/grpc/shared/GrpcCompatShared.csproj @@ -20,13 +20,13 @@ - --grpc + diff --git a/examples/cs/grpc/pingpong/grpc_pingpong.csproj b/examples/cs/grpc/pingpong/grpc_pingpong.csproj index 67f618e1ba..55253b30b1 100644 --- a/examples/cs/grpc/pingpong/grpc_pingpong.csproj +++ b/examples/cs/grpc/pingpong/grpc_pingpong.csproj @@ -46,9 +46,8 @@ + - - diff --git a/examples/cs/grpc/scalar/grpc_scalar.csproj b/examples/cs/grpc/scalar/grpc_scalar.csproj index 150a594682..866ca3af2b 100644 --- a/examples/cs/grpc/scalar/grpc_scalar.csproj +++ b/examples/cs/grpc/scalar/grpc_scalar.csproj @@ -51,9 +51,8 @@ + - -