UFO ET IT

파일 또는 어셈블리 'Microsoft.CodeAnalysis, 버전 = 1.3.1.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35'또는 해당 종속성 중 하나를로드 할 수 없습니다.

ufoet 2020. 11. 7. 18:14
반응형

파일 또는 어셈블리 'Microsoft.CodeAnalysis, 버전 = 1.3.1.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35'또는 해당 종속성 중 하나를로드 할 수 없습니다.


어제 밤에 업데이트가 발생하여 이제 ctrl + '.'를 수행 할 수 없습니다. VS 2015의 코드 제안입니다. 다음과 같은 오류 메시지가 나타납니다.

파일 또는 어셈블리 'Microsoft.CodeAnalysis, 버전 = 1.3.1.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35'또는 해당 종속성 중 하나를로드 할 수 없습니다. 시스템이 지정된 파일을 찾을 수 없습니다.

여전히 빌드하고 개발할 수 있지만이 기능이 없으면 정말 짜증날 것입니다. 나는 그것을 인정한다, 나는 부드러워지고있다!

누구든지이 버그를 수정하기위한 제안이 있습니까?


Visual Studio 2015 업데이트 2에서 동일한 문제가 발생하여 모든 솔루션에 대해 전체적으로 문제를 해결하기 위해 Visual Studio 2015 업데이트 3으로 업데이트했습니다 . 여기에 링크가 있습니다 : 여기에서 다운로드


@CaptainAmerica가 지적했듯이 솔루션은 NuGet에서 CodeDom 어셈블리를 업데이트하는 것입니다. Visual Studio에서이 작업을 수행하는 방법을 지적해야합니다. 여기에서 해결책을 찾았습니다.

https://www.nuget.org/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/

기본적으로 Visual Studio 메뉴에서 다음을 선택합니다.

Tools-> Nuget Package Manager -> Package Manager Console

Visual Studio 하단에 나타나는 콘솔에서 다음 명령을 실행합니다.

Install-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform

옵션이 작동하지 않는 경우이 시나리오를 처리하기위한 자세한 가이드가 있습니다 ....

우선 버전이 중요합니다. 오류에 언급 된 버전을 확인하십시오.

Could not load file or assembly 'Microsoft.CodeAnalysis, version= 1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

위의 오류가 표시되면 버전 1.3.1을 찾을 수 없음을 의미합니다. 이제 새 VS 프로젝트를 만드십시오. 기본 설정이 없으며 단순한 콘솔 응용 프로그램 일 수 있습니다. 이제 프로젝트 템플릿이 준비되면 패키지 관리자로 이동하여 지정된 버전으로 다음 명령을 실행하십시오.

Install-Package Microsoft.CodeAnalysis -Version 1.3.1

그러면 모든 패키지가 설치됩니다. 완료하십시오. 완료되면. 새로 생성 된이 프로젝트는 전혀 필요하지 않습니다. 완전히 삭제할 수 있습니다. 진지하게! 삭제할 수 있습니다. 우리는 해당 패키지를 글로벌 너겟 수준으로 설치하기를 원했기 때문에 이렇게했습니다. 무언가를 설치할 때 nuget은 컴퓨터의 글로벌 수준에도 저장합니다. 경로는 다음과 같습니다.

C:\Users\<<Your Windows User>>\.nuget\packages

다음을 통해 경로를 알 수 있습니다.

%USERPROFILE%\.nuget\packages

이제 다음 폴더에 필요한 Microsoft.CodeAnalysis.dll 이 표시됩니다.

C:\Users\<<Your Windows User>>\.nuget\packages\Microsoft.CodeAnalysis.Common\1.3.1\lib\net45

위 경로에는 버전 번호 (1.3.1)가 포함되어 있습니다. 버전이 다른 경우 해당 버전 폴더를 살펴보십시오.

이제 dll이 있으므로 GAC에 해당 dll을 추가하기 만하면됩니다. 이를 위해서는 GacUtil.exe 가 필요합니다.

이 파일은 이미 Visual Studio와 함께 설치됩니다. C 드라이브에서 "GacUtil"을 검색 할 수 있습니다. 나를 위해 그것은 아래 경로에 있습니다 ...

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools

이제 관리자로 명령 프롬프트를 실행하고 현재 디렉토리를 GacUtil이 포함 된 경로로 이동합니다. 아래 명령을 실행하여 GAC에 해당 dll을 설치하십시오.

