the Autofac project 우리의 모든 공통 논리를 Portable Class Libraries으로 변환하고 특정 기능을위한 플랫폼 별 라이브러리를 추가하려고합니다.휴대용 클래스 라이브러리에 의존하는 라이브러리에서 secannotate.exe를 성공적으로 실행할 수 있습니까?
내 개발 컴퓨터는 Windows 8 Enterprise (64 비트)이고 모든 트리밍과 함께 VS 2012 Ultimate이 설치되어 있습니다. 이전의. NET 프레임 워크 설치, 추가 도구 또는 추가 PCL 전용 도구가 없었습니다. 기본 기능 만 갖춘 새롭고 깨끗한 VM입니다. 모든 구성 및 테스트가이 구성에서 올바르게 실행됩니다.
나는 내가 2.0.5.0을 mscorlib에 필요한 나타내는 오류가 , 휴대용 클래스 라이브러리 중 하나에 의존하는 .NET 4.5 (전체 프로필) 라이브러리에 secannotate.exe를 실행하려고하면.
다음은 오류 예입니다. PCL은 Autofac.dll입니다. .NET 4.5 전체 프로필 라이브러리는 Autofac.Configuration.dll입니다.
Error running annotator: Could not find referenced assembly 'Assembly(Name=mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)'. Ensure that the reference paths and assemblies are setup correctly.
Microsoft (R) .NET Framework Security Transparency Annotator 4.0.30319.17929
Copyright (C) Microsoft Corporation. All rights reserved.
Loaded assembly 'Autofac.Configuration' from 'C:\dev\opensource\autofac\trunk\build_output\bin\net40\Autofac.Configuration.dll'.
Resolving assembly 'Assembly(Name=mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)'.
Loaded assembly 'mscorlib' from 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'.
Loaded referenced assembly from 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'.
Using core assembly: 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' from 'C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'.
Assembly 'Autofac.Configuration' is using transparency model 'Level 2'.
Assembly 'mscorlib' is using transparency model 'Level 2'.
Loaded assembly 'Autofac' from 'C:\dev\opensource\autofac\trunk\build_output\bin\net40\Autofac.dll'.
Resolving assembly 'Assembly(Name=mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)'.
at Microsoft.Security.Tools.CciHostEnvironment.ResolvingAssemblyReference(IUnit referringUnit, AssemblyIdentity referencedAssembly)
at Microsoft.Security.Tools.CciHostEnvironment.LoadCoreAssembly()
at Microsoft.Security.Tools.CciHostEnvironment..ctor(ISecAnnotateHost host, String rootAssemblyPath)
at Microsoft.Security.Tools.SecAnnotate.LoadInputAssemblies()
at Microsoft.Security.Tools.SecAnnotate.AnnotateAssemblies()
at Microsoft.Security.Tools.SecAnnotate.Main(String[] args)
Autofac 휴대용 클래스 라이브러리 목표 : 윈도우 스토어
- .NET 4.0
- 실버 5
- .NET은
당신은 창조하여 문제를 복제 할 수 있습니다 애플 리케이션 이러한 것들을 목표로하는 새로운/빈 PCL. mscorlib 2.0.5.0을 참조하십시오.
일부 검색은 이전 Silverlight 어셈블리 버전에 대한 참조라고 생각하지만 PCL 프로젝트에는 특정 버전 참조가 없으므로 VS 2012 PCL 도구가이 기능을 사용하고 있다고 상상할 수 있습니다. 다른 사람들은 VS 2012 이전에 나온 .NET Framework 업데이트를 설치하여 비슷한 문제를 해결 한 것 같습니다. 내 컴퓨터에서 mscorlib 2.0.5.0을 실제로 찾을 수 없습니다. 내가 내장 Autofac.dll 협의회에서 dotPeek에서 찾고
, 나는 그것을 참조하는 참조 :
- mscorlib에 2.0.5.0
- 시스템 2.0.5.0
- System.ComponentModel.Composition 2.0.5.0
- System.Core 2.0.5.0
그리고 다시, 그것은 직접만한 어떠한 물체를 참조뿐 아니라 PCL 프로젝트입니다 ing. 문자 그대로 - 은 .csproj 파일에 하나의 참조 행이 아닙니다.
이 secannotate 문제를 어떻게 해결합니까? 설치해야 할 것이 있습니까? secannotate 명령 줄에 추가해야하는 매개 변수가 있습니까?
하시기 바랍니다 =), 우리는 프로젝트에서 PCL로 살 수 없어 .. 생산적인 환경 에서이 2.0.5.0 프레임 워크 어셈블리를 참조하는 방법은 없습니다 ... – benwasd
나는 대답을 업데이 트했습니다. –
이것은 개발 컴퓨터에서 확인 만 수정합니다. 아니? 클라이언트에서 .NET 4.0 만 설치되었습니다. .NET 4.0 대상 PCL 어셈블리를로드 할 수 없습니다. – benwasd