Closed vipin8169 closed 6 years ago
Infer.NET targets .NET Standard 2.0, which requires .NET framework version 4.6.1 or .NET Core 2.1, and Unity 2018.1, as explained at .NET implementation support.
I am using Unity Unity 2018.1.8f1 (64-bit) and .NET 4.x, but not the .NET standard 2.0
I tried switching to .NET Standard 2.0, and everything fell apart although the game is working as expected :(
That looks like a Unity problem, not an Infer.NET problem.
I think it is a problem with Visual Studio, as the game is still working fine :(
Either way, it sounds like the issue is closed on our end.
I changed the config as per the requirements for infer.net but still getting the same error: Screenshot of unity config: Screenshot of error in VS:
That error message is correct. There is no problem with the Infer.NET package, so it is not an Infer.NET issue.
ok, but how do I make it work?
You need to run in >= .NET 4.6.2. If you want to work out how to do that, I suggest you open a ticket with Unity3D.
But my project is clearly using version > .net 4.6. attached is the screenshot for proof.
Please upload your project or a simple repro and I will take a look.
Also, I would suggest you check the project properties of your project in Visual Studio, your screenshot only shows what .NET version is installed to the system, not what you are directing your project to use.
the repo is 163MB in size (after compressing), I am unable to attach here.
Please upload to OneDrive or similar and share a link. Also, have you checked your project properties?
Here is the project repo - https://github.com/vipin8169/chem-o-crypt
Yes, I have checked my project properties both in Unity as well as VS. Did you mean to ask something specific in there?
I do not see the Application tab when I go to my project properties :(
That's your solution properties, you need to go to the properties of each project.
That's your solution properties, you need to go to the properties of each project.
When I go to right click on project and go to properties, nothing happens except a blink and then a message appears at the bottom saying that this item doesn't support previewing:
Found the fix: https://answers.unity.com/questions/1140063/cant-open-project-property-in-visual-studio-2015-w.html
it opened, but one error fix lead to another. extremely annoying:
I'm not familiar with Unity3D, what I did was open the Unity3D project, open the C# project from the menu in Unity3D and then add the NuGet reference.
I installed this version of Unity3D: 2018.3b.
As you can see from the output below, the NuGet package installed correctly. I would naively guess that the issue is the version of Unity3D you are using. Can you try with the version I linked to and report back?
Attempting to gather dependency information for package 'Microsoft.ML.Probabilistic.0.3.1810.501' with respect to project 'Assembly-CSharp-firstpass', targeting '.NETFramework,Version=v4.7.1'
Gathering dependency information took 52.55 ms
Attempting to resolve dependencies for package 'Microsoft.ML.Probabilistic.0.3.1810.501' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Microsoft.ML.Probabilistic.0.3.1810.501'
Resolved actions to install package 'Microsoft.ML.Probabilistic.0.3.1810.501'
Retrieving package 'Microsoft.ML.Probabilistic 0.3.1810.501' from 'nuget.org'.
GET https://api.nuget.org/v3-flatcontainer/microsoft.ml.probabilistic/0.3.1810.501/microsoft.ml.probabilistic.0.3.1810.501.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.ml.probabilistic/0.3.1810.501/microsoft.ml.probabilistic.0.3.1810.501.nupkg 1241ms
Installing Microsoft.ML.Probabilistic 0.3.1810.501.
Adding package 'Microsoft.ML.Probabilistic.0.3.1810.501' to folder 'C:\Users\Home\Downloads\chem-o-crypt-master\packages'
Added package 'Microsoft.ML.Probabilistic.0.3.1810.501' to folder 'C:\Users\Home\Downloads\chem-o-crypt-master\packages'
Added package 'Microsoft.ML.Probabilistic.0.3.1810.501' to 'packages.config'
Successfully installed 'Microsoft.ML.Probabilistic 0.3.1810.501' to Assembly-CSharp-firstpass
Executing nuget actions took 4.74 sec
Time Elapsed: 00:00:04.9116524
========== Finished ==========
I'm not familiar with Unity3D, what I did was open the Unity3D project, open the C# project from the menu in Unity3D and then add the NuGet reference.
I installed this version of Unity3D: 2018.3b.
As you can see from the output below, the NuGet package installed correctly. I would naively guess that the issue is the version of Unity3D you are using. Can you try with the version I linked to and report back?
Attempting to gather dependency information for package 'Microsoft.ML.Probabilistic.0.3.1810.501' with respect to project 'Assembly-CSharp-firstpass', targeting '.NETFramework,Version=v4.7.1' Gathering dependency information took 52.55 ms Attempting to resolve dependencies for package 'Microsoft.ML.Probabilistic.0.3.1810.501' with DependencyBehavior 'Lowest' Resolving dependency information took 0 ms Resolving actions to install package 'Microsoft.ML.Probabilistic.0.3.1810.501' Resolved actions to install package 'Microsoft.ML.Probabilistic.0.3.1810.501' Retrieving package 'Microsoft.ML.Probabilistic 0.3.1810.501' from 'nuget.org'. GET https://api.nuget.org/v3-flatcontainer/microsoft.ml.probabilistic/0.3.1810.501/microsoft.ml.probabilistic.0.3.1810.501.nupkg OK https://api.nuget.org/v3-flatcontainer/microsoft.ml.probabilistic/0.3.1810.501/microsoft.ml.probabilistic.0.3.1810.501.nupkg 1241ms Installing Microsoft.ML.Probabilistic 0.3.1810.501. Adding package 'Microsoft.ML.Probabilistic.0.3.1810.501' to folder 'C:\Users\Home\Downloads\chem-o-crypt-master\packages' Added package 'Microsoft.ML.Probabilistic.0.3.1810.501' to folder 'C:\Users\Home\Downloads\chem-o-crypt-master\packages' Added package 'Microsoft.ML.Probabilistic.0.3.1810.501' to 'packages.config' Successfully installed 'Microsoft.ML.Probabilistic 0.3.1810.501' to Assembly-CSharp-firstpass Executing nuget actions took 4.74 sec Time Elapsed: 00:00:04.9116524 ========== Finished ==========
did you change any of these settings in the unity project?
I did not, the steps I followed were:
I believe the version of Unity3D you are using only allows you to target 4.6 and not higher. Please upgrade your version of Unity3D and report back.
I am trying, the only concern that I have is if it will break anything in my existing project :( How did you check what version of .net does the unity allow, as it just says 4.x in the project settings
You should not need to upgrade Unity. The page I linked earlier clearly says that 2018.1 supports .NET Standard 2.0, and the unity documentation says the same thing. I think it is just the unity configuration. Vijay, can you send your configuration screen?
Here is a screenshot of my Configuration:
Another thought I had was that the targeting/developer pack for > 4.6 might not be installed? From what I have read, Unity3D doesn't appear to rely on an exact version of the framework, but only what you have available. So when you installed a version of Unity2D which was compatible with a newer framework version it may not have installed it for you.
I believe it may be beneficial to install the targeting/developer pack for the .net framework (> 4.6) you wish to run on. You can find all the installers under the .NET Framework Version. At this point we're trying to diagnose why the project I downloaded from your repo and opened as-is is working on my machine and not yours, which leads me to believe it's a targetting issue.
I have the same config on my system as well :/
my target version is also 4.7, which is >4.6
Can you copy the full text from the output pane when you try to install the NuGet package?
wow, I don't know what changed but now I went to install it and viola, it worked. lol banging my head on the wall....!
only changes I did were to fix the right click project properties to appear in my VS, which were earlier giving errors and I solved using this post https://www.reddit.com/r/Unity3D/comments/935n03/an_error_occurred_trying_to_load_the_page_issue/
Issue appears to be solved.
I am Unable to install package Microsoft.ML.Probabilistic for the Infer.NET framework in my Unity project. I am trying to install it by using
Project > Manage Nuget Packages
option in my visual studio. Both .net and the infer.net package are Microsoft products, and yet they have not released a compatible version. When I click on install I get the following error stating that the package is not compatible with .net version 4.6:Below is a screenshot of my Unity3d
Edit > Project Settings > Player
inspector screen: