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
Describe the bug
I'm receiving a System.NullReferenceException (here) while attempting to generate a duplex proxy in a .net5.0 project.
It seems like the "referenceKey" field that is being targeted here is actually named s_referenceKey.
To Reproduce
In Visual Studio 2019: adding a reference to a duplex service (using the connected services wizard) produces no errors/warnings, but the generated proxy contains invalid annotations: [Microsoft.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
Running the command using the same tool version: dotnet-svcutil -u "Connected Services\ChemTypesService" --verbosity Debug lead me to: [29020.20] Importing metadata ... Error: Object reference not set to an instance of an object.
Finally, I got the trace from running the generated SvcutilBootstrapper project. " at Microsoft.Tools.ServiceModel.Svcutil.CodeDomHelpers.get_ReferenceKey() in /_/src/dotnet-svcutil/lib/src/CodeDomFixup/CodeDomHelpers.cs:line 29"
Expected behavior
The generated proxy contains no errors (a little message in visual studio in case of a failure would also be nice- I spent half a day looking for some nuget that I thought was missing- e.g. System.CodeDom seemed like a close match- so there had to be something like that..)
Additional context
If I remove the callback interface the same process completes as expected.
The text was updated successfully, but these errors were encountered:
lipchev
changed the title
svcutil: Null exception while generating duplex client
svcutil: System.NullReferenceException while generating duplex client
Oct 7, 2021
Great- after installing the tool from the locally built nuget (replacing referenceKey with s_referenceKey), I was able to get the correct Reference.cs.
Is there a way to update the package that ships with the IDE? I found it is installed under IDE\Extensions\Microsoft\WCF Connected Service but I don't suppose there is way to set a private nuget source for it somewhere?
Describe the bug
I'm receiving a
System.NullReferenceException
(here) while attempting to generate a duplex proxy in a.net5.0
project.It seems like the
"referenceKey"
field that is being targeted here is actually named s_referenceKey.To Reproduce
[Microsoft.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
dotnet-svcutil -u "Connected Services\ChemTypesService" --verbosity Debug
lead me to:[29020.20] Importing metadata ... Error: Object reference not set to an instance of an object.
SvcutilBootstrapper
project." at Microsoft.Tools.ServiceModel.Svcutil.CodeDomHelpers.get_ReferenceKey() in /_/src/dotnet-svcutil/lib/src/CodeDomFixup/CodeDomHelpers.cs:line 29"
Expected behavior
The generated proxy contains no errors (a little message in visual studio in case of a failure would also be nice- I spent half a day looking for some nuget that I thought was missing- e.g.
System.CodeDom
seemed like a close match- so there had to be something like that..)Additional context
If I remove the callback interface the same process completes as expected.
The text was updated successfully, but these errors were encountered: