简体   繁体   English

命名空间“Microsoft.WindowsAzure”中不存在类型或命名空间名称“诊断”

[英]Type or namespace name 'Diagnostics' does not exist in the namespace 'Microsoft.WindowsAzure'

I'm working with a pre-existing codebase from a software developer that has left my company.我正在使用一个已经离开我公司的软件开发人员的预先存在的代码库。 I've downloaded the source code from the repository.我已经从存储库下载了源代码。 When I attempt to build the project, I get an error that says:当我尝试构建项目时,我收到一条错误消息:

The type or namespace name 'Diagnostics' does not exist in the namespace 'Microsoft.WindowsAzure' (are you missing an assembly reference?)  

I can't figure out how to get this project up-and-running.我不知道如何启动并运行这个项目。 When I look at the NuGet packages associated with the project, I can see that the Windows Azure Configuration Manager and Windows Azure Storage packages are already installed.当我查看与项目关联的 NuGet 包时,我可以看到 Windows Azure 配置管理器和 Windows Azure 存储包已经安装。 I'm not sure what I'm missing though.我不确定我错过了什么。

Can someone tell me what I need to install on my machine to get past this error?有人能告诉我我需要在我的机器上安装什么才能克服这个错误吗? Thanks!谢谢!

I recently had this error.我最近遇到了这个错误。 The problem was that the project was referencing Framework 3.5 and I have the 2.4 SDK installed which targets 4.0.问题是该项目引用了 Framework 3.5,而我安装了针对 4.0 的 2.4 SDK。 Upgrade your project to target 4.0 and you should be fine.将您的项目升级到目标 4.0,您应该没问题。

I was getting this error on Visual Studio 2015 Update 3. This project's Azure Tools verion is 2.9.我在 Visual Studio 2015 更新 3 上收到此错误。该项目的 Azure 工具版本是 2.9。

I resolved this error by right clicking References under the project that has the error, then clicking Add Reference, then click Extensions under Assemblies.我通过右键单击出现错误的项目下的“引用”,然后单击“添加引用”,然后单击“程序集”下的“扩展”来解决此错误。 Find Microsoft.WindowsAzure.Diagnostics, check the box, and click OK.找到 Microsoft.WindowsAzure.Diagnostics,选中复选框,然后单击确定。 Now try rebuilding your project and hope for a different error.现在尝试重建您的项目并希望出现不同的错误。

The assembly should exist on your computer here: C:\\Program Files\\Microsoft SDKs\\Azure.NET SDK\\v2.9\\bin\\plugins\\Diagnostics\\Microsoft.WindowsAzure.Diagnostics.dll该程序集应存在于您的计算机上:C:\\Program Files\\Microsoft SDKs\\Azure.NET SDK\\v2.9\\bin\\plugins\\Diagnostics\\Microsoft.WindowsAzure.Diagnostics.dll

If you do not see this assembly, it's most likely because you do not have the required Azure SDK.如果您没有看到此程序集,很可能是因为您没有所需的 Azure SDK。 If you are using Azure SDK v2.9 like I am, you can download the SDKs here: Microsoft Azure SDK for .NET - 2.9如果您像我一样使用 Azure SDK v2.9,可以在此处下载 SDK: Microsoft Azure SDK for .NET - 2.9

Then click download and select:然后点击下载并选择:

  • MicrosoftAzureLibsForNet-x64.msi (Microsoft Azure Client Libraries for .NET) MicrosoftAzureLibsForNet-x64.msi(用于 .NET 的 Microsoft Azure 客户端库)
  • MicrosoftAzureTools.VS.140 (Microsoft Azure Tools for Microsoft Visual Studio 2015) MicrosoftAzureTools.VS.140(Microsoft Visual Studio 2015 的 Microsoft Azure 工具)

If you are using Azure SDK v2.7 then you will want to use this link: Microsoft Azure SDK for .NET - 2.7如果您使用的是 Azure SDK v2.7,则需要使用此链接: Microsoft Azure SDK for .NET - 2.7

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 命名空间“Microsoft.WindowsAzure”中不存在类型或命名空间名称“Storage” - The type or namespace name 'Storage' does not exist in the namespace 'Microsoft.WindowsAzure' 使用Microsoft.WindowsAzure在命名空间中不存在StorageClient - StorageClient does not exist in the namespace using Microsoft.WindowsAzure Azure 内部版本 - 名称空间“Microsoft”中不存在类型或名称空间名称“OpenApi” - Azure Builds - The type or namespace name 'OpenApi' does not exist in the namespace 'Microsoft' 命名空间“Microsoft”中不存在类型或命名空间名称“Bot”? - The type or namespace name 'Bot' does not exist in the namespace 'Microsoft'? 命名空间“Microsoft”中不存在类型或命名空间名称“ServiceBus” - The type or namespace name 'ServiceBus' does not exist in the namespace 'Microsoft' 命名空间“Microsoft”中不存在类型或命名空间名称“Azure” - The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' 命名空间“Microsoft”中不存在类型或命名空间名称“ServiceBus”? - The type or namespace name 'ServiceBus' does not exist in the namespace 'Microsoft'? 命名空间“Microsoft”中不存在类型或命名空间名称“AspNetCore” - The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' 错误 CS0234:命名空间“Microsoft”中不存在类型或命名空间名称“Azure”(您是否缺少程序集引用?) - error CS0234: The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) 命名空间“Microsoft.Bot.Builder”中不存在类型或命名空间名称“Dialogs” - The type or namespace name 'Dialogs' does not exist in the namespace 'Microsoft.Bot.Builder'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM