.NET Core 3.1 Support

IgorStepanov's Avatar

IgorStepanov

03 Sep, 2020 12:34 PM

Hello, I'm new to ASP.NET, but have experience working with .NET applications.

I'm following the instructions, creating empty ASP.NET Core 3.1 project and it is built and deployed correctly, BUT then I cannot see "Go to my application" button. And if I go to {myApp}.apphb.com in chrome I get "Welcome to ngiinx" page.

Also, I am running a telegram bot in my application and it seems to work fine and be responding.
So the question is, how do I visit my site, where can I get the link to my application?

  1. 1 Posted by IgorStepanov on 06 Sep, 2020 02:00 PM

    IgorStepanov's Avatar

    Just to give you some more information.

    I created the same empty application, but using .NET Framework 4.8 instead of .NET Core and everything seems to be working just fine.

    So, I believe the problem is not fully implemented support of .NET Core.
    Is it possible to fix this issue?

  2. Support Staff 2 Posted by rune on 08 Sep, 2020 05:09 AM

    rune's Avatar

    Hi,

    .NET Core 3.1 is supported but still requires publishing to the output directory using a bit of configuration in your web project file. All current versions of the .NET Core runtime are installed on the worker and build servers, including the dev SDKs, ASP.NET Core runtimes etc.

    This is different from "regular" .NET Framework apps as you also described; for .NET Core apps you'll need to trigger the Publish build target and set the PublishDir project property on the relevant web project yourself to make sure it's published in a way that's compatible with AppHarbor. That's pretty straightforward as you can see in this sample csproj file (for an older .NET Core version, but the build target and publish directory configuration also applies for newer versions):

    <Project Sdk="Microsoft.NET.Sdk.Web" DefaultTargets="Publish">
        <PropertyGroup>
            <TargetFramework>netcoreapp1.1</TargetFramework>
            <PublishDir>$(OutDir)_PublishedWebsites\NetCoreApp\</PublishDir>
        </PropertyGroup>
        <PropertyGroup>
            <PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
        </PropertyGroup>
        <ItemGroup>
            <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
            <PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
            <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
            <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.2" />
            <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" />
            <PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.2" />
        </ItemGroup>
        <ItemGroup>
            <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.1" />
        </ItemGroup>
    </Project>
    

    Your website project should be published when you make these couple of changes to the web project file, commit it to your repository and push to AppHarbor, but let me know if you continue to experience issues with this!

    Cheers,
    Rune

  3. rune closed this discussion on 08 Sep, 2020 05:09 AM.

  4. IgorStepanov re-opened this discussion on 08 Sep, 2020 04:41 PM

  5. 3 Posted by IgorStepanov on 08 Sep, 2020 04:41 PM

    IgorStepanov's Avatar

    Thanks! Everything worked just fine!

    For everyone wondering, my empty .csproj looked like:
    <Project Sdk="Microsoft.NET.Sdk.Web">
        <PropertyGroup>
            <TargetFramework>netcoreapp3.1</TargetFramework>
        </PropertyGroup>
    </Project>

    So, I followed the instructions and now it looks like this:
    <Project Sdk="Microsoft.NET.Sdk.Web" DefaultTargets="Publish">
        <PropertyGroup>
            <TargetFramework>netcoreapp3.1</TargetFramework>
            <PublishDir>$(OutDir)_PublishedWebsites\NetCoreApp\</PublishDir>
        </PropertyGroup>
    </Project>

    Thanks, Rune!

  6. Support Staff 4 Posted by rune on 14 Sep, 2020 02:49 AM

    rune's Avatar

    Hi again,

    Thanks for the heads up and sharing the solution for your project! Let me know if there's anything else I can help with.

    Best,
    Rune

  7. rune closed this discussion on 14 Sep, 2020 02:49 AM.

Discussions are closed to public comments.
If you need help with AppHarbor please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac