question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot build using mcr.microsoft.com/dotnet/sdk:6.0

See original GitHub issue

Describe the bug

Hello up until recently (3 days ago) I was able to run dotnet lambda package --configuration Release

In Docker file.

Today I started having this error Target Framework of netcoreapp6.0 must have output type 'exe' and run on a custom runtime, since this is not a Lambda-managed .NET runtime.

I had to force to use older version for SAM to be able to build the project RUN dotnet tool install -g Amazon.Lambda.Tools --version 5.5.0

Expected Behavior

Build the project and push to clouformation

Current Behavior

Error

Target Framework of netcoreapp6.0 must have output type 'exe' and run on a custom runtime, since this is not a Lambda-managed .NET runtime.

Reproduction Steps

Possible Solution

No response

Additional Information/Context

No response

Targeted .NET platform

.NET6

CLI extension version

5.6.0

Environment details (OS name and version, etc.)

Windows 10

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
savva312commented, Nov 9, 2022

@normj Thank you for the clarifications.

If I remember correctly i ended up using netcore6.0 because .net 6 was not supported back then or i had some issues. Don’t remember exactly.

There is no problem to switch to .net6.

thank you both for your time.

0reactions
github-actions[bot]commented, Nov 9, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft SDK docker image can build but not run a web app
1 Answer. The solution is to have a multipart dockerfile where you build with the sdk and then run with a runtime different...
Read more >
My solution is not building when I use docker image mcr ...
My solution is not building when I use docker image mcr.microsoft.com/dotnet/sdk:5.0 - Microsoft Q&A.
Read more >
PublishReadyToRun fails on .NET6 / linux-musl-x64 / Docker
I'm trying to build using PublishReadyToRun with net6.0 in Docker ... FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build COPY .
Read more >
Why isn't my ASP.NET Core app in Docker working?
In this post I describe a problem where my ASP.NET Core app in Docker wasn't responding to requests. This post debugs and diagnoses...
Read more >
Build your .NET image
Learn how to build your first Docker image by writing a Dockerfile. ... syntax=docker/dockerfile:1 FROM mcr.microsoft.com/dotnet/sdk:6.0 as build-env.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found