사전지식
때때로 컴파일이 안됬으면 하는 cs파일이 있기 마련이다.
실습
.csproj 파일
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Views\**" />
</ItemGroup>
</Project>
설명
Views 폴더에 있는 cs파일은 컴파일 대상에서 제외된다.
'C# > 예제 코드' 카테고리의 다른 글
c# config 파일 경로 바꾸는 2가지 방법. (0) | 2022.03.09 |
---|---|
c# 자바스크립트 문자열 encode & decode (escape) (0) | 2022.03.08 |
c# 빌드할때 폴더 복사 .csproj 수정 (0) | 2022.03.08 |
c# 프로젝트 폴더 경로 구하기. (0) | 2022.03.08 |
c# config 값 저장하기 (process.env?) (0) | 2022.02.09 |