Last post Sep 04, 2019 06:22 AM by Yongqing Yu
Aug 29, 2019 09:34 AM|rohandm29|LINK
I am trying to publish a WCF service on my local machine in a folder. I am getting the below error when I try to publish -
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(1482,5): Error : Could not open Source file: Could not find file 'C:\XXXX\Api\Api\Web.config;web.config'.
The config is present without the additional web.config at the end - 'C:\XXXX\Api\Api\Web.config;'.
Does anyone has any clue why is the config name not fetching correctly?
Aug 30, 2019 09:16 AM|Yongqing Yu|LINK
According to your error message, you can follow the following steps to troubleshooting the issue.
First, you should unload your project first :
Then right click your project and choose Edit xxx.csproj:
Then it will show this file xxx.csproj and you can find the content tag in ItemGroup, verify that the content include is written by web.config.
I guess your content include written 'Web.config;web.config'. If so ,
you should change it as 'Web.config', then
Aug 30, 2019 09:44 AM|rohandm29|LINK
Thanks YongQing. I had checked for ;webconfig in project file and config tranformations already. I did not find it anywhere.
Below is the settings-
<Content Include="Concrete\Service\ScanningService.svc" />
<Content Include="Global.asax" />
<Content Include="log4net.xml" />
Sep 02, 2019 09:53 AM|Yongqing Yu|LINK
According to your description, you can try right-clicking on the project and select the
Then you can click the Build Events option to see if there is anything in it, and if so, delete it and publish it again.
Sep 03, 2019 05:12 AM|rohandm29|LINK
Nothing in there. Its empty.
Sep 04, 2019 06:22 AM|Yongqing Yu|LINK
According to your project path :
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(1482,5): Error : Could not open Source file: Could not
find file 'C:\XXXX\Api\Api\Web.config;web.config'.
I hope you can provide us with your Microsoft.Web.Publishing.targets file content, which may contain some questions.
Or you can use Web.config;web.config as a keyword to search your entire project to see if any files contain this content, and if so, change it to Web.config.