how to get nuget unity - unity3d

I referred to this one
https://learn.microsoft.com/en-us/visualstudio/cross-platform/unity-scripting-upgrade?view=vs-2017#taking-advantage-of-net-compatibility
i attempted to get nuget npgsql and microsoft office
but this error is occured.
Assembly 'Assets/Plugin/Microsoft.Office.Interop.Excel.dll' will not be loaded due to errors:
Unable to resolve reference 'office'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'Microsoft.Vbe.Interop'. Is the assembly missing or incompatible with the current platform?
it was same to happen exactly like npgsql
how to get nuget in unity

You might want to check out this asset: https://github.com/GlitchEnzo/NuGetForUnity

Related

How to restore nuget packages for Autofixture.NSubstitute for .net6 projects type?

Not able to restore packages for AutoFixture.AutoNSubstitute in package. This was working fine earlier but now I am not able to build the solution. Projects are using .NET 6. Unit tests inside solution which are using this project are giving error like
Error CS0234
The type or namespace name 'AutoNSubstitute' does not exist in the namespace 'AutoFixture' (are you missing an assembly reference?)
C:\FILEMAN\test\AStorage.Core.Tests\AutoSubstituteDataAttribute.cs 8 Active
I am not able to add the nuget package when I tried adding the nuget package through the Manage Nuget packages .
Please let me know how I can fix this.

Dynamics Plugin throwing "Could not load file or assembly" error

I have a Dynamics365 Plugin which references a Nuget written by me. The build and the registration of the Plugin works and also the merge of all Libraries worked.
When the Plugin is triggered I get the following error:
Error 'System.IO.FileNotFoundException: Could not load file or assembly
'CustomNuget.Xrm.Common.XYZ, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its
dependencies. The system cannot find the file specified.
The Assembly mentioned in the above error is the Nuget included in the Plugin.
What I know for sure is that this exception is thrown from within a Method which is contained in the above mentioned Assembly (Nuget).
When I check the plugin assemby with ILSpy everything looks ok.
How can this be that an exception is telling me the assembly was not found but the error was thrown exactly from this assembly??
Does anybody have an idea?

Azure Devops Services Pipeline build fails. Builds successfully through Visual Studio and the msbuild command prompt

I have solution with 2 projects both targeting .Net Framework 4. The solution builds successfully in Visual Studio 2015 and 2017 as well as the msbuild command line.
However, when it builds in Azure DevOps Pipeline with Agent Specification vs2015-win2012r2 the first project fails with the following errors. The NuGet restore step shows it successfully installed the NuGet EntityFramework 5.0 package.
The type or namespace name 'Infrastructure' does not exist in the namespace 'System.Data.Entity' (are you missing an assembly reference?)
The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'DbModelBuilder' could not be found (are you missing a using directive or an assembly reference?)
When I change the Agent Specification to vs2017-win2016 the first project builds without error but the second project fails with the following errors:
The type or namespace name 'Description' does not exist in the namespace 'System.Web.Http' (are you missing an assembly reference?)
The type or namespace name 'Http' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)
Error CS0234: The type or namespace name 'Http' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)
I do have the NuGet package Microsoft.Asp.Net.WebApi.Core.4.0.20710.0 referenced in the csproj file which contains the System.Web.Http.dll.
I have turned the debug option on. Here are links to the NuGet Restore Log https://drive.google.com/open?id=1lJWflXTjYTN_MQyLOnwMUr-8LKoR5JRo
and the Build Log
https://drive.google.com/open?id=1ypAVWxniDLfBOBHc4gODdAoQOCQnphYg
According to your log, there is a warning message.
warning MSB3267: The primary reference "System.Net.Http", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "System.Net.Http" or retarget your application to a framework version which contains "System.Net.Http".
Some differences are in effect when executing a command on a local machine and when a build or release is running on an agent. If the agent is configured to run as a service on Linux, macOS, or Windows, then it is not running within an interactive logged-on session. Without an interactive logged-on session, UI interaction and other limitations exist. And there are some troubleshooting steps which was provided by Microsoft.
There is a simple method that you can try to resolve the error. Delete the reference under the project's references, and then juse add it back in again.The reference was to a namespace in a local project to the solution. For some reason it was being found locally but not found when checked into and built on VSTS.

Microsoft.Data.Services.Client Nuget package trying to install wrong dependencies

In Visual Studio 2017 Update 3 (15.3), with latest Nuget (4.3.0.4339), I am trying to upgrade Microsoft.Data.Edm from 5.6.4 --> 5.8.2.
Attempting to gather dependency information for package 'Microsoft.Data.Edm.5.8.2' with respect to project 'ConsoleApps\FeedProvider', targeting '.NETFramework,Version=v4.6.1'
Gathering dependency information took 1.98 sec
Attempting to resolve dependencies for package 'Microsoft.Data.Edm.5.8.2' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Microsoft.Data.Edm.5.8.2'
Resolved actions to install package 'Microsoft.Data.Edm.5.8.2'
Time Elapsed: 00:00:02.0136869
========== Finished ==========
On Nuget site Edm package does not list any dependencies. When confirmation window shows up it lists dependencies under installing section, which seem to be pulled from Microsoft.Data.Services.Client .NETStandard 1.1 list of dependencies:
I am clearly not using .NETStandard 1.1 for the project in question (nor any other project in this solution), as you can see if you scroll top log to the right with respect to project 'ConsoleApps\FeedProvider', targeting '.NETFramework,Version=v4.6.1'
Does anyone know what's up, or how to get around this problem?
Does anyone know what's up, or how to get around this problem?
Update answer according to the CrnaStena`s comment.
This package should be a problematic package. According to the Dependencies of the package Microsoft.Data.Services.Client:
We can notice that the dependencies Microsoft.Data.Edm has no framework specific. In this condition, NuGet will install the dependencies in the framework .NET Standard, Version=1.1. That why we got that confirmation window shows up the error dependencies.
In order to track this issue, I have create a new issue on GitHub:
NuGet install the wrong dependecies
To resolve this issue, I downloaded this package and add the dependence Microsoft.Data.Edm in to the .net framework 4.0 by NuGet Package Explorer.
Update:
Since there is a new version released:https://www.nuget.org/packages/Microsoft.Data.Services.Client/5.8.3
I have verified it, and it works fine.
Then save this package to the local feed, install the package from local feed.

CRM 2013: Error Custom Workflow Assembly Profiler

I'm trying to debug my custom workflow assembly using the plugin registration tool for the first time. We are using CRM 2013 on-premise version.
However in setting up the profiler, I got this error below about my mismatched version of 'Microsoft.Xrm.Sdk.Workflow'.
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Xrm.Sdk.Workflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)........................
I see that my Microsoft.Xrm.Sdk.Workflow version in the reference property is actually 5.0.0.0. However when I delete and re-add the reference (from the CRM 2013 SDK), then it shows a different version 5.0.9690.3739.
I read other questions about this, but I don't exactly understand how to synch the correct version together. Could someone please let me know how to do this step-by-step - if I need to change the one on the CRM server.
Notice the difference version between the two pics.