0
votes

Hi am getting the following error when publishing this particular MVC application running on .netframework 4.5 to IIS7 (windows 2008)and IIS8 (windows 2012 )servers;

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4077,5): Warning : Setting both property values of DeployAsIisApp and IncludeIisSettingsOnPublish to true is not recommended, as IncludeIisSettingsOnPublish is a superset of DeployAsIisApp Transformed Web.config using E:\INSPNIA_WB0R5L90SUPDATED\INSPNIA_WB0R5L90S\MVC5_Full_Version\PCA\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config. Auto ConnectionString Transformed Views\Web.config into obj\Release\CSAutoParameterize\transformed\Views\Web.config. Auto ConnectionString Transformed obj\Release\TransformWebConfig\transformed\Web.config into obj\Release\CSAutoParameterize\transformed\Web.config. Copying all files to temporary location below for package/publish: obj\Release\Package\PackageTmp. Adding sitemanifest (sitemanifest). Adding appHostConfig (Default Web Site/PCA). C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4270,5): Error : Web deployment task failed. (Source (appHostConfig=Inspinia_MVC5) and destination (appHostConfig=Default Web Site/PCA) are not compatible for the given operation.) Publish failed to deploy.

any help on resolving this will be appreciated. NB i have other solutions that are using the same framework and they are able to publish successfully hence i think it is a problem in the specific slution but am not able to figure out the exact issue

2
noticed VS is Adding child appHostConfig (sitemanifest/appHostConfig[@path='Default Web Site/PCA']/site[@name='Inspinia_MVC5']). that is causing this error how can i remove it? ie this child appHostConfig ?Martin Wambugu

2 Answers

1
votes

for the sake of someone who might experience the same....this worked for me

Replaced the following XML tags in the csproj file

<UseIISExpress>True</UseIISExpress> with <UseIISExpress>False</UseIISExpress>
<UseIIS>False</UseIIS> with <UseIIS>True</UseIIS>
<IncludeIisSettings>False</IncludeIisSettings> with <IncludeIisSettings>true</IncludeIisSettings>
0
votes

In your solution explorer, right click your web application > Properties and then check your items to deploy. Uncheck(include IIS settings as configured in IIS Express).

You might also try deleting everything from your bin and rebuilding.