简体   繁体   中英

Compile binaries to multiple versions of .NET Framework using Bazel

How does one use the .NET build rules for Bazel to build versions of the same library for different versions of the .NET Framework? For library developers, this is a common thing to do when distributing libraries via, say, NuGet, in that the package will have multiple binaries, one for each targeted version of a platform.

Currently, it's possible to specify a version of the .NET Framework using the dotnet_register_toolchains workspace rule in a WORKSPACE file. However, this will only allow use of one version of the framework at a time. If it's possible to register individual toolchains to make this work in the .NET build rules, such a thing is not at all well-documented, nor are there any easily findable examples from which one might extract a workable solution.

Unfortunately, this is not yet supported. Only one version of .NET Framework, or Mono, or .NET Core per workspace is supported.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM