AutoMapper找不到dll

时间:2013-11-21 02:40:53

标签: automapper

我正在构建Windows Phone 8,当我尝试安装AutoMapper Package时,我遇到了这些错误:

PM> Install-Package AutoMapper
Installing 'AutoMapper 3.1.0'.
Successfully installed 'AutoMapper 3.1.0'.
Adding 'AutoMapper 3.1.0' to AutoMapper.
Successfully added 'AutoMapper 3.1.0' to AutoMapper.
Method invocation failed because [Microsoft.Build.Construction.ProjectMetadataElement] doesn't contain a method named 'Where'.
At C:\users\documents\visual studio 2012\Projects\AutoMapper\packages\AutoMapper.3.1.0\tools\wp8\Install.ps1:14 
char:3
+         $refPath = $platformSpecificRef.Metadata.Where({ $_.Name -eq "HintPath" }).Val ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound

Exception calling "AddItem" with "2" argument(s): "Parameter "include" cannot have zero length."
At C:\users\miniesoft limited\documents\visual studio 2012\Projects\AutoMapper\packages\AutoMapper.3.1.0\tools\wp8\Install.ps1:16 
char:3
+         $item = $msbuild.Xml.AddItem("Content", $refPath)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentException

You cannot call a method on a null-valued expression.
At C:\users\miniesoft limited\documents\visual studio 2012\Projects\AutoMapper\packages\AutoMapper.3.1.0\tools\wp8\Install.ps1:17 
char:3
+         $item.AddMetadata("Link", [System.IO.Path]::GetFileName($refPath))
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\users\miniesoft limited\documents\visual studio 2012\Projects\AutoMapper\packages\AutoMapper.3.1.0\tools\wp8\Install.ps1:18 
char:3
+         $item.AddMetadata("CopyToOutputDirectory", "PreserveNewest")
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

应用程序无法运行,有什么想法吗?

0 个答案:

没有答案