Getting an error during the deploying webapplication “Could not open Source file: Could not find a part of the path”

五迷三道 提交于 2019-12-11 03:47:54

问题


I got an error during the deploying my web-application. The title of error is Could not open Source file: Could not find a part of the path

'Could not open Source file: Could not find a part of the path 'E:\ARCHIVES\Projects\Main\Jahan.Handicraft\Jahan.Handicraft.Web.Mvc.UmbracoCms.App\obj\Release\AspnetCompileMerge\TempBuildDir\App_Plugins\UmbracoForms\Data\Web.config;\App_Plugins\UmbracoForms\Data\Web.config'.'.

I've used Umbraco 7.4.3 und ASP.NET MVC in my project. I'd like deploy it on localhost.

How can I solve this problem?


回答1:


Post installation

You should note that the Umbraco nuget package adds a build step to always include the Umbraco folders when you deploy using Web One-Click Publish with Visual Studio. You can see these folders in packages/UmbracoCms x.y.z/build/UmbracoCms.targets Should you need to exclude any of these folders or content, you can add a target to your .pubxml files in the properties/Publish folder. For instance if you need to exclude json data a plugin generates during production.

<Target Name="StopUmbracoFromPublishingAppPlugins" AfterTargets="AddUmbracoFilesToOutput">
    <ItemGroup>
      <FilesForPackagingFromProject Remove=".\App_Plugins\UmbracoForms\Data\**\*.*"/>
    </ItemGroup>
  </Target>

Reference: https://our.umbraco.org/documentation/Getting-Started/Setup/Install/install-umbraco-with-nuget#post-installation



来源:https://stackoverflow.com/questions/40824734/getting-an-error-during-the-deploying-webapplication-could-not-open-source-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!