Skip to content
Snippets Groups Projects
  1. Mar 29, 2019
  2. Mar 26, 2019
  3. Mar 25, 2019
  4. Mar 22, 2019
  5. Mar 14, 2019
  6. Mar 13, 2019
  7. Feb 18, 2019
  8. Feb 16, 2019
  9. Feb 07, 2019
  10. Dec 17, 2018
  11. Oct 17, 2018
  12. Oct 14, 2018
  13. Jun 22, 2018
    • kkm's avatar
    • kkm's avatar
      Add Grpc.Tools MsBuild taks assembly, test and scripting · a93e3d27
      kkm authored
      This is a complete set of tooling to build .proto files, with or without
      gRPC services, in .csproj, both "classic" and SDK flavors, and a bare
      minimum support for C++ projects.
      
      Highlights and omissions:
       * By default, generated files are placed into project's intermediate
         directory under obj/, and treated as temporary generated sources.
       * The projects are highly customizabe thorugh item metadata on Protobuf
         items.
       * SDK projects only use Visual Studio new build system, and automatically
         import XAML property sheets that allow setting per-file properties,
         such as generated file access, and whether to expect gRPC outputs, from
         VS properties windows. This possibly requires VS restart after the
         package is added to solution. Classic projects cannot be extended this
         way, and only show Protobuf as the possible item; settings are modified
         by editing the project only.
       * For C++ projects, only the tool and standard proto import paths are
         provided, no custom targets yet. This is in the works.
       * gRPC and Protobuf scripts are separate, and everything is programmed to
         easily split the Tools package into one for Google.Protobuf and another
         for Grpc.Tools. This requires tighter coordination between the teams.
       * The tasks DLL knows about gRPC. I tried to use it to support gRPC in a
         script-only fashion, but using the tasks results in much cleaner
         scripts. This is probably how it should remain.
       * In multitarget projects (multiple frameworks) protoc files are compiled
         for each target, and also for Debug/Release configuration sepatately. A
         possible fix is in the works, but requries some MsBuild tooling fixes,
         so it will take a while.
       * There are 4 tasks. The "smart" task predicts protoc outputs, and knows
         things about protoc naming conventions. This supports only C# and C++.
         The "dumb" task simply invokes protoc in a language-independent way,
         and supports all languages known to protoc. In the (not very likely)
         case protoc is used with MsBuild for these languages, instructions for
         extending the build is provided in build script comments. The other 2
         tasks are one to detect current platform and therefore tools paths, and
         another to read protoc generated dependency file. We use it for C#, but
         custom project may opt not to use the dependecy files.
       * 64-bit tools for Windows (protoc and grpc plugin exe) have been removed
         from package, as Windows is alsways able to run 32-bit executable (and
         they are smaller and faster, and always preferred when 2G address space
         is enough).
      a93e3d27
Loading