gacutil
 -i C:\Users\<<You Windows User>>\.nuget\packages\Microsoft.CodeAnalysis.Common\1.3.1\lib\net45\Mi
crosoft.CodeAnalysis.dll

기본적으로 우리가 전역 적으로 설치 한 dll에 대한 경로를 제공합니다. 성공적으로 설치되면 메시지가 표시됩니다.

그게 다야! 이제 Visual Studio를 다시 시작하면이 문제가 해결됩니다.


페이지를 찾았고 "ASP.NET과의 호환성"아래의 페이지 맨 아래에 ASP.NET이 Microsoft.CodeAnalysis 어셈블리를 업데이트하기 위해 너겟 패키지 Microsoft.CodeDom.Providers.DotNetCompilerPlatform을 사용한다고 말합니다. 그래서 DotNetCompilerPlatform 패키지를 1.0.0에서 1.0.3으로 업데이트했고 다시 작동합니다! 그래, 인생은 다시 좋다!


모든 솔루션에 대해이 문제를 해결하려면 Microsoft.CodeAnalysis.dll 어셈블리 GAC – Global Assemblies Cache에 직접 설치해야했습니다 .

나는 파일 가지고 Microsoft.CodeAnalysis.dll을 에서 C : / 사용자 / [사용자] / nuget / 패키지 / Microsoft.CodeAnalysis.Common / 1.3.2 / lib 디렉토리 / 휴대용-net45 + win8 / Microsoft.CodeAnalysis.dll. .

GAC에 어셈블리를 설치하기 위해 https://github.com/LTruijens/powershell-gac 의 PowerShell 스크립트를 사용했습니다 .

마지막으로 PowerShell에서 다음 명령을 사용하여 GAC에 어셈블리를 설치했습니다.

Add-GacAssembly [myPath]\Microsoft.CodeAnalysis.dll

나도 같은 문제에 직면했습니다. 내 Visual Studio 2015 버전은 2.0이었습니다. 버전 3으로 업그레이드했습니다.

문제가 해결되었습니다 !!!


이 방법으로 문제를 해결했습니다.

Visual Studio 2015를 업데이트 3 으로 업데이트

메뉴에서 보기 => 알림 => Visual Studio 업데이트 3을 선택 하고 업데이트 버튼을 클릭했습니다.


모든 Nuget Microsoft 종속성을 v2.0.0으로 업데이트하여이 문제를 해결했습니다. 이것은 VS 2017을 사용하고있었습니다. 저는 미리보기 버전을 사용하고있었습니다.


In my case, the error occurred after turning off Live Unit Testing and running tests manually.Some tests would fail with the above error message.

Going into Test --> Live Unit Testing --> Options and issuing "Delete Persisted Data" resolved the problem.


I fixed similar issue by deleting the .vs folder located inside the solution.


I found the missing assemblies in the NuGet package (After the first one was resolved there were mulitple otheres): https://www.nuget.org/packages/Microsoft.Net.Compilers/1.3.1-rc

Installed them using GacUtil from the Dev console.


Unfortunately the extensive solution with "nuget install/gacutil" here above couldn't work as the exact version of the dependency dll was not available.

The following solved my issue in our complex webform application was to perform within the solution in Visual Studio -> Tools -> Nuget -> console package manager

Update-Package -reinstall 

In my case, I was getting this error because my Visual Studio Solution was trying to use TextTransform.exe during a pre-build step in one of the projects, but my local machine didn't have the TextTransform.exe at the path specified by my pre-build step and my first attempt at fixing that was to just copy TextTransform.exe from some other location to where Visual Studio expected it to be. That appears to have caused this problem, because TextTransform.exe has other silent dependencies.

My fix was to change the pre-build steps so instead of looking for the file at

C:\Program Files (x86)\Common Files\microsoft shared\TextTemplating\14.0\TextTransform.exe

it would instead look in the Visual Studio install folder which had a bunch of other files, presumably one of which was a peer dependency of TextTransform.exe

C:\Program Files\Visual Studio\Common7\IDE\TextTransform.exe

That seemed to fix things for me.

참고URL : https://stackoverflow.com/questions/42536506/could-not-load-file-or-assembly-microsoft-codeanalysis-version-1-3-1-0-cultu

반응형