Do you know ASP.NET Core run on AppHarbor cloud? - asp.net-core

I made a small application with ASP.NET Core, I pushed to github and copied from github to App Harbor cloud and there should compile and publish, in the log file i see that when makes build on App Harbour cloud says that doesn't find .sln file. The question is that this cloud knows to build, run ASP.NET Core.

Related

Zip file error when releasing from VSTS to Azure Web App

I have created release definition in VSTS that takes a built .net core 3.0 web apps and push the builds out to an Azure Web App. It worked for more than 6 months but recently fails on the deploy step.
Possibly unsupported ZIP platform type, 62
##[error]Error: Offset is out of bounds
Also I read this response. I checked the zip files in working directory and can decompress them.
I found it!
The Malware detection tool remove the published files.

How to publish .net core project to smarterasp.net from vscode?

I need to publish .net core project to smarterasp.net server. I use visual studio code. How can I deploy my project?
I've run into bugs with Web Deploy, so I use a Folder (aka 'File') deploy to a local folder and then FTP the content of that folder to the root website folder at SmarterASP.NET. The main trick is that when you set up your publishing profile, you must change to 'self contained' and target x86. If you leave the default settings, your site won't work. I'm referring to Core 3 here....
since I don't know the smarterasp.net provider, but unless you have a free hosting plan, smarterasp.net declares that ASP.NET Core 3.x is already installed for which you only need to build your project and inserting it in the root of your IIS site without installing the core framework on the server would not work.
Good luck.

How to publish .net core WebJob together with asp.net core web app?

I have a two net core console apps that I deploy to Azure as web jobs using visual studio.
<Project Sdk="Microsoft.NET.Sdk;Microsoft.NET.Sdk.Publish">
It works well, when I publish them separately.
How do I publish .net core webjobs togeter with web app?
I have tried create webproject/properties/webjob-list.json. Paths are relative to webproject/webproject.csproj:
{
"$schema": "http://schemastore.org/schemas/json/webjobs-list.json",
"WebJobs": [
{
"filePath": "../PeopleWebJob/PeopleWebJob.csproj"
},
{
"filePath": "../Reminder/ReminderWebJob.csproj"
}
]
}
I've also tried to install Microsoft.Web.WebJobs.Publish nuget, but it looks like this approach is not working for .NET Core.
Alternativelly,
How do I publish the webjobs using VSTS?
I've tried to dotnet publish the WebJob project and copy the output to $(Build.ArtifactStagingDirectory)/webproject.zip/App_Data/jobs/Triggered
It is not supported for VS to deploy WebJobs along with .NET Core Apps yet.
This is a similar issue, you could refer to it. To publish the webjobs via VSTS, you could refer to this link.
Besides, you can also zip it up and use the Azure Portal to create the WebJob or use Kudu Console or FTP to do it.
Since you copy the necessary output to webproject.zip/App_Data/jobs/Triggered (do not zip published web project during dotnet publish, then copy files and zip files through Archive Files task), you just need to publish the project through Azure App Service Deploy task.
Package or folder: {the website zip file}
Check Publish using Web Deploy option in Additional Deployment Options section

VSTS Continuous Deployment of ASP.NET MVC Core 2.0 app to Azure Web Apps not deploying, no errors

