简体   繁体   English

NuGet for Microsoft.Azure软件包

[英]NuGet for Microsoft.Azure packages

I am trying to write an application that uses Microsoft Azure. 我正在尝试编写使用Microsoft Azure的应用程序。 I am using VS2012 and have installed update 5. I also updated NuGet to the latest version. 我正在使用VS2012,并已安装更新5。我还将NuGet更新为最新版本。

In my code, I am using the following: 在我的代码中,我正在使用以下代码:

    using Microsoft.Azure.Management.Compute;
    using Microsoft.Azure.Management.Compute.Models;
    using Microsoft.Azure.Management.Fluent;
    using Microsoft.Azure.Management.Resource.Fluent.Authentication;
    using Microsoft.Azure.Management.Resource.Fluent.Core;

When I go to package manager, 'Microsoft.Azure.Management.Compute' installs successfully, but the Fluent and Resource packages won't - it says that it's unable to find the packages. 当我转到程序包管理器时,“ Microsoft.Azure.Management.Compute”安装成功,但是Fluent和Resource程序包无法安装-表示无法找到这些程序包。

Does anyone have any thoughts on what I'm missing? 有人对我缺少的东西有任何想法吗?

Good day, 美好的一天,

You need to install the Microsoft.Azure.Management.Fluent package as well. 您还需要安装Microsoft.Azure.Management.Fluent程序包。 In Package Manager Console, target your project and run: 在Package Manager控制台中,定位您的项目并运行:

Install-Package Microsoft.Azure.Management.Fluent -Pre 安装软件包Microsoft.Azure.Management.Fluent -Pre

This is a pre-release package so it will not show up unless you include the -Pre option or select the Include prerelease option within the NuGet window (if you are adding packages this way). 这是一个预发行软件包,因此除非您包括-Pre选项或在NuGet窗口中选择Include prerelease选项(如果您以这种方式添加软件包),否则它将不会显示。

Carl 卡尔

OK, it's taken me a little while to get to the bottom of this, but here is what went wrong. 好的,花了我一点时间才能弄清楚这个问题,但是这里出了问题。 The project started life on VS2012 with .Net 4.5. 该项目以.Net 4.5在VS2012上开始使用。 I then went through various upgrades to VS2012 update 5, latest version of NuGet, .Net 4.6.2. 然后,我经历了VS2012更新5的各种升级,最新版本的NuGet,.Net 4.6.2。 When that didn't work, I spun up a development machine on Azure with VS2015 (update 3 and .Net 4.6.2) and moved the project over but that still didn't work. 如果那行不通,我用VS2015(更新3和.Net 4.6.2)在Azure上启动了一个开发机器,并将项目移了过来,但是仍然行不通。

The problem was that there were too many dependencies that tagged along from the original project. 问题是原始项目中标记的依赖项太多。 The answer was to start a fresh project on the Azure machine, copy my code over and then install the various Azure packages - it worked first time. 答案是在Azure机器上启动一个新项目,复制我的代码,然后安装各种Azure程序包-它是第一次工作。

暂无
暂无

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

相关问题 Azure 和 Microsoft.Azure 命名空间之间的冲突 - Conflict between Azure and Microsoft.Azure namespaces 在Visual Studio Mac中找不到命名空间Microsoft.Azure - Cannot find namespace Microsoft.Azure in Visual Studio Mac 无法在NuGet包上找到Microsoft.Azure.Services.AppAuthentication - Unable to find Microsoft.Azure.Services.AppAuthentication on NuGet Packages Microsoft Azure C#:工作区“Microsoft.Azure”中不存在类型或命名空间“Cosmos” - Microsoft Azure C#: The type or namespace 'Cosmos' does not exist in the workspace 'Microsoft.Azure' Microsoft.Azure.Management.Resourcemanager.Fluent 和 Microsoft.Azure.Management.Fluent Z0558440846982BFE7FF23B159C377F9B 包有什么区别? - What is the difference between Microsoft.Azure.Management.Resourcemanager.Fluent and Microsoft.Azure.Management.Fluent nuget packages? 替代 https://www.nuget.org/packages/Microsoft.Azure.ApplicationInsights/ - Alternative to https://www.nuget.org/packages/Microsoft.Azure.ApplicationInsights/ Microsoft.Azure.Storage 和 WindowsAzure.Storage Nuget 包之间有什么区别? - What is the difference between the Microsoft.Azure.Storage and WindowsAzure.Storage Nuget packages? Azure DevOps 将 NuGet 包升级到发布视图 - Azure DevOps Promote NuGet packages to Release view 如何在 azure devops 中使用 nuget 包? - How to use nuget packages in azure devops? 访问 Azure 管道中私有 Nuget 服务器中托管的 Nuget 包 - Access Nuget Packages hosted in private Nuget Server in Azure Pipelines
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM