Unable to install twilio.AspNet mvc package - package

Install failed. Rolling back...
Install-Package : Could not install package 'Twilio.AspNet.Mvc 5.0.1'. You are trying to install this package into a project that targets .NETFramework,Version=v4.5,
but
the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Twilio.AspNet.Mvc -Version 5.0.1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

Make sure that your Target Framework is at least 4.5.1
Use this command: Install-Package Twilio.AspNet.Mvc -DependencyVersion HighestMinor

Related

error while trying to install yarn in vscode when i had earlier been using npm

This is the error message
yarn : File C:\Users\Admin\AppData\Roaming\npm\yarn.ps1 cannot be loaded
because running scripts is disabled on this system. For more
information, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ yarn
+ ~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
For those who are not aware of how to solve this error using Windows PowerShell
Open PowerShell (Run As Administrator)
Check the current execution policy using this command
Get-ExecutionPolicy
# You should get 'Restricted'
Run this command to make it 'Unrestricted'
Set-ExecutionPolicy Unrestricted
Check again whether execution policy changed by running this command
Get-ExecutionPolicy
You should get 'Unrestricted'
Now try to run nodemon on your project
nodemon 'filename.js'
Hope this would be helpful

create-react-app in VS Code throwing unauthorized access on Windows

When I try to create react app on my Windows machine, I keep getting unauthorized access. I haven't experienced this behaviour on Mac, so I don't really know what might causing the issue.
In the VS Code's Terminal I ran following commands:
PS C:\Users\Foo_Bar\sandbox> npm install -g create-react-app
C:\Users\Foo_Bar\AppData\Roaming\npm\create-react-app -> C:\Users\Foo_Bar\AppData\Roaming\npm\node_modules\create-react-app\index.js
added 91 packages from 45 contributors in 6.923s
PS C:\Users\Foo_Bar\sandbox> create-react-app --version
create-react-app : File C:\Users\Foo_Bar\AppData\Roaming\npm\create-react-app.ps1 ca
nnot be loaded because running scripts is disabled on this system. For more information, see
about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ create-react-app --version
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\Foo_Bar\sandbox> create-react-app test-app
create-react-app : File C:\Users\Foo_Bar\AppData\Roaming\npm\create-react-app.ps1 ca
nnot be loaded because running scripts is disabled on this system. For more information, see
about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ create-react-app test-app
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\Foo_Bar\sandbox>
It looks like npm install -g create-react-app was successful. Creating the actual app or checking version failed, though. Does anyone have any idea what might be the reason of that?
EDIT:
Node and npm versions are following:
PS C:\Users\Foo_Bar\sandbox> node --version
v12.13.0
PS C:\Users\Foo_Bar\sandbox> npm --version
6.12.0
try using
npx create-react-app **foldername**
i had same problem and it was the faster and easier solution

NuGet Package Manager

I can not install this with Package Manager Console:
Install-Package Microsoft.EnityFrameworkCore.Sqlite or Install-Package Microsoft.EnityFrameworkCore.Tools. It is returning:
Install-Package : Unable to find package 'Microsoft.EnityFrameworkCore.Sqlite'
At line:1 char:1
+ Install-Package Microsoft.EnityFrameworkCore.Sqlite
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Your Help will be so much helpfull. Thank you
Firstly, you made a spell mistake on entity word (you are using enity). So it cannot find the right package. The right command should be
Install-Package Microsoft.EntityFrameworkCore.Sqlite not
Install-Package Microsoft.EnityFrameworkCore.Sqlite
Details please reference UWP - New Database. This article provides the correct command you can copy and use.
Additionally, EF Core requires Microsoft.NETCore.UniversalWindowsPlatform version 5.2.2 or greater. Please following the document for checking and upgrade.

NuGet can't find a OxyPlot.Wpf package that is compatible to the OxyPlot.Core package

I installed the OxyPlot.Core package by typing
Install-Package OxyPlot.Core -Pre
which worked fine. Then I tried to install the OxyPlot.Wpf package by typing
Install-Package OxyPlot.Wpf -Pre
but it can't find a package that is compatible to the OxyPlot.Core although the version seems to be the same:
Install-Package : Die Version von "OxyPlot.Core", die mit 'OxyPlot.Wpf 1.0.0-unstable1849 Einschränkung: OxyPlot.Core (= 1.0.0-unstable1849)' kompatibel ist, wurde nicht gefunden.In Zeile:1 Zeichen:1
+ Install-Package OxyPlot.Wpf -Pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
I also tried to install the correct version by typing
Install-Package OxyPlot.Wpf -Version 1.0.0-unstable1849 -Pre
without success.
What am I doing wrong?
It's now working! I uninstalled the Core Version and could then install the WPF package. The Core dependencies have been automatically installed.

Is pre-release versioning possible in nuget

According to the documentation, pre-release versioning is supported, with an example given of:
Within the NuSpec file, specify the version in the element
<version>1.0.1-alpha</version>
I am building from a .nuspec file; if I include this line verbatim, then run (at the package manager console):
PM> nuget pack "Nuget\protobuf-net.nuspec"
then I get a bit fat error:
Attempting to build package from 'protobuf-net.nuspec'.
NuGet.exe : Input string was not in a correct format.
At line:1 char:6
+ nuget <<<< pack "Nuget\protobuf-net.nuspec"
+ CategoryInfo : NotSpecified: (Input string wa...correct format.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
If, however, I just use <version>1.0.1</version> and run exactly the same command, then I get:
Attempting to build package from 'protobuf-net.nuspec'.
Successfully created package 'C:\Dev\protobuf-net\protobuf-net.1.0.1.nupkg'.
And indeed, it has built correctly. My NuGet Package Manager reports version 2.0.30625.9003.
So: am I doing something wrong? or did they break something?
NuGet Version: 1.5.21005.9019
Semantic versioning was introduced in nuget 1.6. Time for an upgrade. You can use nuget update -self to update right from the command line.

Resources