다음 프로젝트를 실행 가능하게 만들지 못했습니다 (개체 참조가 개체의 인스턴스로 설정되지 않음).

니콜라이 코스 토프

.NET Core 1.0 SDK 및 도구 (미리보기 2)가 설치된 Visual Studio 2015 (업데이트 3)에서 기본 웹 프로젝트를 만들고 로컬 소스 제어 변경 사항을 되 돌린 후 Visual Studio를 다시 시작하면 다음 컴파일 오류가 발생합니다 .

다음 프로젝트를 실행 가능하게 만들지 못했습니다. MyDefaultWebProject (.NETCoreApp, Version = v1.0) 이유 : 개체 참조가 개체의 인스턴스로 설정되지 않았습니다.

Visual Studio에 따르면 오류는 C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets262 행 에 있습니다.

이 줄에는 다음 코드가 있습니다.

<Dnx
  RuntimeExe="$(SDKToolingExe)"
  Condition="'$(_DesignTimeHostBuild)' != 'true'"
  ProjectFolder="$(MSBuildProjectDirectory)"
  Arguments="$(_BuildArguments)"
  />

이러한 문제를 어떻게 해결할 수 있습니까?

니콜라이 코스 토프

내가 찾은 유일한 해결책은 다음 dotnet restore명령 을 실행하는 것입니다 .

C:\Dev\*****>dotnet restore

Welcome to .NET Core!
---------------------
Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
Telemetry
--------------
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include commandline arguments. The data is collected by Microsoft and shared with the community.
You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
Configuring...
-------------------
A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
Decompressing 100% 2181 ms
Expanding 100% 9113 ms
log  : Restoring packages for C:\Dev\*****\project.json...
log  : Restoring packages for tool 'BundlerMinifier.Core' in C:\Dev\*****\project.json...
log  : Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in C:\Dev\*****\project.json...
log  : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in C:\Dev\*****\project.json...
log  : Restoring packages for tool 'Microsoft.EntityFrameworkCore.Tools' in C:\Dev\*****\project.json...
log  : Restoring packages for tool 'Microsoft.Extensions.SecretManager.Tools' in C:\Dev\*****\project.json...
log  : Restoring packages for tool 'Microsoft.VisualStudio.Web.CodeGeneration.Tools' in C:\Dev\*****\project.json...
log  : Writing lock file to disk. Path: C:\Dev\*****\project.lock.json
log  : C:\Dev\*****\project.json
log  : Restore completed in 13207ms.

그 후 Visual Studio에서 컴파일이 다시 성공합니다.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

Related 관련 기사

뜨겁다태그

보관