###■やりたいこと
Azure Bot Serviceをローカルでデバック実行したい
###■使用環境
PC : Surface Book
OS:Windows 10 Professional
開発ツール:VIsual Studio Professional 2015
###■試したこと
① Azure Bot Service作成
※BOT Basicテンプレートを使用
② 下記を参考に、ローカルでのデバッグ実行環境の整備を実施
https://docs.microsoft.com/ja-jp/bot-framework/azure/azure-bot-service-debug-bot#a-iddebug-csharpa-debug-a-c-bot
※下記の事前準備は完了
Download the source code for your bot (from Azure), as described in Set up continuous integration.
Download and install the Bot Framework Emulator.
Install the Azure Functions CLI.
Install the DotNet CLI.
###■問題点
①「project.json」ファイルがあるフォルダで「dotnet restore」を実行するとエラーになりデバッグ実行できない
・エラー内容:
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
・「project.json」ファイルの中身
{ "frameworks": { "net46":{ "dependencies": { "Microsoft.Bot.Builder.Azure": "3.2.2" } } } }
###■質問内容
① 問題点①では、フォルダ構成を変更し、「dotnet restore」コマンドを実行すると、
「warning : Unable to find a project to restore!」と警告メッセージが出たが、
どのように対応したらよいのか。
・「dotnet restore」コマンドの実行結果:
C:\Program Files\dotnet\sdk\2.1.0-preview1-006474\NuGet.targets(102,5): warning : Unable to find a project to restore! [C:\Users\[ユーザ名]\・・・\Bot.sln]
・変更前のフォルダ構成(Azureからソースコードをダウンロードしてきた状態)
messages |--EchoDialog.csx |--function.json |--project.json |--project.lock.json |--run.csx PostDeployScripts |--runGulp.cmd .gitignore Bot.sln commands.json debughost.cmd host.json readme.md
・変更後のフォルダ構成(フラット状態)
EchoDialog.csx function.json project.json project.lock.json run.csx runGulp.cmd .gitignore Bot.sln commands.json debughost.cmd host.json readme.md
② 質問①で示した「dotnet restore」コマンド実行後、試しに「debughost.cmd」を実行したが、
以下のような結果となり、デバッグ実行できなかったが、何が問題なのか。
App Settings: Connection Strings: %%%%%% %%%%%% @ %%%%%% @ @@ %%%%%% @@ @@@ %%%%%%%%%%% @@@ @@ %%%%%%%%%% @@ @@ %%%% @@ @@ %%% @@ @@ %% @@ %% % Listening on http://localhost:3978/ Hit CTRL-C to exit... Reading host configuration file 'C:\Users\[username]\・・・\host.json' Generating 0 job function(s) Starting Host (HostId=79a1b3fd3fc54d648b6eb1c231411619, Version=1.0.10826.0, ProcessId=15780, Debug=False, Attempt=0) No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.). Job host started Executing HTTP request: { "requestId": "e716f341-dfe2-4ca8-817f-b9c0ae667d45", "method": "GET", "uri": "/" } Executed HTTP request: { "requestId": "e716f341-dfe2-4ca8-817f-b9c0ae667d45", "method": "GET", "uri": "/", "authorizationLevel": "Anonymous" } Response details: { "requestId": "e716f341-dfe2-4ca8-817f-b9c0ae667d45", "status": "OK" } Debugger listening on [::]:5858
以上、よろしくお願いいたします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/07/29 08:55