Visual Studio 2022 with .net 6 throws error for lambda while deploying #1451
-
Describe the issueI installed Visual Studio 2022 enterprise with .net 6 and .net 7 . I created a simple server less lambda application using .net 6 framework net6.0 "Runtime": "dotnet6", but i am getting below error when i try to publish to aws lambda from Visual Studio. Any help is much appreciated over here :) **error NU1202: Package Amazon.Lambda.AspNetCoreServer 8.0.0 is not compatible with net60 (.NETFramework,Version=v6.0). Package Amazon.Lambda.AspNetCoreServer 8.0.0 supports: net6.0 (.NETCoreApp,Version=v6.0) Links**error NU1202: Package Amazon.Lambda.AspNetCoreServer 8.0.0 is not compatible with net60 (.NETFramework,Version=v6.0). Package Amazon.Lambda.AspNetCoreServer 8.0.0 supports: net6.0 (.NETCoreApp,Version=v6.0) |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 1 reply
-
Hi @karthickcse05, Good morning. Could you please check the target framework in your Thanks, |
Beta Was this translation helpful? Give feedback.
-
I have added the screen shot of the .csproj file . the target framework refers to .net6.0 |
Beta Was this translation helpful? Give feedback.
-
@karthickcse05 Could you also share aws-lambda-tools-defaults.json. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@karthickcse05 Thanks. Since I’m unable to reproduce it at my end, kindly share the following:
I’m unsure what is editorconfig in your screenshot and if it has any settings that overrides TFM. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Thanks. I have latest version of AWS tool kit installed . In my system , dotnet version is 7.0.201 |
Beta Was this translation helpful? Give feedback.
-
@ashishdhingra , could you pls share the screen shot of dotnet --info , so that i could able to verify what SDK i missed to install |
Beta Was this translation helpful? Give feedback.
-
@karthickcse05 Good afternoon. Even your project works fine:
You could view the .NET SDK version in the above logs as
Could you try testing in a different fresh environment? Thanks, |
Beta Was this translation helpful? Give feedback.
-
Even i have these same SDK installed in my system , but getting same error Could you pls list down what are all the .net run times installed in ur system by using dotnet --info command |
Beta Was this translation helpful? Give feedback.
-
@karthickcse05 Here is the output of
It appears to be your environment issue. I would advise to test it in separate clean machine. Since it is an environmental issue, I'm unsure what additional guidance could be provided here. Thanks, |
Beta Was this translation helpful? Give feedback.
-
@karthickcse05 Looks like you had also opened discussion #1448. Since the issue is not reproducible, I'm converting this into discussion and marking the other one as answered. |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
@karthickcse05 Looks like you had also opened discussion #1448. Since the issue is not reproducible, I'm converting this into discussion and marking the other one as answered.