Closed lscorcia closed 2 years ago
Publishing from Visual Studio indeed seems to be still a problem... It might be that we will also need help from the Visual Studio Team for this, so good you created this issue at least as a starting point ;-)
Anyways... I think you can easily work around this for now by publishing with msbuild straight from the commandline. I use something like this for a project I'm working on:
msbuild "path\to\your\solution.sln" /t:rebuild ^
/p:Configuration=Release ^
/p:DeployOnBuild=True ^
/p:DeployDefaultTarget=WebPublish ^
/p:WebPublishMethod=FileSystem ^
/p:DeleteExistingFiles=True ^
/p:publishUrl="path\to\your\output\folder"
but I think you can also supply an existing publishing profile (xml file) as a parameter, if you have one of those...
See https://github.com/dotnet/project-system/issues/2670#issuecomment-740837305
Right-click publishing from VS still does not work and the pubxml has to be hand-crafted (or just reuse one from a non-sdk project). msbuild /t:Restore,Rebuild /p:DeployOnBuild=true /p:PublishProfile=FolderProfile.pubxml works fine for file system publish.
Thanks for the workaround! Maybe it's worth documenting this behavior in the readme? Anyway, I think the issue can be closed.
@bachratyg @lscorcia I am looking to try and capture information from the issues into documentation. Documentation? I'm not sure of the best way to do so yet - but would like to get this information into the documentation, at which point I feel we could happily close the issue.
In a MVC application generated using the project template, when I activate the Publish command with a Folder profile, the process ends without any error, but the output folder is empty. It seems that no Publish step is actually executed - build log: