2011-07-05 6 views
1

다운로드와 함께 제공되는 실행 파일을 사용하여 NHibernate.dll에 대한 moles 어셈블리를 생성하려고하는데 생성 된 코드에 일부 빌드 오류가 있습니다 나는 고치는 법을 모른다 (심지어 가능하다면).NHibernate.Moles.dll을 생성 할 수 없습니다 - 생성 된 코드에서 오류를 빌드하십시오

  1. 복사 NHibernate.dll 및 Iesi.Collections.dll을 새로운 디렉토리 :

    이 내가 할 것입니다. ../pathtomoles/moles.exe NHibernate.dll을 실행 디렉토리의

  2. 서서,

두더지는 출력 다음

 
Microsoft Moles v0.94.51023.0 - http://research.microsoft.com/moles - .NET v4.0. 
30319 
Copyright (c) Microsoft Corporation 2007-2010. All rights reserved. 

00:00:00.00> moles 
    Moles : info : metadata : loading D:\ ... \NHibernate.dll 
    Moles : info : compilation : output assembly name: NHibernate.Moles 
    Moles : info : code : found 2018 types 
    Moles : info : code : visibility: exported or assembly(NHibernate.Moles) 
    00:00:01.87> code generation 
    Moles : info : code : generating code at D:\ ... \obj\moles\nh\m.g.cs 
    00:00:02.05> stubs generation 
     Moles : info : code : generated 1361 stub types 
    00:00:05.68> moles generation 
     Moles : info : code : generated 1552 mole types 
    00:00:24.13> compiling

및 빌드가 실패하면 다음 오류와 함께 : 나는를 연

error CS0122: 'Remotion.Data.Linq.Clauses.ResultOperatorBase' 
is inaccessible due to its protection level 

error CS0703: Inconsistent accessibility: constraint type 
'Remotion.Data.Linq.Clauses.ResultOperatorBase' is less accessible than 
'NHibernate.Linq.Visitors.ResultOperatorProcessors.Moles.MResultOperatorProcessor'

프로젝트를 통해 오류를 직접 고칠 수 있는지 확인하지만, Moles는 하나의 코드 파일에서 모든 것을 생성합니다. 따라서 거대한 결과입니다 (빌드 오류는 라인 333100과 333102 ...) 그래서 Visual Studio 다소 열렸습니다.

어쨌든이 세대 오류를 해결할 수 있습니까? moles.exe의 옵션을 살펴 봤지만 그다지 많은 것을 얻지는 못합니다.

다른 사람이 이미 NHibernate.Moles.dll을 생성 했습니까? 그렇다면 어디에서 찾을 수 있습니까?

--- Output 
Build started 2011-07-05 10:19:03. 
Project "D:\Projects\NCVIB-GIT\NCVIB\src\Vendor\Microsoft Moles\PublicAssemblies 
\NHibernate Moles\obj\moles\nh\m.g.csproj" on node 1 (default targets). 
PrepareForBuild: 
    Creating directory "b\". 
    Creating directory "o\". 
GenerateTargetFrameworkMonikerAttribute: 
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output fil 
es are up-to-date with respect to the input files. 
CoreCompile: 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Csc.exe /noconfig /unsafe+ /no 
warn:1587,1591,1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /doc:b\NHibernat 
e.Moles.xml /define:TRACE /reference:ic="D:\Projects\NCVIB-GIT\NCVIB\src\Vendor\ 
Microsoft Moles\PublicAssemblies\NHibernate Moles\Iesi.Collections.dll" /referen 
ce:"C:\Program Files (x86)\Common Files\Microsoft Shared\ExtendedReflection\0.94 
.51023.0\bin\Microsoft.ExtendedReflection.dll" /reference:mmf="C:\Program Files 
(x86)\Microsoft Moles\PublicAssemblies\Microsoft.Moles.Framework.dll" /reference 
:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\ 
v4.0\mscorlib.dll" /reference:nh="D:\Projects\NCVIB-GIT\NCVIB\src\Vendor\Microso 
ft Moles\PublicAssemblies\NHibernate Moles\NHibernate.dll" /reference:"C:\Progra 
m Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System 
.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Fra 
mework\.NETFramework\v4.0\System.Data.dll" /reference:"C:\Program Files (x86)\Re 
ference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" /reference 
:ssm="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramew 
ork\v4.0\System.ServiceModel.dll" /reference:st="C:\Program Files (x86)\Referenc 
e Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Transactions.dll" /re 
ference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFra 
mework\v4.0\System.Xml.dll" /debug:pdbonly /keyfile:m.g.snk /optimize+ /out:o\NH 
ibernate.Moles.dll /target:library m.g.cs "C:\Users\Tomas\AppData\Local\Temp\.NE 
TFramework,Version=v4.0.AssemblyAttributes.cs" 
m.g.cs(333102,50): error CS0122: 'Remotion.Data.Linq.Clauses.ResultOperatorBase' 
is inaccessible due to its protection level [D:\Projects\NCVIB-GIT\NCVIB\src\Ve 
ndor\Microsoft Moles\PublicAssemblies\NHibernate Moles\obj\moles\nh\m.g.csproj] 
m.g.cs(333100,26): error CS0703: Inconsistent accessibility: constraint type 'Re 
motion.Data.Linq.Clauses.ResultOperatorBase' is less accessible than 'NHibernate 
.Linq.Visitors.ResultOperatorProcessors.Moles.MResultOperatorProcessor' [D:\P 
rojects\NCVIB-GIT\NCVIB\src\Vendor\Microsoft Moles\PublicAssemblies\NHibernate M 
oles\obj\moles\nh\m.g.csproj] 
Done Building Project "D:\Projects\NCVIB-GIT\NCVIB\src\Vendor\Microsoft Moles\Pu 
blicAssemblies\NHibernate Moles\obj\moles\nh\m.g.csproj" (default targets) -- FA 
ILED. 

