dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.17k stars 1.34k forks source link

Publish target not working with relative path #2009

Open ipjohnson opened 7 years ago

ipjohnson commented 7 years ago

Using VS 2017 I created a new ASP.Net Core project (net461). I went to publish the project using "Web Deploy Package" option and chose a relative path ("..\output\Test.zip").

I get the following error.

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk.Publish\build\netstandard1.0\PublishTargets\Microsoft.NET.Sdk.Publish.MSDeployPackage.targets(88,5): Error : Web deployment task failed. (The path '..\output\WebApplication2.Parameters.xml' is not valid.) Package failed.

If I change the package path to be something like "C:\temp\Test.zip" it works fine and creates the package.

tomkuijsten commented 7 years ago

Thanks for the work around, I had the same issue.

Got some more detail which might be interesting. If you select a relative path it does:

VS2017 Professional (15.2.26430.6) ASP.NET Core Web Application (.NET Framework) - WebAPI

ales004 commented 6 years ago

I also have the same problem.

I also tried with: Test.zip .\Test.zip ./Test.zip

in all cases I get the same error as above.