Unity 2018 and .Net Framework greater then 4.6 - unity3d

So Unity 2018 should support .Net Framework libraries above 4.6 (visit https://blogs.unity3d.com/2018/03/28/updated-scripting-runtime-in-unity-2018-1-what-does-the-future-hold/).
I really need the .Net Framework 4.7.1 support for my project, but it doesn't works. The Scripting Runtime Version and Api Compatibility Level in the Unity Player Settings are setted to .NET 4.x. If i open the C-Sharp Project with Visual Studio 2017, i can install packages with NuGet, that needs the .Net Framework 4.7.1. After the installation the namespaces are available in C#, but if i go back to the Unity Editor, there are already errors in the console, that the namespace of the just installed package could not be found.
I have also tried to overwrite the in the .csproj, but after i open the Project in Unity, it just overwrites it again back to 4.6. The whole compatibility stuff has already worked for me in the 2018.1b, but then i installed the stable version 2018.1.0f2 and now it works neither with the stable nor the beta-version. I also can't find a good guide that explains it, how to use / setup the .Net Framework 4.7.1 support in Unity.

Related

How do you setup Visual Studio for Mac and NUnit

I am using Visual Studio for Mac version 8.5.4 (build 12) and I used NuGet to install Nunit package. I can create a Project NUnit but when I attempt to reference my project I want to test I can't choose my project because it says the .Net target framework is incompatible.
When I added the NUnit project it asked me to pick the target framework and only gave me the option of 2.0, 3.0 and 3.1. Even when I change my project down to 3.1 it still says it's incompatible.
How do you setup Visual Studio for Mac and NUnit
Edit: .Net Standard
Edit 2: I was WRONG. I was using .Net Core and .Net standard together and that was the problem. Thank you everyone.
I was using .Net Core and .Net Standard when I wanted to use .Net Standard for everything.

How to upgrade .Net framework 4.6.2 to 4.7

My solution is developed in .net framework 4.6.2 then how to upgrade in .net framework 4.7, please suggest me some references.
Thank You
I was facing the same issue because I was trying to install a nuget package which requires the 4.6.1 version at least (Mine was 4.5.2), so I right clicked to the project and selected the properties option and change the Target Framework as shown in the image and that was enough! Keep in mind that you have to install previously the Net. Framework you are trying to upgrade.
As per this document from Microsoft:
https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/
If you created your app using an earlier version of the .NET Framework, you can generally upgrade it to the .NET Framework 4.5 and its point releases (4.5.1 and 4.5.2), the .NET Framework 4.6 and its point releases (4.6.1 and 4.6.2), or the .NET Framework 4.7 and its point releases (4.7.1 and 4.7.2) easily. Open your project in Visual Studio. If your project was created in an earlier version of Visual Studio, the Project Compatibility dialog box automatically opens.
You should review the above document to better understand how to migrate your .NET version as required.
For me, the migration guide was not helpful. I needed to:
Open my solution
Right click on my project and choose "Properties"
Change the "Target Framework" to the desired choice of ".NET
Framework 4.7.2"
1.Open Solution
2.Right click on my project
3.Choose "Properties" and Change the "Target Framework" to the desired choice of ". NET Framework 4.7. 2"
It will work

Is there a way to automatically deploy nuget packages in Visual Studio 2017?

I'd like to know if there is a way to automatically deploy NuGet package.
I tried many extensions but not working for VS 2017.
I do know that there is a packager as new VS 2017 feature. But there is no package tab in my project (.NET Library) properties.
If you want the integrated package management for .NET Framework Libraries (not .NET Standard or .NET Core), you can create a .NET Standard Library and edit the csproj file by replacing
<TargetFramework>netstandard1.4</TargetFramework>
with
<TargetFramework>net461</TargetFramework>
There is no built-in template yet for this library type and some designers (win forms, xaml, ..) will not be available but this unlocks all integrated packaging features.

Xamarin Studio gives error on new project

Just installed Xamarin Studio 5.8.2 (build 7). Already have .NET Framework 4.5.1 installed (due to VS2010 and VS2013 installed). Also installed gtk sharp 2.12.25. Upon any newly created project, I get
Error while trying to load the project. Project does not support framework .NETFramework,Version=v4.5.
It is the latest version. I downloaded today, and got an update a few hours later for gtk sharp and XStudio.
You can try editing the .vbproj or .csproj files to change the TargetFramework from 4.5 to 4.0
https://forums.xamarin.com/discussion/28329/error-while-trying-to-load-empty-vb-net-project

How can I add libraries to Xamarin Mono for Android project in VS2010?

I am working on a mono for Android application (my very first) that consumes a web api. In the documentation at xamarin.com there are examples on using different libraries such as RestSharp and Json.Net.
However, when I try to install these libraries via Nuget in my VS2010 project it failes with the following message:
Install failed. Rolling back... Could not install package
'Newtonsoft.Json 4.5.9'. You are trying to install this package into a
project that targets 'MonoAndroid,Version=v2.2', but the package does
not contain any assembly references that are compatible with that
framework. For more information, contact the package author.
How can I include such libraries in my project?
Thanks in advance.
Erwin
This error message indicates those libraries are not compatible with Mono for Android. You should ask the manufacturer of the libraries if they have a MfA compatible version. If you have the source code of the libraries you could also try to make a MfA library, using linked source files, yourself.
Not sure if you've tried this but if you're using xamarin studio and right click the component folder in your Android app project choosing add component should be able to solve your problem. This will add a reference to the component that is added. Components seem like they are mono compatible packages and what's good for your case is that there are components for both RestSharp and Json.Net:
https://components.xamarin.com/view/restsharp
http://components.xamarin.com/view/json.net/