I have a problem on referencing my Exceptionless package. Has anyone ever tried referencing Exceptionless to a Xamarin project? I am having errors when referencing it.
Questions:
What Exceptionless project type do I use? Is it Console and Service Applications?
What package do I reference? Exceptionless or Exceptionless.Portable?
Error Message:
Could not install package 'System.Security.Principal.Windows 4.0.0'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', 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.
I have implemented several solutions and none worked for me right now. I tried referencing the package to a portable class library project and the same error occurs. Hope someone has tried this before and can help me with a solution. Thanks.
This was answered by one of the Exceptionless members, Blake Niemyjski. Thanks!
Question Answers:
You'd need to install the Exceptionless package (Console and Service Applications).
Just the latest Exceptionless package.
Referencing Error Solution:
I'm on version 6.1.0 but the way I installed it to was the portable project they generate and I changed the profile to:
Then I was able to reference exceptionless. I know they added support for .net standard but I've yet to get that to work in any of my samples. Can you please try this and let me know.
Full issue link here.
Related
I am trying to download the Telerik UI for UMP NuGet package using the NuGet Package Manager (I have also tried the console) and I get the following error:
Could not install package 'Telerik.UI.for.UniversalWindowsPlatform 1.0.1.2'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.1', 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.
I have tried changing my .NETFramework version to 4.6.1 as well but it did not work. Is there something I am missing here? It shouldn't be this hard to add a NuGet package, yet here I am... Thank you in advance!
Telerik.UI NuGet spec does not support .NET. It only supports Windows Universal.
I am trying to implement the Xamarin.Auth library in a Xamarin.Forms project. After installing the library in my client project I received a System.NotImplementedException:
System.NotImplementedException:
Portable Bait And Switch is nuget feature, so the package must be installed in all project.
NotImplementedException will indicate that Portable Code from PCL is used and not Platform Specific implementation.
Please check whether platform specific Assembly is properly installed.
Therefore, I installed the library in the Droid project as well. Once I did this, I started getting "Cannot find symbol" errors related to the CustomTabs control:
error: cannot find symbol
extends android.support.customtabs.CustomTabsCallback
symbol: class CustomTabsCallback
location: package android.support.customtabs Kpa.Mko.Mobile.Client.Droid
H:\...\obj\Debug\android\src\android\support\customtabs\CustomTabsClient_CustomTabsCallbackImpl.java
There are 6 of these errors in all, each one related to CustomTabs in some way.
We're using:
Xamarin.Auth 1.3.2.5 Xamarin.Forms 2.3.3.193
Xamarin.Android.Support.v7.AppCompat 25.1.1
Xamarin.Android.Support.v7.CardView 25.1.1
Xamarin.Android.Support.v7.MediaRouter 25.1.1
Xamarin.Android.Support.v7.RecyclerView 25.1.1
I've done some research on this problem in the Xamarin forums, here on Stack Overflow, and of course Google but none of the suggested fixes I found is solving my problem. I am completely confused as to what could be going on here. Am I missing the obvious?
Thanks!
Make sure you have the Xamarin.Android.Support.CustomTabs NuGet package installed. This is not, by default, included in the pre-packaged Xamarin.Android.Support packages that are loaded with the Android project template.
Nuget package tuning can be problematic. I had numerous problems since I added Xamarin.Forms support. Try nuking all bin/ and obj/ folders, if not update SDK and then again nuke everything...
Xamarin.Auth nuget has dependencies and it should pull other stuff in.
Samples extracted from the repo:
https://github.com/moljac/Xamarin.Auth.Samples.NugetReferences
I am trying to create Web API that will connect to the SQL server and run the stored procedure. I wanted to install the System.Data.SqlClient in to the project so I can give the connection details. But when tried to install that through the Nuget Manager it throws error like
Install failed. Rolling back...
Could not install package 'System.Data.SqlClient 4.3.0'.
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.
How can I install them or is there any other way of giving the connectionStrings in web.config
I could solve this problem with a little workaround for Xamarin PCL:
Change your PCL target to .NetStandard. You can do it in the PCL project properties.
Create a new .NetStandard ClassLibrary project.
Add the System.Data.SqlClient and your code
Reference the ClassLibrary project dll to the PCL project
With this library you can use the SqlClient.
In your case with asp.net: Perhaps, you can try to create a .NetFramework ClassLibrary and follow the steps above.
I hope it will help you!
I am looking into the .NET MVC projects, and is trying really hard to implement DNX workspace so I can attempt to use DNX workspace instead of MSBuildWorkspace.
I have met the error that
Could not install package 'Microsoft.CodeAnalysis.Workspaces.Dnx 2.4.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.2', 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.
There's no documentation on this error. I tried on all possible versions of .NETframework. I tried downloading and manually adding it as well. (same error)
It seems that this is the only way of changing the analyzer to be able to read MVC projects.
Any help will be appreciated!
For handling Projects with a Project Json you can also use the Package Microsoft.DotNet.ProjectModel.Workspaces which includes the ProjectJsonWorkspace class. You can use it almost the same as MSBuildWorkspace:
var project = new ProjectJsonWorkspace(projectPath);
var projects = project.CurrentSolution.Projects;
I hope this has helped you.
I am using Visual Studio 2013 and have written a trivial console application in which I wish to use the class HttpError which is present in the assembly System.Web.Http. This assembly comes from NuGet. Installing the assembly does not add it to the project References which I find confusing. I then found others who indicated that the correct assembly comes with the NuGet package "Microsoft ASP.NET Web API 2.2 Core Libraries" so I installed that instead. This package downloads 3 libraries and the required assembly is present but no Reference is added to the project. I can hand edit the csproj and manually add the reference but I am thinking that doing so should not be necessary. What am I doing wrong?
To reproduce:
Create a new C# Console application (latest framework is fine)
Add the above NuGet package
Is there a reference to System.Web.Http? If not then this is my problem.
Thanks for the responses in the comments which indicated that this worked.
I cannot explain it but it was not working yesterday but it is working now. I tested it many times before posting the question.