"message NETSDK1057: You are using a preview version of .NET Core" 빌드 경고 없애는 방법
.NET Core 3.0 preview 설치 후,
.NET Core 3.0 preview 5를 이용해 Windows Forms/WPF 응용 프로그램 개발
; https://www.sysnet.pe.kr/2/0/11937
비주얼 스튜디오에서 기존의 .NET Core 2.x 프로젝트를 빌드 시 다음과 같은 경고가 발생합니다.
1>c:\program files\dotnet\sdk\3.0.100-preview5-011568\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(157,5): message NETSDK1057: You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview
물론 그냥 무시해도 되는데 ^^; 그래도 은근 거슬립니다.
이런 현상을 설명할 수 있는 규칙은 다음의 문서에 나옵니다.
Select the .NET Core version to use
; https://learn.microsoft.com/en-us/dotnet/core/versions/selection
The process for selecting an SDK version is:
1. dotnet searches for a global.json file iteratively reverse-navigating the path upward from the current working directory.
2. dotnet uses the SDK specified in the first global.json found.
3. dotnet uses the latest installed SDK if no global.json is found.
문제는, 3번의 규칙을 피하기 위해 global.json을 프로젝트 수준에서 포함시켜도 저 경고는 없어지지 않는다는 점인데요, 그래도 다행히 검색해 보면,
how to remove message "You are working with a preview version of the .NET Core SDK"
; https://stackoverflow.com/questions/50423404/how-to-remove-message-you-are-working-with-a-preview-version-of-the-net-core-s
프로젝트 자체에서 제공하는 옵션을 찾을 수 있습니다. ^^
<PropertyGroup>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
</PropertyGroup>
[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]