Build FAILED. 

"D:\Projects\NCVIB-GIT\NCVIB\src\Vendor\Microsoft Moles\PublicAssemblies\NHibern 
ate Moles\obj\moles\nh\m.g.csproj" (default target) (1) -> 
(CoreCompile target) -> 
    m.g.cs(333102,50): error CS0122: 'Remotion.Data.Linq.Clauses.ResultOperatorBas 
e' is inaccessible due to its protection level [D:\Projects\NCVIB-GIT\NCVIB\src\ 
Vendor\Microsoft Moles\PublicAssemblies\NHibernate Moles\obj\moles\nh\m.g.csproj 
] 
    m.g.cs(333100,26): error CS0703: Inconsistent accessibility: constraint type ' 
Remotion.Data.Linq.Clauses.ResultOperatorBase' is less accessible than 'NHiberna 
te.Linq.Visitors.ResultOperatorProcessors.Moles.MResultOperatorProcessor' [D: 
\Projects\NCVIB-GIT\NCVIB\src\Vendor\Microsoft Moles\PublicAssemblies\NHibernate 
Moles\obj\moles\nh\m.g.csproj] 

    0 Warning(s) 
    2 Error(s) 

Time Elapsed 00:00:03.24 




--- Environment 

    Moles : warning : compilation : project compilation failed with exit code 1 
    Moles : warning : compilation : compilation failed, retrying without Code Co 
ntracts 
--- Output 
Build started 2011-07-05 10:19:06. 
Project "D:\Projects\NCVIB-GIT\NCVIB\src\Vendor\Microsoft Moles\PublicAssemblies 
\NHibernate Moles\obj\moles\nh\m.g.csproj" on node 1 (default targets). 
GenerateTargetFrameworkMonikerAttribute: 
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output fil 
es are up-to-date with respect to the input files. 
CoreCompile: 
    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Csc.exe /noconfig /unsafe+ /no 
