How do I publish ASP.NET mvc project from linux using dotnet publish and publish profile?
See original GitHub issue- dotnet publish WebProj.csproj /p:PublishProfile=<publish_profile>
(this according to docs is cross platform)
When i execute this in windows platform, it gets executed successfully and it publishes to desired server, but when I execute it in linux machine, it publishes locally in bin folder but not publish in server.
Publish Method: WebDeploy
Following is the profile
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <WebPublishMethod>MSDeploy</WebPublishMethod> <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> <LastUsedPlatform>Any CPU</LastUsedPlatform> <SiteUrlToLaunchAfterPublish /> <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> <ExcludeApp_Data>False</ExcludeApp_Data> <TargetFramework>netcoreapp2.2</TargetFramework> <ProjectGuid>1e96b425-2c23-42ed-a8b0-1a87b562da28</ProjectGuid> <SelfContained>false</SelfContained> <_IsPortable>true</_IsPortable> <MSDeployServiceURL>----------</MSDeployServiceURL> <DeployIisAppPath>--------</DeployIisAppPath> <RemoteSitePhysicalPath /> <SkipExtraFilesOnServer>True</SkipExtraFilesOnServer> <MSDeployPublishMethod>WMSVC</MSDeployPublishMethod> <EnableMSDeployBackup>True</EnableMSDeployBackup> <UserName>Administrator</UserName> <Password>XXXXXXX</Password> <_SavePWD>True</_SavePWD> </PropertyGroup> </Project>
I also tried using FTP method, that published locally both in windows and linux. (Both methods work in visual studio publish option)
dotnet --info
output:
Windows machine:
.NET Core SDK (reflecting any global.json):
Version: 2.2.301
Commit: 70d6be0814
Runtime Environment: OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.2.301\
Host (useful for support):
Version: 2.2.6
Commit: 7dac9b1b51
.NET Core SDKs installed:
2.1.701 [C:\Program Files\dotnet\sdk]
2.2.301 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Linux Machine .NET Core SDK (reflecting any global.json): Version: 2.2.300 Commit: 73efd5bd87
Runtime Environment: OS Name: ubuntu OS Version: 18.10 OS Platform: Linux RID: ubuntu.18.10-x64 Base Path: /usr/share/dotnet/sdk/2.2.300/
Host (useful for support): Version: 2.2.5 Commit: 0a3c9209c0
.NET Core SDKs installed: 2.2.300 [/usr/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.2.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.2.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
@peterhuene Agreed. Please move this to WebSdk and we will add a message indicating Web Deploy is windows only.
This issue was moved to aspnet/websdk#781