Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (seongtaejeong at gmail.com)
홈페이지
첨부 파일
 

msbuild - Your project file doesn't list 'win' as a "RuntimeIdentifier"

빌드 시 이런 오류가 발생한다면?

C:\temp\ConsoleApp1\ConsoleApp1\bin> msbuild "C:\temp\ConsoleApp1\ConsoleApp1.csproj"
MSBuild version 17.5.1+f6fdcf537 for .NET Framework
Build started 2024-12-10 오후 8:26:31.
Included response file: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\MSBuild.rsp

Project "C:\temp\ConsoleApp1\ConsoleApp1\ConsoleApp1.csproj" on node 1 (default targets).
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\NuGet\17.0\Microsoft.NuGet.targets(198,5): error : Your project file doesn't list 'win' as a "RuntimeIdentifier". You should add 'win' to the "RuntimeIdentifiers" property in your project file and then re-run NuGet restore. [C:\temp\ConsoleApp1\ConsoleApp1\ConsoleApp1.csproj]
Done Building Project "C:\temp\ConsoleApp1\ConsoleApp1\ConsoleApp1.csproj" (default targets) -- FAILED.


Build FAILED.

"C:\temp\ConsoleApp1\ConsoleApp1\ConsoleApp1.csproj" (default target) (1) ->
(ResolveNuGetPackageAssets target) ->
  C:\...[생략]...\Microsoft.NuGet.targets(198,5): error : Your project file doesn't list 'win' as a "RuntimeIdentifier". You should add 'win' to the "RuntimeIdentifiers" property in your project file and then re-run NuGet restore. [C:\temp\ConsoleApp1\ConsoleApp1\ConsoleApp1.csproj]

    0 Warning(s)
    1 Error(s)

error : Your project file doesn't list 'win' as a "RuntimeIdentifier". You should add 'win' to the "RuntimeIdentifiers" property in your project file and then re-run NuGet restore.


(다행히 이번에는) 친절한 메시지가 일러주는 대로 ^^ 진행하면 됩니다. 우선, 1) csproj 파일을 열어 RuntimeIdentifiers 노드에 "win" 항목을 추가하고,

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <RuntimeIdentifiers>win</RuntimeIdentifiers>
    <!-- ...[생략]... -->
  </PropertyGroup>
</Project>

2) 해당 프로젝트에 대해 "nuget restore" 명령을 실행해 줍니다.

C:\temp\ConsoleApp1\ConsoleApp1> nuget restore "ConsoleApp1.csproj"




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 12/11/2024]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 151  [152]  153  154  155  156  157  158  159  160  161  162  163  164  165  ...
NoWriterDateCnt.TitleFile(s)
1358정성태9/27/201231253.NET Framework: 339. .NET Profiler 주의 사항 - 하나의 exe 프로세스 내에 다중 .NET 런타임 사용
1357정성태9/27/201227929Windows: 64. Hyper-V - Windows XP의 Live Migration 오류
1356정성태9/26/201234479Windows: 63. 윈도우 서버 2012 - Hyper-V의 새로운 기능 Live Migration [6]
1355정성태9/21/201232412Team Foundation Server: 49. TFS 2012 Express의 필수 보완 작업: 데이터베이스 백업 [1]
1354정성태9/19/201229601.NET Framework: 338. .NET CLR GC 시간 측정하는 방법파일 다운로드1
1353정성태9/17/201230234.NET Framework: 337. Python의 생성기와 코루틴을 C#으로 표현하면. [2]파일 다운로드1
1352정성태9/13/201228387.NET Framework: 336. .NET Profiler가 COM 개체일까?
1351정성태9/13/201232900디버깅 기술: 49. windbg - .NET Framework 스레드 개체의 COM Apartment 유형 확인하는 방법
1350정성태9/12/201233787개발 환경 구성: 167. (실은) 무료가 아니었던 AWS EC2 서비스 [4]
1349정성태9/11/201265314VS.NET IDE: 74. Visual Studio의 '새 파일'을 UTF-8 인코딩으로 지정하는 방법 [4]
1348정성태9/11/201232891오류 유형: 164. Active Directory - Functional Level 승격이 안 되는 문제
1347정성태9/10/201235713Windows: 62. 윈도우 서버 2012 - Hyper-V 서버 마이그레이션 [1]
1346정성태9/10/201235703Windows: 61. 윈도우 서버 2012 - Active Directory 서버 마이그레이션
1345정성태9/10/201240835스크립트: 12. 파이썬 - Win32 DLL 연동 [2]
1344정성태9/10/201233202오류 유형: 163. .NET Framework 4.5 제거 후 Visual Studio 2010 실행 시 Unknown Error
1343정성태9/8/201247159스크립트: 11. 파이썬(Python) 윈도우 개발 환경 [7]
1342정성태9/6/201231282VS.NET IDE: 73. Visual Studio 2012 - XmlCodeGenerator 마이그레이션
1341정성태9/4/201241143Windows: 60. Hyper-V에서 RemoteFX 없이 DirectX 11 제공 [12]
1340정성태9/4/201232999개발 환경 구성: 166. DOS - ping 결과에서 평균 응답 시간값 추출하기 [3]
1339정성태9/4/201235780개발 환경 구성: 165. 새로운 Visual Studio 2012 원격 디버깅 툴 [6]
1338정성태9/4/201237680.NET Framework: 335. C# - (핸들을 이용하여) 모든 열린 파일을 열람 [6]파일 다운로드1
1337정성태8/30/201227334Phone: 7. 디버거로 실습해 보는 윈도우 폰의 Tombstone 상태파일 다운로드1
1336정성태8/30/201244426.NET Framework: 334. 스레드 비정상 종료로 발생하는 CLOSE_WAIT 소켓 상태 [2]파일 다운로드1
1335정성태8/30/201234210Windows: 59. Hyper-V Internal 네트워크 VM의 인터넷 접속
1334정성태8/29/201253676.NET Framework: 333. 코드로 재현하는 소켓 상태(FIN_WAIT1, FIN_WAIT2, TIME_WAIT, CLOSE_WAIT, LAST_WAIT) [6]
1333정성태8/27/201256459개발 환경 구성: 164. system32 폴더에 있는 파일의 권한 조정 [2]
... 151  [152]  153  154  155  156  157  158  159  160  161  162  163  164  165  ...