부모글 보이기/감추기 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 비밀번호 댓글 작성자 ... 76 77 78 79 80 81 82 83 84 85 [86] 87 88 89 90 ... NoWriterDateCnt.TitleFile(s) 11901정성태5/21/201927087오류 유형: 538. msbuild 오류 - Could not find a part of the path '%LOCALAPPDATA%\Temp\2\.NETFramework,Version=v4.0.AssemblyAttributes.cs'11900정성태5/18/201925829오류 유형: 537. "sfc /scannow" 실행 중 시스템이 부팅되는 현상11899정성태5/17/201925825Linux: 9. Linux에서 윈도우의 OutputDebugString 대신 사용할 수 있는 syslog [1]11898정성태5/16/201927199VC++: 130. C++ string의 c_str과 data 함수의 차이점 [3]11897정성태5/16/201932790오류 유형: 536. Visual Studio - "Developer Pack"을 설치했는데도 "대상 프레임워크" 목록에 나오지 않는 경우 [2]11896정성태5/15/201930532개발 환경 구성: 440. C#, C++ - double의 Infinity, NaN 표현 방식111895정성태5/12/201927005.NET Framework: 832. ML.NET Model Builder - 회귀(Regression), 다중 분류(Multi-class classification) 예제111894정성태5/10/201929198VS.NET IDE: 135. Visual Studio - ML.NET Model Builder 소개 [5]11893정성태5/10/201924642오류 유형: 535. C# 6.0 이상의 문법을 컴파일 시 오류가 발생한다면?11892정성태5/10/201923830웹: 38. HTTP Cookie의 expires 시간 형식(RFC7231)11891정성태5/9/201927916.NET Framework: 831. (번역글) .NET Internals Cookbook Part 12 - Memory structure, attributes, handles11890정성태5/8/201924477개발 환경 구성: 439. "Visual Studio Enterprise is required to execute the test." 메시지와 관련된 코드 기록11889정성태5/8/201923155개발 환경 구성: 438. mstest, QTAgent의 로그 파일 설정 방법11888정성태5/8/201942513.NET Framework: 830. C# - 비동기 호출을 취소하는 CancellationToken의 간단한 예제 코드 [1]111887정성태5/8/201928064.NET Framework: 829. C# - yield 문을 사용할 수 있는 메서드의 조건11886정성태5/7/201924770오류 유형: 534. mstest.exe 실행 시 "Visual Studio Enterprise is required to execute the test." 오류 [2]11885정성태5/7/201922764오류 유형: 533. mstest.exe 실행 시 "File extension specified '.loadtest' is not a valid test extension." 오류 발생11884정성태5/5/201927198.NET Framework: 828. C# DLL에서 Win32 C/C++처럼 dllexport 함수를 제공하는 방법 - 두 번째 이야기11883정성태5/3/201932880.NET Framework: 827. C# - 인터넷 시간 서버로부터 받은 시간을 윈도우에 적용하는 방법111882정성태5/2/201929254.NET Framework: 826. (번역글) .NET Internals Cookbook Part 11 - Various C# riddles111881정성태4/28/201929532오류 유형: 532. .NET Core 프로젝트로 마이그레이션 시 "CS0579 Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute" 오류 발생11880정성태4/25/201925671오류 유형: 531. 이벤트 로그 오류 - Task Scheduling Error: m->NextScheduledSPRetry 1547, m->NextScheduledEvent 154711879정성태4/24/201935290.NET Framework: 825. (번역글) .NET Internals Cookbook Part 10 - Threads, Tasks, asynchronous code and others211878정성태4/22/201929300.NET Framework: 824. (번역글) .NET Internals Cookbook Part 9 - Finalizers, queues, card tables and other GC stuff111877정성태4/22/201930117.NET Framework: 823. (번역글) .NET Internals Cookbook Part 8 - C# gotchas111876정성태4/21/201926169.NET Framework: 822. (번역글) .NET Internals Cookbook Part 7 - Word tearing, locking and others1 ... 76 77 78 79 80 81 82 83 84 85 [86] 87 88 89 90 ...