We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This issue has been transferred from the Azure SDK for .NET repository, #41818.
Microsoft.Azure.Devices Version="1.39.1"
ServiceClient serviceClient = new ServiceClient.Create("hostname", credential, TransportType.Amqp_WebSocket_Only);
fails to compile
compile or more meaningful error.
error CS0426: The type name 'Create' does not exist in the type 'ServiceClient'
Packages included
using Azure.Core; using Azure.Identity; using Azure.Messaging.EventHubs; using Microsoft.Azure.Devices; using Microsoft.Azure.Functions.Worker; using Microsoft.Extensions.Logging; public OPLRouting(ILogger<OPLRouting> logger) { _logger = logger; DefaultAzureCredential defaultAzureCredential = new DefaultAzureCredential(); ServiceClient serviceClient = new ServiceClient.Create(hostname, defaultAzureCredential, TransportType.Amqp_WebSocket_Only); }
$ dotnet --info .NET SDK (reflecting any global.json): Version: 6.0.402 Commit: 6862418796
Runtime Environment: OS Name: Windows OS Version: 10.0.19045 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.402\
Host: Version: 8.0.1 Architecture: x64 Commit: bf5e279d92
.NET SDKs installed: 6.0.402 [C:\Program Files\dotnet\sdk] 8.0.101 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables: Not set
The text was updated successfully, but these errors were encountered:
This can be closed. The new is not required. Would be nice if C# or VSCode gave a better error.
new
ServiceClient serviceClient = new ServiceClient.Create(hostname, defaultAzureCredential, TransportType.Amqp_WebSocket_Only);
Sorry, something went wrong.
No branches or pull requests
Issue Transfer
This issue has been transferred from the Azure SDK for .NET repository, #41818.
Please be aware that @Gamecock is the author of the original issue and include them for any questions or replies.
Details
Library name and version
Microsoft.Azure.Devices Version="1.39.1"
Describe the bug
fails to compile
Expected behavior
compile or more meaningful error.
Actual behavior
error CS0426: The type name 'Create' does not exist in the type 'ServiceClient'
Reproduction Steps
Packages included
Environment
$ dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.402
Commit: 6862418796
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.402\
Host:
Version: 8.0.1
Architecture: x64
Commit: bf5e279d92
.NET SDKs installed:
6.0.402 [C:\Program Files\dotnet\sdk]
8.0.101 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
The text was updated successfully, but these errors were encountered: