8

VisualStudioで次の11個のエラーが発生し続けます。

Error   456 Could not copy the file "_bin_deployableAssemblies\de\System.Web.Mvc.resources.dll" because it was not found.   ViMuDat
Error   457 Could not copy the file "_bin_deployableAssemblies\de\WebMatrix.WebData.resources.dll" because it was not found.    ViMuDat
Error   458 Could not copy the file "_bin_deployableAssemblies\de\WebMatrix.Data.resources.dll" because it was not found.   ViMuDat
Error   459 Could not copy the file "_bin_deployableAssemblies\de\System.Web.WebPages.resources.dll" because it was not found.  ViMuDat
Error   460 Could not copy the file "_bin_deployableAssemblies\de\System.Web.WebPages.Razor.resources.dll" because it was not found.    ViMuDat
Error   461 Could not copy the file "_bin_deployableAssemblies\de\System.Web.WebPages.Deployment.resources.dll" because it was not found.   ViMuDat
Error   462 Could not copy the file "_bin_deployableAssemblies\de\System.Web.WebPages.Administration.resources.dll" because it was not found.   ViMuDat
Error   463 Could not copy the file "_bin_deployableAssemblies\de\System.Web.Razor.resources.dll" because it was not found. ViMuDat
Error   464 Could not copy the file "_bin_deployableAssemblies\de\System.Web.Helpers.resources.dll" because it was not found.   ViMuDat
Error   465 Could not copy the file "_bin_deployableAssemblies\de\NuGet.Core.resources.dll" because it was not found.   ViMuDat
Error   466 Could not copy the file "_bin_deployableAssemblies\de\Microsoft.Web.Infrastructure.resources.dll" because it was not found. ViMuDat

Visual Studio 2010で開発されたプロジェクトをビルドしようとしていますが、Visual Studio 2012を使用しています。2回ビルドすると、エラーなしで動作します。

どうすれば修正できますか?

Bin Deploying ASP.NET MVC 3_bin_deployableAssembliesおよびMSBuildを見つけましたが、これらのエラーを修正することができませんでした。誰かが私が何をすべきかを段階的に説明してもらえますか?私はC#とVisualStudioを初めて使用します。

このエラーは、プロジェクトをTFSにチェックインできない理由でもあると思います。

私のbinフォルダには次のアセンブリがあります。

D:\...\bin> ls
Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        18.12.2012     23:53            de
-a---        15.12.2012     21:11     783648 EntityFramework.dll
-a---        15.12.2012     21:11     834489 EntityFramework.xml
-a---        18.12.2012     23:53      42496 LumenWorks.Framework.IO.dll
-a---        18.12.2012     23:53     116224 LumenWorks.Framework.IO.pdb
-a---        18.03.2010     18:31      53640 System.ComponentModel.DataAnnotati
                                             ons.dll
-a---        18.03.2010     18:31    1328984 System.Data.dll
-a---        18.03.2010     18:31     919880 System.dll
-a---        18.03.2010     18:31      24944 System.Web.Abstractions.dll
-a---        18.03.2010     18:31    2824528 System.Web.dll
-a---        05.01.2011     14:45     130408 System.Web.Helpers.dll
-a---        03.05.2012     08:55      37861 System.Web.Helpers.xml
-a---        05.01.2011     16:42     445280 System.Web.Mvc.dll
-a---        03.05.2012     08:51     777665 System.Web.Mvc.xml
-a---        18.03.2010     18:31      24928 System.Web.Routing.dll
-a---        05.01.2011     14:45     136552 System.Web.WebPages.dll
-a---        03.05.2012     08:55      51735 System.Web.WebPages.xml
-a---        18.03.2010     18:31     941904 System.Xml.dll
-a---        18.12.2012     23:53     244736 ViMuDat.dll
-a---        18.12.2012     23:53     321024 ViMuDat.pdb
-a---        18.12.2012     23:53     125308 ViMuDat.XML
D:\...\bin\de> ls
Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---        12.01.2011     16:04      15720 System.Web.Helpers.resources.dll
-a---        12.01.2011     17:24      32096 System.Web.Mvc.resources.dll
-a---        12.01.2011     16:04      15208 System.Web.WebPages.resources.dll
4

2 に答える 2

9

MVC 3をビン展開している場合は、展開にパッケージ化する必要のあるアセンブリがいくつかあります。 スコット・ハンゼルマンは、何をどこで行ったかについてもよく書いています。

アセンブリをコピーした場合は、ユーザーがVisualStudioプロジェクトに「コンテンツ」として追加するようにします。その後、ビルド時にbinディレクトリの正しい構造に自動的にコピーされます。

編集:これは問題を解決するのに役立った記事の情報でした:

C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies

C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies不足しているdllが含まれていました

_bin_deployableAssembliesそれらのdllは、私のプロジェクトに手動でコピーする必要がありました。

于 2012-12-19T09:10:23.640 に答える
5

nugetを介してパッケージをインストールする方が簡単な場合があります。

NuGetは、プロジェクトの依存関係を簡単にインストールおよび更新できるパッケージマネージャーです。ここからインストールできるVisualStudio拡張機能です。

まだASP.NETMVC3を使用している場合は、コマンドを使用して古いバージョンのパッケージをインストールできますInstall-Package Microsoft.AspNet.Mvc -Version 3.0.20105.1

binこれにより、プロジェクトのビルド時にフォルダーに含まれる通常の参照としてバイナリが追加されます。_bin_deployableAssembliesこれにより、アプローチを行う必要がなくなります。他のほとんどの人気のあるサードパーティフレームワーク(および多くの新しいMicrosoft Webスタック)もnugetで利用できます。

于 2012-12-19T09:26:18.843 に答える