I've been struggling trying to get the small sample c# console code from Twilio using my Visual Studio 2017 Pro .NET framework 4.6.1. I keep getting this error message from the Package Manager Console.
An error occurred while trying to restore packages: Unable to find version '1.0.4' of package 'Twilio'/
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages:Package 'Twilio.1.0.4' is not found on source 'C:\Program FIles (x86)\Microsoft SDKs\NuGetPackages'.
http://packagesource: Unable to load the service index for source http://packagesource.
An error occurred while sending the request.
The remote name could not be resolved: 'packagesource'
Any Idea how to fix this problem, has anyone been through this before or the real problem is with Twilio that is not very friendly with C#?
Thank you guys
I would recommend installing the latest version of the Twilio package which at the time of me writing this is 5.65. Try installing the latest version and see if that resolves the compilation error. I ran a test on my local machine using Visual Studio 2019 (Community Edition) and creating a brand new .NET Framework 4.6.1 console application. Using the NuGet Package Manager I installed the latest version of the Twilio NuGet package and built the project without error. I also used the code from the .NET Framework SMS Quick Start located here and it worked with one of my numbers.
As far as the package issue you may want to look here and see if that resolves the issue you're having. Note that one of the answers was to create a new application and reinstall the package using the package manager console rather than the NuGet Package Manager.
Related
I started to learn C# and .net and just installed Microsoft VS 2022 and also installed .net 6.0. I was trying to run the first code and it came up the error as follows. I did some research but can't figure out what's wrong. I noticed there is a similar question on StackOverflow before I tried the answers but didn't work. Can anyone help please?
The error message: The debug executable
'C:\user\owener\source\repos\ConsoleApp2\ConsoleApp2\bin\Debug\net6.0\ConsoleApp2.exe'specified in the 'ConsoleApp2' debug profile does not exist.
Output showing error message:error NETSDK1004: Assets file 'C:\user\owener\source\repos\ConsoleApp2\ConsoleApp2\obj\project.assets.json'not found. Run a NuGet package restore to generate this file.
Select Tools->NuGet Package Manager -> Package Manager Console and type
dotnet restore
or you can first go in settings and search for Nuget->General and Clear the Caches
It is all fixed now. debug, Nuget, PowerShell are all working. I just uninstalled VS 2022 and reinstalled VS 2019 and ticked all extra optional when choosing .Net desktop development. I guess I'm missing some software in my computer system.
I am trying to install EMGU using Nuget. I am using Framework 4.8. WinForms. I'm able to install Emgu.CV but when I try installing Emgu.CV.runtime.windows I get an error saying:
"Could not install package 'Emgu.runtime.windows.msvc.rt.x64 19.28.29336'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.8', 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.
One solution on stackoverflow (Emgu error when trying to install emgu.CV.runtime.windows in VC# 2017) says that "the solution is migrating from package.config to package references" but it didn't work in my case. When I changed migrating I get an error when installing Emgu.CV too. The error is "Unable to find fallback package folder 'C:\Microsoft\Xamarin\NuGet'."
After these I tried manually installing Emgu.runtime and copying dll files but I got a problem related to cvextern.dll. It says that the file is not accessible. I tried registering it rgsvr32 it didn't work. So working manually didn't help either.
How am I supposed to install EMGU.
.netFramework version is not compatible with the package that you are trying to install.
1-Uninstall the packages completely from your project. 2-downgrade
your project's .netFramework version from Properties of the project
3-Reinstall the packages.
Problem with Uipath BOT after deployment.
Tried removing the Newton JSON and Intelligent OCR Packages if they were installed
Its a Package and cannot show the Code for Security Reasons
We have made an solution using UiPath Core Framework which is running successfully on the local machine that is on developer machine once that code is extracted as a package and when have deployed the Package on VDI and when try to execute that package getting the below mentioned error.
I have a solution with projects pointing to .Net Framework 4.5 which I have opened in Visual Studio 2017 and tried to Unit Test Project pointing to .Net Framework 4.5. I am getting the following error
Package Installation error .
Could not add all required packages to the project. The following packages failed to install from 'C:\Program Files(x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\502SXCIF.E5I\Packages':
MSTest.TestFramework.1.1.11: Failed to add reference to 'Microsoft.VisualStudio.TestPlatform.TestFramework'
I have tried changing the Platform to x86 as suggested on some online resources.
I am using a Windows 7 Enterprise 64 bit. Has anyone been able to resolve this.
MsUnit test related template got missed in your local system.if you have another version please try to copy respective folder it will resolve the issue.
In my application I'm trying to read XML files and was attempting to use the System.Xml.Linq utilities. I'm using the .net framework 4.6.1 and trying to install the System.Xml.XDocument NuGet package for that purpose.
When I try to install it from the Package Manager, it seems to install correctly (gains the checkmark in the browse tab of manager), but when I check the installed packages, it doesn't show up. I go back to browse on the package manager and it is back to not being installed in my project. I tried installing via the console, but got this error:
Error finding repository for 'https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/': An error occurred while retrieving package metadata for 'System.Xml.XDocument.4.3.0' from source 'Microsoft and .NET'.
A task was canceled.
So I downloaded the NuGet Package from NuGet.org and dumped it in a folder on my computer, tried installing it from there and it seemed to work, the console no longer producing errors, but I was still getting the same behavior in the Package Manager.
I've deleted my project.json.lock file and done a dotnet restore command a few times while trying to figure this out, but I've hit something of a brickwall in what I can do to get this package installed and usable.
In the meantime I've installed and am using the System.Xml.XmlDocument NuGet Package, so at the very least I know I can install other packages.
After working with the member of my team who knows far more about NuGet Packages than I, he pointed it out to me that System.Xml.XDocument isn't supported while using the .Net 4.6.1 Framework. The correct Package to use is/was System.Xml.XPath.XDocument.
Would have been nice to have some indication of that in Package Manager instead of the installed package just uninstalling itself, but That is going to be a marker for me to look for that in the future.