NuGet for Microsoft.Azure软件包 [英] NuGet for Microsoft.Azure packages

查看:56
本文介绍了NuGet for Microsoft.Azure软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个使用Microsoft Azure的应用程序.我正在使用VS2012,并已安装更新5.我还将NuGet更新为最新版本.

I am trying to write an application that uses Microsoft Azure. I am using VS2012 and have installed update 5. I also updated NuGet to the latest version.

在我的代码中,我正在使用以下内容:

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;

当我进入程序包管理器时,"Microsoft.Azure.Management.Compute"安装成功,但是Fluent和Resource程序包却无法安装-表示找不到程序包.

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.

有人对我所缺少的东西有任何想法吗?

Does anyone have any thoughts on what I'm missing?

推荐答案

好的,花了我一些时间才能深入浅出,但这是哪里出了问题.该项目以.Net 4.5在VS2012上开始使用.然后,我经历了对VS2012 Update 5的各种升级,最新版本的NuGet,.Net 4.6.2.如果那行不通,我用VS2015(更新3和.Net 4.6.2)在Azure上启动了一个开发机器,并将项目移了过来,但是仍然行不通.

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. I then went through various upgrades to VS2012 update 5, latest version of 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.

问题在于原始项目中标记的依赖项太多.答案是在Azure机器上启动一个新项目,复制我的代码,然后安装各种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.

这篇关于NuGet for Microsoft.Azure软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