부모글 보이기/감추기 AD BLOCK 해제 요청 이 글에는 광고가 많이 들어가 있지 않습니다. adblock을 해제하셔도 글을 읽는데 그다지 부담이 없으니 해제를 부탁드립니다. (연관된 글이 1개 있습니다.) C# 9.0을 위한 개발 환경 구성 다음의 문서에 이미 공개되어 있듯이, C# language versioning ; https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/configure-language-version 현재 C# 9.0은 .NET 5 프로젝트인 경우 기본값이지만, 그 외의 프로젝트라면 csproj 파일을 열어 명시적으로 9.0이라고 명시해야 합니다. <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp3.1</TargetFramework> <LangVersion>9.0</LangVersion> </PropertyGroup> </Project> 적용 여부를 간단하게 테스트하기 위해 신규 문법으로, Target-typed new expressions ; https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/target-typed-new using System; class Program { private readonly static object s_syncObj = new(); static void Main(string[] args) { Console.WriteLine("Hello World!"); } } 코딩을 해보면, 원래는 "new()"에서 오류가 발생하지만 C# 9.0에서는 정상적으로 컴파일이 됩니다. C# 9.0에 관한 문법은 다음의 문서를 참고하거나, What's new in C# 9.0 ; https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9 C# 9.0 Specification Proposals ; https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/records 혹은 github 문서를 통해 현재 시점의 적용 여부까지 확인할 수 있습니다. Language Feature Status - C# 9 ; https://github.com/dotnet/roslyn/blob/master/docs/Language%20Feature%20Status.md#c-9 참고로, "Developer Command Prompt for VS2019"를 열고 다음의 명령어를 실행하면 이렇게 9.0이 포함되어 있을 것입니다. (2020-10-11 시점에는) default 버전은 8.0입니다. C:\> csc -langversion:? Supported language versions: default 1 2 3 4 5 6 7.0 7.1 7.2 7.3 8.0 (default) 9.0 latestmajor preview latest [이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.] [다음 글] VS.NET IDE: 151. Visual Studio 2019에 .NET 5 rc/preview 적용하는 방법[이전 글] 오류 유형: 666. The type or namespace name '...' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?) [연관 글] .NET Framework: 947. C# 9.0 - (1) 대상으로 형식화된 new 식(Target-typed new expressions) [최초 등록일: 10/11/2020] [최종 수정일: 3/9/2024] 이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다. by SeongTae Jeong, mailto:techsharer at outlook.com 비밀번호 댓글 작성자 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 ... NoWriterDateCnt.TitleFile(s) 13354정성태5/12/20234072.NET Framework: 2122. C# - "Use Unicode UTF-8 for worldwide language support" 설정을 한 경우, 한글 입력이 '\0' 문자로 처리13352정성태5/12/20233684.NET Framework: 2121. C# - Semantic Kernel의 대화 문맥 유지113351정성태5/11/20234172VS.NET IDE: 185. Visual Studio - 원격 Docker container 내에 실행 중인 응용 프로그램에 대한 디버깅 [1]13350정성태5/11/20233460오류 유형: 859. Windows Date and Time - Unable to continue. You do not have permission to perform this task13349정성태5/11/20233768.NET Framework: 2120. C# - Semantic Kernel의 Skill과 Function 사용 예제113348정성태5/10/20233656.NET Framework: 2119. C# - Semantic Kernel의 "Basic Loading of the Kernel" 예제13347정성태5/10/20234036.NET Framework: 2118. C# - Semantic Kernel의 Prompt chaining 예제113346정성태5/10/20233876오류 유형: 858. RDP 원격 환경과 로컬 PC 간의 Ctrl+C, Ctrl+V 복사가 안 되는 문제13345정성태5/9/20235255.NET Framework: 2117. C# - (OpenAI 기반의) Microsoft Semantic Kernel을 이용한 자연어 처리 [1]113344정성태5/9/20236462.NET Framework: 2116. C# - OpenAI API 사용 - 지원 모델 목록 [1]113343정성태5/9/20234320디버깅 기술: 192. Windbg - Hyper-V VM으로 이더넷 원격 디버깅 연결하는 방법13342정성태5/8/20234235.NET Framework: 2115. System.Text.Json의 역직렬화 시 필드/속성 주의13341정성태5/8/20233996닷넷: 2114. C# 12 - 모든 형식의 별칭(Using aliases for any type)13340정성태5/8/20234065오류 유형: 857. Microsoft.Data.SqlClient.SqlException - 0x8013190413339정성태5/6/20234727닷넷: 2113. C# 12 - 기본 생성자(Primary Constructors)13338정성태5/6/20234234닷넷: 2112. C# 12 - 기본 람다 매개 변수113337정성태5/5/20234732Linux: 59. dockerfile - docker exec로 container에 접속 시 자동으로 실행되는 코드 적용13336정성태5/4/20234551.NET Framework: 2111. C# - 바이너리 출력 디렉터리와 연관된 csproj 설정13335정성태4/30/20234657.NET Framework: 2110. C# - FFmpeg.AutoGen 라이브러리를 이용한 기본 프로젝트 구성 - Windows Forms113334정성태4/29/20234285Windows: 250. Win32 C/C++ - Modal 메시지 루프 내에서 SetWindowsHookEx를 이용한 Thread 메시지 처리 방법13333정성태4/28/20233737Windows: 249. Win32 C/C++ - 대화창 템플릿을 런타임에 코딩해서 사용113332정성태4/27/20233834Windows: 248. Win32 C/C++ - 대화창을 위한 메시지 루프 사용자 정의113331정성태4/27/20233845오류 유형: 856. dockerfile - 구 버전의 .NET Core 이미지 사용 시 apt update 오류13330정성태4/26/20233482Windows: 247. Win32 C/C++ - CS_GLOBALCLASS 설명13329정성태4/24/20233704Windows: 246. Win32 C/C++ - 직접 띄운 대화창 템플릿을 위한 Modal 메시지 루프 생성113328정성태4/19/20233378VS.NET IDE: 184. Visual Studio - Fine Code Coverage에서 동작하지 않는 Fake/Shim 테스트 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 ...