加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – 下载在门户网站上创建的僵尸程序会导致无效/不可执行的解

发布时间:2020-12-15 22:42:21 所属栏目:百科 来源:网络整理
导读:我去了Azure门户试用Bot框架.我按照步骤创建了一个Proactive bot. 在没有改变的情况下,我去配置持续集成并下载了zip文件. 当我尝试在Visual Studio 2015中打开该SLN文件时,打开解决方案时出现以下错误: “输出”窗口在“解决方案”下拉列表中显示: Some of
我去了Azure门户试用Bot框架.我按照步骤创建了一个Proactive bot.

在没有改变的情况下,我去配置持续集成并下载了zip文件.

当我尝试在Visual Studio 2015中打开该SLN文件时,打开解决方案时出现以下错误:

Popup error

“输出”窗口在“解决方案”下拉列表中显示:

Some of the properties associated with the solution could not be read.

这是解决方案资源管理器的屏幕截图:

solution explorer

然后我按F5测试它…

running it

它应该运行吗?我应该做点什么吗?

解决方法

编辑:
本地调试Azure功能应用程序(这是由Bot服务创建的应用程序类型)目前有点复杂.该过程也在Azure SDK 2.9.6和3.0之间进行更改. VS2017的工具也正在进行一些更改: .NET Web Development and Tools Blog

Update 3-10-2017: This preview copy of Azure Functions Tools does not
work with the newly released Azure SDK 3.0. If you want to continue
using these tools on Visual Studio 2015,you will need to remain on
the 2.9.6 SDK. Additionally,there are no Azure Function Tools
currently available for Visual Studio 2017. We are actively working
on the 2017 tools,and will provide an update in the next few weeks
regarding our plans and strategy.

这篇由Benjamin Perkins撰写的博文有一个很好的演练:https://blogs.msdn.microsoft.com/benjaminperkins/2016/12/01/how-i-tested-my-chatbot-that-i-created-using-the-bot-services-on-azure/

还有这个:Debugging Bots Built using Azure Bot Service on Windows

The C# environment in Azure Bot Service has more in common with
Node.js than a typical C# app because it requires a runtime host,much
like the Node engine. In Azure,the runtime is part of the hosting
environment in the cloud,but you’ll need to replicate that
environment locally on your desktop.

首先,您需要设置您的环境.你需要:

  1. A local copy of your Azure Bot Service code (see Setting up Continuous Integration )
  2. The Bot Framework Emulator
  3. The Azure Functions CLI
  4. DotNet CLI

and if you want breakpoint debugging in Visual Studio 15:

  1. Visual Studio 15—the Community Edition will work fine
  2. The Command Task Runner Visual Studio Extension

After installing the tools above,you have everything you need to
debug your C# bot locally.

Open a command prompt and navigate to the folder where your
project.json file lives in your repository. Issue the command dotnet
restore to restore the various packages referenced in your bot.

Note: Visual Studio 2017 RC is changing how it handles dependencies
from a project.json to a .csproj model when loading in Visual Studio.
As a result,you will need to download the csproj here:
07003 and save the .csproj into your
/repo/messages folder before running the dotnet restore command.

请注意这些也是要求:
Azure 2.9.6 .NET SDK
Visual Studio Tools for Azure Functions

这就是:https://blogs.msdn.microsoft.com/appserviceteam/2017/03/16/publishing-a-net-class-library-as-a-function-app/您将找到如何从visual studio发布功能应用程序的说明,以及如何在Visual Studio中下载和执行现有的功能应用程序.

  1. Install the Azure Functions CLI from npm.
    If you’ve installed the Visual Studio Tools for Azure Functions,just add func.exe to your path from %USERPROFILE%AppDataLocalAzure.Functions.Cli1.0.0-beta.93 (or the latest version on your machine).

  2. Go to the Kudu console for your Function App in Function App Settings -> Kudu. Navigate to site and click on the download icon to the left of wwwroot (click on the animated gif below). Or,from an authenticated session,go to 07007.

  3. Unzip the file wwwroot.zip on your local machine. From that directory,run the following:

func azure login
func azure functionapp list
func azure functionapp fetch-app-settings [name]

This will create a local file called appsettings.json. These settings
are only used locally by the Functions CLI. Since this file contains
secrets,be sure not to check this file in to source control! (The
Azure Functions CLI adds appsettings.json to .gitignore for you.)

Copy your downloaded files to the web project?folder (including appsettings.json). Include the script files and function.json in the project. F5 should now work and successfully attach a debugger.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读