No matter how many times I attempt to deploy my recently migrated ASP.NET MVC Core 2.0 app from VSTS CD, I only see old builds that were created before I migrated the project and VSTS CI build steps.
No error messages. Everything is making happy noises. However, I have the build number injected into the appsettings.json so I can see which build is in production, AND I've made several tiny aesthetic changes just to know for sure there's a new build of the software out on production and I am 100% confident the latest build is not being served.
I migrated my web app from ASP.NET MVC Core 1.1.2 to ASP.NET MVC Core 2.0.0. The last two successfully deployed 1.1 builds were #259 & #260.
I updated the VSTS build process using the "preview" 2.0 steps and got it producing successful builds. This new build is #270.
The VSTS release process reported no errors when deploying to Azure Web Apps Websites in a Staging slot.
I swap the slots without any errors.
However, I only see builds #259 and #260 as I try and re-try to re-release build #270 manually and re-swap the slots after VSTS CD gives me a successful response.
At this point, I'm considering going into Kudu and just deleting everything to force Azure Web Sites Web Apps to give me an obvious error message.
Before I do that, however, I wanted to ask if there's anything obvious I'm missing? Unlike the CI feature, VSTS CD has no verbose logging (AFAICT) and I can't locate any logging on Azure Web App's side regarding deployment attempts.
Here's a history of the builds ... all successful:
For context, here's the overall pipeline:
Here's the definition for Azure App Service:
Update 8/24 10am:
This morning, based on #starain-MSFT's comment, I did the following:
In Azure, I stopped both staging and production slots.
Back in VSTS in the release definition, in the "Azure App Service Deploy" task, I checked and yes, "Publish using Web Deploy" was already checked.
I added a checkmark to "Remove additional files at destination".
I created a new release (#110).
I check the logs for the "Deploy Azure App Service" release task:
2017-08-24T14:53:01.7169084Z ##[section]Starting: Deploy Azure App Service
2017-08-24T14:53:01.7419076Z ==============================================================================
2017-08-24T14:53:01.7419076Z Task : Azure App Service Deploy
2017-08-24T14:53:01.7419076Z Description : Update Azure Web App Services, Web App On Linux , Function Apps, Mobile Apps using Web Deploy / Kudu REST APIs
2017-08-24T14:53:01.7419076Z Version : 3.3.13
2017-08-24T14:53:01.7419076Z Author : Microsoft Corporation
2017-08-24T14:53:01.7419076Z Help : [More Information](https://aka.ms/azurermwebdeployreadme)
2017-08-24T14:53:01.7419076Z ==============================================================================
2017-08-24T14:53:03.7273244Z Got connection details for Azure App Service:'beastmuffin'
2017-08-24T14:53:04.4099686Z [command]"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package='d:\a\r1\a\BeastMuffin-CI\drop\270.zip' -dest:contentPath='beastmuffin',ComputerName='https://beastmuffin-staging.scm.azurewebsites.net:443/msdeploy.axd?site=beastmuffin',UserName='********',Password='********',AuthType='Basic' -enableRule:AppOffline -userAgent:VSTS_3ba069a5-b836-4fd5-9b7a-158f8f07399f_release_1_110_110_1
2017-08-24T14:53:05.4251931Z Info: Using ID '5285835e-1d30-414e-bcb6-288c207678ac' for connections to the remote server.
2017-08-24T14:53:16.2964958Z Info: Deleting file (beastmuffin\Accessibility.dll).
2017-08-24T14:53:16.2964958Z Info: Deleting file (beastmuffin\Accessibility.xml).
... about 3000 lines later ...
2017-08-24T14:54:43.0840845Z Info: Deleting file (beastmuffin\zh-Hant\System.Spatial.resources.dll).
2017-08-24T14:54:43.0840845Z Info: Deleting directory (beastmuffin\zh-Hant).
2017-08-24T14:54:43.0840845Z Total changes: 3009 (0 added, 3009 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
2017-08-24T14:54:43.0980858Z Successfully deployed web package to App Service.
2017-08-24T14:54:44.9961584Z Successfully updated deployment History at https://beastmuffin-staging.scm.azurewebsites.net/deployments/1101503586484042
So, it looks like it deleted the old files, but did not deploy / add the new build's files to Azure -- HOWEVER the COMMAND to deploy (per the logs) did not throw any exceptions.
Just to confirm nothing really got deployed, I visit the site and see this now:
So, I'm guessing there's no files in the production slot at the moment.
Update 8/24 1pm:
One new pertinent detail as I continue to debug this.
The new (preview) App Service Editor shows that the .zip file has been moved to the /wwwroot folder, however it does not unzip it.
Based on the logs and the .zip file, I'm beginning to think that the "Deploy Azure App Service" task doesn't yet support ASP.NET MVC Core 2.0.
To that end, I've opened a support issue on the vsts-tasks GitHub repo:
https://github.com/Microsoft/vsts-tasks/issues/5111
This issue was resolved out on GitHub (github.com/Microsoft/vsts-tasks/issues/5111).
In a nutshell, the new Build step "dotnet publish" (under preview as I write this) allows you to zip up the artifacts.
However, I already had the old "archive files" build step that I never removed from the previous build definition for ASP.NET MVC Core 1.1.
So, the result was the build was zipping up the zipped publish. During release, the publish was unzipped once, leaving the inner zip file unzipped as it moved it to the Azure website destination.

.Net core - How to create multi-platform executable from a console app

I'm starting to work with .net core 1.1 on a Web API project. The way I'm currently starting my server for the API is by publishing with dotnet publish and then running with dotnet MyProject.dll. Now I have a requirement to start the server from an executable file on Windows and on Linux. I wrote a .net core console app that does just that but the question is how do I wrap in in an executable file for .exe for Windows and what ever it is for Linux...?
I'm just entering the link given in the comment, to mark it as the correct answer.
Self-contained deployment without third-party dependencies