Error deploying MVC4 project: cannot find file or assembly

In the past, I deployed my MVC4 website (before AWS Elastic Beanstalk), just using the Publish to AWS menu item in Visual Studio 2012.

Now the program compiles and runs locally, but does not deploy. From the messages it seems that they are looking for files that are not in the current project, and are not links for the current project.

He expands about some attempts, the error is that a file, which, undoubtedly, in the file system and in the project, cannot be found. It seems that VS is looking in the wrong places for files that are not required.

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 

I cleaned the project, repaired VS2012, but the errors persist!

+3
c # amazon-web-services visual-studio-2012
source share
1 answer

[Edit] As Jim Flanagan said in the comments, this is an R # integration problem (Resharper 8.2). When R # is off (deployment Tools | Options | Resharper | Suspend Now) has completed successfully. (See http://youtrack.jetbrains.com/issue/RSRP-411186#tab=Similar%20Issues )

R # also ( http://youtrack.jetbrains.com/issue/RSRP-411186 ) recommends

enable / disable the ability to use msbuild to get links to the project. You can find such an option in R # โ†’ Options-> VS Integration-> Use msbuild to get links

I was not able to find this option on my system (the VS Integration option is missing, just a โ€œkeyboard and menuโ€), but completely disables R # before the deployment works like a charm.

+7
source share

All Articles