the relative content in msbuild.proj file:
<Message Text="*****check the site exists*****" Importance="high"/>
<Exec Command="C:\WINDOWS\System32\inetsrv\appcmd.exe list site /name:$(WebAppSiteName) " ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode2" />
</Exec>
<Message Text="*****if not exists create site*****" Importance="high" Condition="'$(ErrorCode2)' > '0'" />
<Exec Command="C:\WINDOWS\System32\inetsrv\appcmd.exe add site /name:$(WebAppSiteName) /bindings:http/*:80:$(SiteDomain) /applicationDefaults.applicationPool:$(WebAppSiteName) /physicalPath:$(BuildSolutionDir)$(DeployDir)Website" Condition="$(WebAppSiteName)!='' and '$(ErrorCode2)' > '0'"></Exec>
in above: the actual parameter(/physicalPath) value of runtime is : D:\YDJWebsite.Dev\deply\fw\..\..\mkltest2Website
actually, the path of above is equivalent to D:\YDJWebsite.Dev\mkltest2Website
when accessing the site, the error shows: 500 - internal server error, resource not found
if i change the path to right format "D:\YDJWebsite.Dev\mkltest2Website", the error disappeared
the physical path of website in iis shows here.
now, i know the only solution is to convert the paramter value(/physicalPath) to right format?
but how to do it in proj file? is there any suggestion ? tks.