MSBuild commandline seems to ignore publish properties
I'm trying to use msbuild to publish my application to a filesystem location. I've setup a profile from inside VS2017 and from there it works perfectly. When I run msbuild from the commandline: "msbuild application.sln /p:DeployOnBuild=true /p:PublishProfile=publishprofile" it builds the default "Debug|x86" target and nothing else. Nothing is published and the target in the publish profile is set to "release". When I specify a non-existing publish profile it still build like above, while I would expect an error telling me I specified a non-existing profile.
+1 I'm having the same issue. The following command builds correctly, but doesn't output anything to the deploy target. The exact same command works on a machine with VS2015 installed.
"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" /t:Build;Publish TCA.Web\TCA.Web.csproj /p:DeployOnBuild=true /p:PublishProfile=Deploy.pubxml /p:Configuration=Release
I see the following in the build output, but unable to extract why it happens. _DeploymentUnpublishable: Skipping unpublishable project.
It works from the Visual Studio 2017 UI. I'm running build 15.0.0+26228.10
Same for me.
Same for me too,
Same for me
Same for me
Hi, still no news from Microsoft's guys? MSBuild 14 cannot build C# 7 code.
Is it possible to build with v15 and do the publish (and only the publish) with 14?
Same here
Same for me
Same here.
Ditto.
Same here
Me as well
Same here. I try to run publish only (This method worked in previous versions) MSBuild <PROJECT_PATH> /t:publish /p:PublishProfile=<PUBLISH_PROFILE_PATH> /p:PublishRootDir=<PATH_VARIABLE_FOR_THE_PROFILE> /p:Configuration=Release
I'm also encountering the same problem
I tried to reproduce this but don't think I did, on a new WebApplication type project created in VS2015 U3 and published on the command line from both VS2015 U3 and VS2017 15.1.
Can someone affected by this please post repro steps that are excruciatingly clear, for someone who has never used "publish" before like me? Ideally with a small repro project I could build in various ways, and explicit descriptions of the behavior you expect and what you see instead.
I'm not the original reporter, but experienced this issue attempting to configure a build agent without Visual Studio - using https://aka.ms/vs/15/release/vs_buildtools.exe - excerpt from PS script:
&.\vs_buildtools.exe `
--add Microsoft.VisualStudio.Workload.MSBuildTools `
--add Microsoft.VisualStudio.Workload.WebBuildTools `
--includeRecommended --includeOptional `
--passive `
--norestart
Same here: that's ok with Enterprise VS 2017 on development machine, but nothing is published when running the same build command on a Jenkins box with the build tools (no VS installed).
Very annoying issue, has anyone found a workaround when using TFS?
We have the VS 2017 build tools installed on our build agent and see this issue with publishprofile + DeployOnBuild=true
We can't move forward with msbuild 15 because of this.
I had this issue even with VS 2017 Enterprise installed. I had to re-run the Enterprise installer and select the component "ASP.NET and web development tools" in order to get web publish to work from the build server. Now that I think about it, this seems very similar to a problem I had back around VS 2012/2013 that required the Azure SDK to be installed for web publish to work (even though I didn't need to install any Azure components this time around).