Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build project successfully #3684

Closed
John-Qiao opened this issue Jul 31, 2020 · 2 comments
Closed

Cannot build project successfully #3684

John-Qiao opened this issue Jul 31, 2020 · 2 comments
Labels
tracking-external-issue An issue is caused by an external system and won't be fixed in this repo

Comments

@John-Qiao
Copy link
Member

  • .NET Core Version:
    5.0.100-rc.1.20380.12

  • Have you experienced this same bug with .NET Framework?:
    No

More info:
This issue does not occur in 5.0.100-rc.1.20378.11, it's a regression issue.

Problem description:
Cannot build project successfully, and received the below error:
Actual

Expected behavior:
Can build project successfully.

Minimal repro:

  1. Create a new .NET Core Winforms project and target to .NET 5.0.
  2. Build this project.
    WindowsFormsApp1.zip
@RussKie
Copy link
Member

RussKie commented Aug 3, 2020

It is not something we control.

Having said that, I think the error is self explanatory:

C:\Program Files\dotnet\sdk\5.0.100-rc.1.20403.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets(369,5): 
warning NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Microsoft.NET.Sdk can be used instead. [.\WindowsFormsApp1\WindowsFormsApp1\WindowsFormsApp1.csproj]

image

To fix remove ".WindowsDesktop":

-<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
+<Project Sdk="Microsoft.NET.Sdk">

@RussKie RussKie closed this as completed Aug 3, 2020
@RussKie RussKie added the tracking-external-issue An issue is caused by an external system and won't be fixed in this repo label Aug 3, 2020
@RussKie
Copy link
Member

RussKie commented Aug 4, 2020

From @jmarolf elsewhere:

"The fix on the VS side went in this morning. I reccommend setting <AnalysisLevel>4</AnalysisLevel> in the project file until the next SDK and VS previews actually go out"

@dotnet dotnet locked as resolved and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tracking-external-issue An issue is caused by an external system and won't be fixed in this repo
Projects
None yet
Development

No branches or pull requests

2 participants