부모글 보이기/감추기 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 비밀번호 댓글 작성자 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 [30] ... NoWriterDateCnt.TitleFile(s) 12876정성태12/14/20216785개발 환경 구성: 616. Custom Sources를 이용한 Azure Monitor Metric 만들기12875정성태12/13/20216506스크립트: 35. python - time.sleep(...) 호출 시 hang이 걸리는 듯한 문제12874정성태12/13/20216488오류 유형: 773. shell script 실행 시 "$'\r': command not found" 오류12873정성태12/12/20217606오류 유형: 772. 리눅스 - PATH에 등록했는데도 "command not found"가 나온다면?12872정성태12/12/20217401개발 환경 구성: 615. GoLang과 Python 빌드가 모두 가능한 docker 이미지 만들기12871정성태12/12/20217516오류 유형: 771. docker: Error response from daemon: OCI runtime create failed12870정성태12/9/20216107개발 환경 구성: 614. 파이썬 - PyPI 패키지 만들기 (4) package_data 옵션12869정성태12/8/20218335개발 환경 구성: 613. git clone 실행 시 fingerprint 묻는 단계를 생략하는 방법12868정성태12/7/20216907오류 유형: 770. twine 업로드 시 "HTTPError: 400 Bad Request ..." 오류 [1]12867정성태12/7/20216587개발 환경 구성: 612. 파이썬 - PyPI 패키지 만들기 (3) entry_points 옵션12866정성태12/7/202113963오류 유형: 769. "docker build ..." 시 "failed to solve with frontend dockerfile.v0: failed to read dockerfile ..." 오류12865정성태12/6/20216657개발 환경 구성: 611. 파이썬 - PyPI 패키지 만들기 (2) long_description, cmdclass 옵션12864정성태12/6/20215121Linux: 46. WSL 환경에서 find 명령을 사용해 파일을 찾는 방법12863정성태12/4/20217039개발 환경 구성: 610. 파이썬 - PyPI 패키지 만들기12862정성태12/3/20215779오류 유형: 768. Golang - 빌드 시 "cmd/go: unsupported GOOS/GOARCH pair linux /amd64" 오류12861정성태12/3/20218013개발 환경 구성: 609. 파이썬 - "Windows embeddable package"로 개발 환경 구성하는 방법12860정성태12/1/20216105오류 유형: 767. SQL Server - 127.0.0.1로 접속하는 경우 "Access is denied"가 발생한다면?12859정성태12/1/202112287개발 환경 구성: 608. Hyper-V 가상 머신에 Console 모드로 로그인하는 방법12858정성태11/30/20219559개발 환경 구성: 607. 로컬의 USB 장치를 원격 머신에 제공하는 방법 - usbip-win12857정성태11/24/20217025개발 환경 구성: 606. WSL Ubuntu 20.04에서 파이썬을 위한 uwsgi 설치 방법12856정성태11/23/20218828.NET Framework: 1121. C# - 동일한 IP:Port로 바인딩 가능한 서버 소켓 [2]12855정성태11/13/20216190개발 환경 구성: 605. Azure App Service - Kudu SSH 환경에서 FTP를 이용한 파일 전송12854정성태11/13/20217738개발 환경 구성: 604. Azure - 윈도우 VM에서 FTP 여는 방법12853정성태11/10/20216099오류 유형: 766. Azure App Service - JBoss 호스팅 생성 시 "This region has quota of 0 PremiumV3 instances for your subscription. Try selecting different region or SKU."12851정성태11/1/20217464스크립트: 34. 파이썬 - MySQLdb 기본 예제 코드12850정성태10/27/20218618오류 유형: 765. 우분투에서 pip install mysqlclient 실행 시 "OSError: mysql_config not found" 오류 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 [30] ...