2017-05-30 12 views
0

BLOBトリガーを使用するプリコンパイルされたAzure関数をデプロイしようとしています。 機能を公開した後、私はクーズーで次のエラーを持っているし、私の機能が実行されていない:私はこのエラーを持っている理由私は理解していないAzure関数プリコンパイルされた&Blobのトリガー:関数のタイプ名が無効です

2017-05-30T14:34:11.436 Starting Host (HostId=sfl-data-forecast-dev-funcs, Version=1.0.10945.0, ProcessId=17328, Debug=True, Attempt=0) 
2017-05-30T14:34:11.436 Development settings applied 
2017-05-30T14:34:11.436 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.). 
2017-05-30T14:34:11.436 Job host started 
2017-05-30T14:34:11.436 The following 1 functions are in error: 
Import: The function type name 'Forecasts.Functions.ImportForecastsFunction' is invalid. 

。 Azure関数はフレームワーク4.6.1を対象とするWebプロジェクトにあります。 WebJob SDK、および拡張機能のnugetパッケージが追加されました。 Newtonsoft.Jsonをバージョン9.01にダウングレードしましたが、何も変更されませんでした。

私は、次のfunction.json持っている:https://docs.microsoft.com/en-us/azure/architecture/best-practices/naming-conventionsによると

{ 
    "scriptFile": "..\\bin\\SFL.Data.Forecasts.Functions.dll", 
    "entryPoint": "SFL.Data.Forecasts.Functions.ImportForecastsFunction.Run", 
    "bindings": [ 
    { 
     "name": "file", 
     "type": "blobTrigger", 
     "direction": "in", 
     "path": "forecasts/{name}", 
     "connection": "HotStorageAccount.ConnectionString" 
    } 
    ], 
    "disabled": false 
} 
+0

(あなたのhost.jsonファイルがある関数スクリプトのルートフォルダから)あなたが持っているフォルダ構造を共有できますか? –

答えて

0

を - 関数は、英数字のみ+ハイフン文字でなければなりません。

を削除してください。あなたの関数名の文字(UIにログインして手動で新しい関数を作成することでこれをテストするのが最も簡単かもしれません)。

0

私はAzure関数ファイルの名前空間を提供することでこの問題を解決しました。

名前空間MyProject.AppFunctions

これは私のクラスである:

namespace MyProject.AppFunctions 
{ 
    public static class SomeFunction 
    { 
     public static async Task<HttpResponseMessage> Run(...) 
     { 
      // CODE 
     } 
    } 
} 

これは私のfunctions.jsonファイルです:

{ 
    "scriptFile": "..\\bin\\MyProject.AppFunctions.dll", 
    "entryPoint": "MyProject.AppFunctions.SomeFunction.Run", 
... 
} 
0

FWIW、私はちょうど同じことを決議問題。問題は私のデバッガ設定では、func.exeアプリケーションの古いバージョンを指していたことです。代わりに%AppData%\npm\func.cmdを起動するようにデバッガの設定を変更し、すべて正常に機能しました。

+0

'func.cmd'を使ってコードをデバッグできますか?私は 'AppData \ Local \ Azure.Functions.Cli \ 1.0.4 \ func.exe'から' AppData \ Roaming \ npm \ func.cmd'に切り替えましたが、私のブレークポイントはヒットしません。 –

+0

ブレークポイントも使用していません。非常にイライラする、本当に。 –

+1

ちなみに、私はちょうどデバッグを行うことができましたが、いくつかのステップが必要です... 1.再利用可能な場所で "func host start"を呼び出すバッチファイルを作成します。 2. \ bin \ debug \ netstandard2.0フォルダを指す作業フォルダを持つバッチファイルへのショートカットを作成します。 3.デバッガをdotnetプロセスに手動で接続する –

関連する問題