warn:1587,1591,1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /doc:b\NHibernat 
e.Moles.xml /define:TRACE /reference:ic="D:\Projects\NCVIB-GIT\NCVIB\src\Vendor\ 
Microsoft Moles\PublicAssemblies\NHibernate Moles\Iesi.Collections.dll" /referen 
ce:"C:\Program Files (x86)\Common Files\Microsoft Shared\ExtendedReflection\0.94 
.51023.0\bin\Microsoft.ExtendedReflection.dll" /reference:mmf="C:\Program Files 
(x86)\Microsoft Moles\PublicAssemblies\Microsoft.Moles.Framework.dll" /reference 
:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\ 
v4.0\mscorlib.dll" /reference:nh="D:\Projects\NCVIB-GIT\NCVIB\src\Vendor\Microso 
ft Moles\PublicAssemblies\NHibernate Moles\NHibernate.dll" /reference:"C:\Progra 
m Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System 
.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Fra 
mework\.NETFramework\v4.0\System.Data.dll" /reference:"C:\Program Files (x86)\Re 
ference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" /reference 
:ssm="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramew 
ork\v4.0\System.ServiceModel.dll" /reference:st="C:\Program Files (x86)\Referenc 
e Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Transactions.dll" /re 
ference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFra 
mework\v4.0\System.Xml.dll" /debug:pdbonly /keyfile:m.g.snk /optimize+ /out:o\NH 
ibernate.Moles.dll /target:library m.g.cs "C:\Users\Tomas\AppData\Local\Temp\.NE 
TFramework,Version=v4.0.AssemblyAttributes.cs" 
m.g.cs(333102,50): error CS0122: 'Remotion.Data.Linq.Clauses.ResultOperatorBase' 
is inaccessible due to its protection level [D:\Projects\NCVIB-GIT\NCVIB\src\Ve 
ndor\Microsoft Moles\PublicAssemblies\NHibernate Moles\obj\moles\nh\m.g.csproj] 
m.g.cs(333100,26): error CS0703: Inconsistent accessibility: constraint type 'Re 
motion.Data.Linq.Clauses.ResultOperatorBase' is less accessible than 'NHibernate 
.Linq.Visitors.ResultOperatorProcessors.Moles.MResultOperatorProcessor' [D:\P 
rojects\NCVIB-GIT\NCVIB\src\Vendor\Microsoft Moles\PublicAssemblies\NHibernate M 
oles\obj\moles\nh\m.g.csproj] 
Done Building Project "D:\Projects\NCVIB-GIT\NCVIB\src\Vendor\Microsoft Moles\Pu 
blicAssemblies\NHibernate Moles\obj\moles\nh\m.g.csproj" (default targets) -- FA 
ILED. 

Build FAILED. 

"D:\Projects\NCVIB-GIT\NCVIB\src\Vendor\Microsoft Moles\PublicAssemblies\NHibern 
ate Moles\obj\moles\nh\m.g.csproj" (default target) (1) -> 
(CoreCompile target) -> 
    m.g.cs(333102,50): error CS0122: 'Remotion.Data.Linq.Clauses.ResultOperatorBas 
e' is inaccessible due to its protection level [D:\Projects\NCVIB-GIT\NCVIB\src\ 
Vendor\Microsoft Moles\PublicAssemblies\NHibernate Moles\obj\moles\nh\m.g.csproj 
] 
    m.g.cs(333100,26): error CS0703: Inconsistent accessibility: constraint type ' 
Remotion.Data.Linq.Clauses.ResultOperatorBase' is less accessible than 'NHiberna 
te.Linq.Visitors.ResultOperatorProcessors.Moles.MResultOperatorProcessor' [D: 
\Projects\NCVIB-GIT\NCVIB\src\Vendor\Microsoft Moles\PublicAssemblies\NHibernate 
Moles\obj\moles\nh\m.g.csproj] 

    0 Warning(s) 
    2 Error(s) 

Time Elapsed 00:00:02.76

답변

2

I가 발생하는 경우 모든 유형 : .는 구글 검색에서 "단어 분리기"을 의미하기 때문에, 그것은 나에게 많은 ... 참조


전체 빌드 출력을 부여하지 않았습니다 오류가 발생하지만 nhibernate에서 두 번째 유형을 선택하여 두더지를 생성 할 수 있습니다.

내 vs.net 프로젝트의 NHibernate.moles 파일 :

<Moles xmlns="http://schemas.microsoft.com/moles/2010/"> 
    <Assembly Name="NHibernate" /> 
    <StubGeneration > 
    <Types > 
     <Clear /> 
     <Add TypeName ="Session"/> 
    </Types> 
    </StubGeneration> 
    <MoleGeneration > 
    <Types > 
     <Clear /> 
     <Add TypeName ="Session"/> 
    </Types> 
    </MoleGeneration> 
</Moles> 

좋아, 내가 파일을 .moles 사용하기위한 매개 변수를 가지고 :

"C:\Program Files\Microsoft Moles\bin\moles.exe" /mfo /nologo /tfv:v4.0 /r:"<full path>\NHibernate.dll;<full path>\Iesi.Collections.dll" "NHibernate.moles" 

난 당신이 필요한 경우 확실하지 않다을 이러한 유형으로 아무것도하지 않으면 Iesi.Collections를 포함하십시오.

+0

NHibernate.mll이라는 이름의 파일을 NHibernate dll의 디렉토리에 추가하고'moles.exe NHibernate.moles'를 실행했지만 성공하지 못했습니다. Moles는 스텁을 찾을 수없는 것 같아 아무 것도하지 않고 종료됩니다. 'moles.exe/mfo NHibernate.dll'은 두더지에 어셈블리가 없다고 불평합니다. –

+0

두더지 매개 변수를 업데이트했습니다. 테스트 한 NHibernate의 버전은 3.2입니다. – Peter

+0

이제 공식적으로 내 영웅이되었습니다 =) –