I am building windows phone 8 and when I try to install AutoMapper Package, I got these errors:
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
The app can't run, any ideas?
Related
I was trying set NODE_ENV development enviroment and it's not working, here the response in the terminal
At line:1 char:1
+ SET NODE_ENV=development nodemon server.js
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-Va
riable], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,
Microsoft.PowerShell.Commands.SetVariableCommand
try each one seperately:
SET NODE_ENV=development
nodemon server.js
I am working on a nodejs project, and I want to debug it using vscode in Windows.I had already setted up launch.json and task.json. In task.json there is a debug command that need to be run before attaching the debugger. The commands takes few arguments, one of which is an "JSON array", which is unable to parse successfully when I tried to run debug.
command in task.json is "myapp debug -p '${workspaceFolder}' \"[{\\\"user\\\":\\\"user1\\\",\\\"userName\\\":\\\"user1Name\\\"}]\" -v v1"
This same task.json is working in MacOs and ubuntu(linux) and use to work in windows as well.
error -
At line:1 char:72
+ ... \Users\opc\Desktop\Ravi\Ts Chaincodes\NFTTS' [{"user":"user1","userNa ...
+ ~~~~~~~~
Unexpected token ':"user1"' in expression or statement.
At line:1 char:80
+ ... Users\opc\Desktop\Ravi\Ts Chaincodes\NFTTS' [{"user":"user1","userNam ...
+ ~
Missing argument in parameter list.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
I just started to install NativeScript on Windows 10 with this command:
#powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
that I got from installation guide here https://docs.nativescript.org/angular/start/quick-setup
But I get this error message:
Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"
At line:1 char:1
+ iex ((new-object net.webclient).DownloadString('https://www.nativescr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
C:\Windows\system32>#powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"
At line:1 char:1
+ iex ((new-object net.webclient).DownloadString('https://www.nativescr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
What is the problem and how can I fix?
The following steps worked for me:
Download the file from the URL (https://www.nativescript.org/setup/win).
Run cmd as administrator and cd to the directory where you downloaded the file.
In cmd execute the following: powershell -noexit "& ""./native-script.ps1"""
I tried to Install-Package Microsoft.AspNet.Web.Optimization, but it throws this error:
Install-Package : Object reference not set to an instance of an object.
At line:1 char:1
Install-Package Microsoft.AspNet.Web.Optimization -Pre
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : NotSpecified: (:) [Install-Package], Exception
FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
I just migrated my Entity Framework from 5 to 6. Then when i tried to run Enable-Migrations command suddenly i got these errors:
Exception calling "LoadFrom" with "1" argument(s): "Could not load file or
assembly 'file:///D:\BitBucketGit\packages\EntityFramework.5.0.0\tools
\EntityFramework.PowerShell.Utility.dll' or one of its dependencies.
Operation is not supported.
(Exception from HRESULT: 0x80131515)" At D:\BitBucketGit\packages
\EntityFramework.6.1.3\tools\EntityFramework.psm1:780 char:5 +
$utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-Path
$ToolsP ... +
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FileLoadException
You cannot call a method on a null-valued expression.
At D:\BitBucketGit\packages\EntityFramework.6.1.3\tool
\EntityFramework.psm1:781 char:5
+ $dispatcher = $utilityAssembly.CreateInstance(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Exception calling "CreateInstanceFrom" with "8" argument(s): "Could not
load file or assembly
'file:///D:\BitBucketGit\packages\EntityFramework.5.0.0\tools
\EntityFramework.PowerShell.dll' or one of its dependencies. Operation is
not supported. (Exception from HRESULT: 0x80131515)"
At D:\BitBucketGit\packages\EntityFramework.6.1.3\tools
\EntityFramework.psm1:809 char:5
+ $domain.CreateInstanceFrom(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FileLoadException
After googling,some suggested to imply a full trust on the package folder which i did. But the error remains.
Is there any other way i can make it fixed.
cheers,
John
Thank for any help. Actually i just found the answer by changing the devenv.exe.config files.
Since I pulled the project from a remote server, I solved this issue by removing all contents of packages folder except repositories.config file and restored all NuGet packages.