【发布时间】:2014-04-11 07:43:25
【问题描述】:
过去,我只需使用 Visual Studio 2012 的“发布到 AWS”菜单项即可部署我的 MVC4 网站(到 AWS Elastic Beanstalk)。
现在,程序在本地编译并运行,但部署失败。从消息来看,它似乎正在寻找不在当前正在部署的项目中的文件,也不是当前项目的引用。
在一些尝试的部署中,错误是无法找到文件系统和项目中毫无疑问的文件。 VS 似乎在错误的位置搜索不需要的文件。
Commencing deployment for project MyWebApp.UI
...building deployment package obj\Debug\Package\Archive...
...package build 'CopyPipelineFiles': error in 'C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets' at (2567,5): Copying file Content\bootstrap-fam-fam\css\fam-icons.css to obj\Debug\Package\PackageTmp\Content\bootstrap-fam-fam\css\fam-icons.css failed. Could not find a part of the path 'C:\MyWebApp\MyWebApp\MyWebApp.Model.Test\obj\Debug\Package\PackageTmp\Content\bootstrap-fam-fam\css\fam-icons.css'.
...build of project archive failed, abandoning deployment
Commencing deployment for project MyWebApp.UI
...building deployment package obj\Debug\Package\Archive...
...package build 'ResolveAssemblyReference': warning in 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets' at (1605,5): Could not resolve this reference. Could not locate the assembly "WebActivator". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
...package build 'ResolveAssemblyReference': warning in 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets' at (1605,5): Could not resolve this reference. Could not locate the assembly "WebGrease". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
...package build 'CopyPipelineFiles': error in 'C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets' at (2185,5): Copying file Web.config to obj\Debug\CSAutoParameterize\original\Web.config failed. Could not find file 'C:\MyWebApp\MyWebApp\Amazon\obj\Debug\CSAutoParameterize\original\Web.config'.
...build of project archive failed, abandoning deployment
我清理了项目,修复了VS2012,但错误仍然存在!
【问题讨论】:
-
我也有同样的问题(虽然我也挂了@组装包)。看起来它正在 c:\WINDOWS\System32 中寻找 web.config... -- ...package build 'ResolveAssemblyReference': error in 'Web.config' at (0,0): Application Configuration file "Web .config”无效。找不到文件“C:\WINDOWS\system32\Web.config”。
-
请查看更新后的答案
标签: c# visual-studio-2012 amazon-web-services