github からの自動 git デプロイでうまく動作している azure サイトを持っています。今、ASP.Net MVC 5.2.2 を使用するようにサイトを更新しましたが、デプロイは「型または名前空間名 'AllowAnonymous' が見つかりませんでした」で失敗します。
nuget パッケージを再度ダウンロードする必要があるように、サイトをクリーンなディレクトリに複製しても、サイトはローカル マシン上で問題なくビルドされます。
失敗したcsprojファイルのMVCパッケージへの参照は、誤ってGACed dllではなくパッケージを参照していることを示しています。
<Reference Include="System.Web.Mvc, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.2\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference>
ビルドに失敗する最新バージョンはhttps://github.com/KentorIT/authservices/commit/665fad58e64646da72ccc58ff080e0f7d71cc234です。
完全なエラー
コマンド: 「D:\home\site\deployments\tools\deploy.cmd」
.NET Web アプリケーションの展開を処理します。
Kentor.AuthServices -> D:\home\site\repository\Kentor.AuthServices\bin\Release\Kentor.AuthServices.dll
AuthServicesController.cs(13,6): エラー CS0246: 型または名前空間名 'AllowAnonymous' が見つかりませんでした (using ディレクティブまたはアセンブリ参照がありませんか?) [D:\home\site\repository\Kentor.AuthServices .Mvc\Kentor.AuthServices.Mvc.csproj]
AuthServicesController.cs(13,6): エラー CS0246: 型または名前空間名 'AllowAnonymousAttribute' が見つかりませんでした (using ディレクティブまたはアセンブリ参照がありませんか?) [D:\home\site\repository\Kentor.AuthServices .Mvc\Kentor.AuthServices.Mvc.csproj]
失敗した exitCode=1, command="D:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "D:\home\site\repository\Kentor.AuthServices.StubIdp\Kentor.AuthServices.StubIdp.csproj " /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="C:\DWASFiles\Sites\~1stubidp\Temp\3173ac06-c440-4bd9-a8c5-f27fecf3d007";AutoParameterizationWebConfigConnectionStrings=false;Configuration=リリース /p:構成=リリース
Web サイトの展開中にエラーが発生しました。
.NET Web アプリケーションの展開を処理します。
Kentor.AuthServices -> D:\home\site\repository\Kentor.AuthServices\bin\Release\Kentor.AuthServices.dll
AuthServicesController.cs(13,6): エラー CS0246: 型または名前空間名 'AllowAnonymous' が見つかりませんでした (using ディレクティブまたはアセンブリ参照がありませんか?) [D:\home\site\repository\Kentor.AuthServices .Mvc\Kentor.AuthServices.Mvc.csproj]
AuthServicesController.cs(13,6): エラー CS0246: 型または名前空間名 'AllowAnonymousAttribute' が見つかりませんでした (using ディレクティブまたはアセンブリ参照がありませんか?) [D:\home\site\repository\Kentor.AuthServices .Mvc\Kentor.AuthServices.Mvc.csproj]
失敗した exitCode=1, command="D:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "D:\home\site\repository\Kentor.AuthServices.StubIdp\Kentor.AuthServices.StubIdp.csproj " /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="C:\DWASFiles\Sites\~1stubidp\Temp\3173ac06-c440-4bd9-a8c5-f27fecf3d007";AutoParameterizationWebConfigConnectionStrings=false;Configuration=リリース /p:構成=リリース
Web サイトの展開中にエラーが発生しました。
D:\Program Files (x86)\SiteExtensions\Kudu\30.31023.1215\bin\scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"