I am developing a xamarin cross platform that is composed of following projects
1)Portable
2)IOS
3)Android
4)UWP
I am facing an issue while installing NuGet package for the xamarin portable project. Actually the NuGet that i am trying to install is targeted on .net Framework version 4.5.2. So we need the .net Version 4.5.2 or higher in our application in order to install this library. However when i try to change target framework version in my project properties to 4.6 then also i am facing the compatibility error that given package is not compatible with .net 4.5.
So what is the correct way that to set the .Net framework version in the project so that i can install it any project.
I have also referred to this doc by Microsoft
https://learn.microsoft.com/en-gb/dotnet/standard/net-standard#comparison-to-portable-class-libraries
that shows compatibility matrix.
I think it is related to .net standard 2.0. use these links
https://xamarinhelp.com/upgrade-pcl-net-standard-class-library/
https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-net-standard-2-0/
Related
I am beginner to .NET framework and ReactJS. I have a code repository which is .NET framework, with ReactJS dependency.
When I opened the repository, VS Code suggested me to install C# extension, I installed.
Now when I opened the main file abc.csproj; it automatically started installing packages.
It ended with message:
Finished
Failed to spawn 'dotnet --info'
and notified:
The .NET core SDK cannot be located. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on path.
What is process and list of extensions if I need it to be ran in VS Code?
P. S. It is a .NET framework 4.5 project and not core .NET project
The C# extension no longer ships with an included Mono & MSBuild Tools...
If you still need Unity or .NET Framework support, you can set
omnisharp.useModernNet to false
in your VS Code settings and restart OmniSharp.
See issue #5120 for more details.
https://github.com/OmniSharp/omnisharp-vscode/issues/5120
it seems you don't have the .net framework SDK installed on your machine.
you can download and install .net sdk from here : https://dotnet.microsoft.com/download/visual-studio-sdks to be able to build .net framework projects
I will suggest to use Microsoft Visual Studio. I am using it and it's good and dragless rather than getting SDKs and having installation troubles.
.NET Core 3.1.301 and 5.0.100 SDKs are installed on my machine. When I try build a nopCommerce solution, I get the following build error:
Error: .NET Core 3.1.201 SDK is required to build this application, and is not installed. Install the latest update to the .NET Core 3.1.201 SDK by visiting https://aka.ms/vs/mac/install-netcore31 (Nop.Core)
I was under the assumption that .NET Core is backwards compatible across major and minor releases. If my assumption is correct, is it possible to tie down a build to a specific version of .NET Core? If so, where is it set and why would it be desirable to do so?
In order to properly run CM in a Xamarin Forms project using .Net Standard, what version of .NET Standard should I be targeting? I am currently targeting .NET Standard 2.0 and I'm getting the warning:
"Package 'Caliburn.Micro 4.0.0-alpha.1' was restored using
'.NETPortable,Version=v0.0,Profile=Profile259,
.NETPortable,Version=v0.0,Profile=Profile259,
.NETPortable,Version=v0.0,Profile=net45+win+win81+wp8+wpa81,
.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2,
.NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1,
.NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8'
instead of the project target framework '
.NETStandard,Version=v2.0'. This package may not be fully compatible with your project."
Should I be on .NET Standard 1.6 or 1.0? I've seen the following comment from Nigel:
Caliburn.Micro.Core can target .NET Standard 1.0 so lots of support there.
Caliburn.Micro.Xamarin.Forms will be 1.6.
However, since the forms project will pull in both of those packages in, I am confused as to which version I should target.
My project runs fine in the simulator but crashes on an iOS device. I'm thinking it has something to do with the warning above.
Thanks!
Sean
I'd like to use NodaTime with Xamarin Forms in a PCL, however the NuGet install fails with this message:
Could not install package 'NodaTime 2.0.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259',
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.
The NuGet package information says it doesn't have any dependencies, what's up?
NodaTime 2.0.0 only supports .NET45 or .NET Standard. You either need to update your Xamarin Forms project to .NET Standard, or downgrade your NodaTime version 1.3.4.
I created an empty ASP.NET 5 to work with .NET Core. I am trying to add MVC package to the application but I am receiving an Error that the Versions are not compatible, although I tried lots of MVC versions.
Anyone has an idea about the problem? thank you!
You need Nuget packages in the Microsoft.AspNetCore.Mvc namespace. You're currently trying to install Microsoft.AspNet.Mvc 5.2.3, which is the traditional MVC package and only works with full .NET.
If you're working with .NET Core you should be using Microsoft.AspNetCore.* packages. (Microsoft.AspNet.* packages target the full .NET framework.)
Your screenshot shows a dependency on DNX. You do realize that's a pre-release technology? I don't mean to be rude but I'm curious as to why you would be targeting the pre-release framework rather than RTM (which has been available for several months).
If you do want to work with the prerelease bits, you may need to tweak your NuGet feeds to be able to see the appropriate .NET Core packages (I definitely had to do this when working with .NET Core betas).