You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
csharp_binary(
name = "console.exe",
deps = [
"//example/proto:thing_csharp_proto.dll",
]
)
First target thing_csharp_proto.dll builds fine. However, when I add a reference to it (deps) from the console target, build fails with error:
ERROR: /home/neto/repos/github.com/mayerber/bazel-learning/example/csharp/console/BUILD.bazel:6:14: in deps attribute of csharp_binary rule //example/csharp/console:console.exe: '//example/proto:thing_csharp_proto.dll' does not have mandatory providers: ['DotnetAssemblyCompileInfo', 'DotnetAssemblyRuntimeInfo']. Since this rule was created by the macro 'csharp_binary', the error might have been caused by the macro implementation
Looks like csharp_proto_library doesn't implement a couple mandatory providers.
Log Output
ERROR: /home/neto/repos/github.com/mayerber/bazel-learning/example/csharp/console/BUILD.bazel:6:14: in deps attribute of csharp_binary rule //example/csharp/console:console.exe: '//example/proto:thing_csharp_proto.dll' does not have mandatory providers: ['DotnetAssemblyCompileInfo', 'DotnetAssemblyRuntimeInfo']. Since this rule was created by the macro 'csharp_binary', the error might have been caused by the macro implementation
ERROR: /home/neto/repos/github.com/mayerber/bazel-learning/example/csharp/console/BUILD.bazel:6:14: Analysis of target '//example/csharp/console:console.exe' failed
ERROR: Analysis of target '//example/csharp/console:console.exe' failed; build aborted:
INFO: Elapsed time: 0.144s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 1 target configured)
Issue Description
I have the following two targets:
Target 1. C# proto library [full contents in BUILD section below]
Target 2. C# console app
First target
thing_csharp_proto.dll
builds fine. However, when I add a reference to it (deps
) from theconsole
target, build fails with error:ERROR: /home/neto/repos/github.com/mayerber/bazel-learning/example/csharp/console/BUILD.bazel:6:14: in deps attribute of csharp_binary rule //example/csharp/console:console.exe: '//example/proto:thing_csharp_proto.dll' does not have mandatory providers: ['DotnetAssemblyCompileInfo', 'DotnetAssemblyRuntimeInfo']. Since this rule was created by the macro 'csharp_binary', the error might have been caused by the macro implementation
Looks like
csharp_proto_library
doesn't implement a couple mandatory providers.Log Output
rules_proto_grpc Version
4.5.0
Bazel Version
6.4.0
OS
Ubuntu (WSL2)
Link to Demo Repo
https://github.com/mayerber/bazel-learning/tree/ref_thing_proto
WORKSPACE Content
BUILD Content
Proto Content
Any Other Content
No response
The text was updated successfully, but these errors were encountered: