I have a web application that's failing to publish, from the command line.
It's a VS2013 web application project, with a publish profile defined:
When I publish from within the IDE, everything works fine.
When I publish from the command line:
msbuild myapp.sln /property:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=myapp
I get errors:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Transform\Microsoft.Web.Publishing.AspNetCompileMerge.targets(411,5):
error : Can't find the valid AspnetCompilerPath [E:\dev\korweb_ws\trunk\korweb_ws\korweb_ws.csproj]
Any ideas as to what might be going on?
I know your question has been open for over a month - hoping you were able to solve it by now. If not, I hope this helps.
Try setting the "AspnetCompilerPath" value on the command line to the absolute path to the appropriate .NET framework folder. For example, for 64-bit .NET 4, the path might be like this:
/p:AspnetCompilerPath="C:\windows\Microsoft.NET\Framework64\v4.0.30319"
That's what worked for me, when I had a similar issue.
-Brian
I know that windows Azure is not mentioned in the OP, but I ran into this problem too trying to publish to Azure. This question came up in my search for an answer, so I'm posting here so maybe it will help someone else in my position.
What worked for me was to download the publish profile (again) and then redeploy. After that, publish worked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With