Entity Framework 7 with Universal Windows Platform Add-Migration - entity-framework

I'm trying to implement Universal Windows Platform application with EntityFramework and SQLite (according to: http://ef.readthedocs.org/en/latest/platforms/uwp/getting-started.html) but I have problem with Add-Migration command.
Here is my setup:
Visual Studio 2015 Update 1
EntityFramework.SQLite: "7.0.0-rc1-final"
Error that I got while adding migrations is:
Could not load file or assembly 'System.Collections.Immutable, Version=1.1.36.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Thanks in advance for your help!

It is clearly that you miss a dll "System.Collections.Immutable, Version=1.1.36.0" in your project.
To solve this problem, you can open the Nuget tool, and search for System.Collections.Immutable, then in the "Version" label select the Version 1.1.36, by default it is the latest version 1.1.37.
You can also try to update your VS tool, this possible may also solve your problem.

Related

Integration of the Pendo SDK with the .NET MAUI sample application causes an error

One of our production applications which developed in Xamarin cross platform UI mobile framework, we have been using Pendo-sdk-ios and pendo-sdk-android nuget packages successfully.
https://support.pendo.io/hc/en-us/articles/4404246699419-Developer-s-Guide-to-Installing-the-Pendo-Xamarin-iOS-SDK
Now we are upgrading our xamarin application to .NET MAUI. I am facing an issue, while integrating Pendo-sdk packages with .NET MAUI Appliction.
Here are the steps to reproduce this issue:
A new sample MAUI .NET application has been created, and it has successfully run.
iOS Platform
I added pendo-sdk-ios nuget package version 2.16.0.5665(latest stable version).
I can use the Pendo package in the AppDelegate, the following code does not throw an error.
using Pendo;
I am trying to initialize the Pendo SDK in the AppDelegate, however I am getting the following error.
string pendo_app_key = "eyJhbGci…<KEY_HERE>";
PendoManager.SharedManager().Setup(pendo_app_key);
PendoManager.SharedManager().SetDebugMode(true);
.../CheckingPendo/Platforms/iOS/AppDelegate.cs(22,22): Error CS0012: The type 'NSObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. (CS0012) (CheckingPendo)
I am experiencing the same compile time error after adding Xamarin.ios reference as well.
​​<ItemGroup Condition="'$(TargetFramework)' == 'net6.0-ios'">
<PackageReference Include="pendo-sdk-iOS" Version="2.16.0.5665" />
</ItemGroup>
<ItemGroup>
<Reference Include="Xamarin.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065" />
</ItemGroup>
Android Platform
After adding the pendo-sdk-android nuget package version 2.16.1.4053(latest stable version).
I am getting the following error.
​​
/Users/[user]/.nuget/packages/xamarin.android.support.annotations/28.0.0.3/build/monoandroid90/Xamarin.Android.Support.Annotations.targets(3,3): Error MSB4062: The "Xamarin.Android.Support.BuildTasks.VerifyVersionsTask" task could not be loaded from the assembly /Users/[user]/.nuget/packages/xamarin.android.support.annotations/28.0.0.3/build/monoandroid90/Xamarin.Android.Support.BuildTasks.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. (MSB4062) (CheckingPendo)
I would appreciate your assistance in resolving this issue.
Pendo has released support for maui:
Pendo Maui Plugin
Instruction could be found here
I have checked all the packages you provided with it's reference and dependencies. They are all not support .net 6. So you could not use it in Maui.
Pendo SDK does not currently support MAUI, but they most likely will.

.NET Core Azure Function missing reference

I've added a Nuget-package to my .NET Core "Azure Function"-project:
Install-Package SharePointPnPCoreOnline -Version 2.22.1801
But I receive an error in my code:
Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception
while executing function: StoreInDatabase --->
System.IO.FileNotFoundException : Could not load file or assembly
'SharePointPnP.IdentityModel.Extensions, Version=1.2.3.0,
Culture=neutral, PublicKeyToken=5e633289e95c321a' or one of its
dependencies. The system cannot find the file specified.
This assembly should be included from the Nuget Package, but it doesn't.
As I'm new to .NET Core and Azure Functions, does anyone know how to solve this one?
Update
I see the package has another version number than in the error-details.
But still no idea how to solve this... any ideas?
Looking at the nuget package with the wrong version number, I saw that previous versions are "hidden" in NuGet...
https://www.nuget.org/packages/SharePointPnP.IdentityModel.Extensions/
I solved this by installing the latest version of the package
So in my case, I just ran the command:
Install-Package SharePointPnP.IdentityModel.Extensions -Version 1.2.3

Matlab .Net Assembly compatible with .Net Core1.1

I am trying to use Matab module compiled as .Net assembly in a .Net Core Project, but I receive the following exception:
Unhandled Exception: System.IO.FileNotFoundException: Could not load
file or ass embly 'MWArray, Version=2.17.1.0, Culture=neutral,
PublicKeyToken=e1d84a0da19db8 6f'. The system cannot find the file
specified. at ConsoleAppCore1._1.Program.Main(String[] args)
MCR_R2017b_win64_installer.exe is installed on the system and I am able to load same Matlab module in .Net4.5 project.
Any clue to make it work with .Net Core1.1?
Simply NO - mathworks supports only "classic"/desktop .net framework on Windows platforms
Please refer to this: mathworks doc

Scripts fail with error that Microsoft.ServiceFabric.Internal.Strings.dll is unavailable when "Microsoft Service Fabric" is installed

After upgrading to the latest tools, runtime and SDK (5.5.216.0), PowerShell scripts, such as TestConfiguration.ps1, fail with an error that Microsoft.ServiceFabric.Internal.Strings.dll version 5.0.0.0 can't be found. As soon as I deinstall 'Microsoft Service Fabric' from the control panel, it works just fine. This behavior seems very similar to the Newtonsoft.Json.dll issue that was resolved in 5.5.216.0, just with a different assembly this time around.
Is this a known issue?
It quickly gets tedious to have to uninstall 'Microsoft Service Fabric' when I run certain scripts and then have to install it again for others that require it.
Example of error:
PS C:\git\sf-admin\DeploymentScripts\Microsoft.Azure.ServiceFabric.WindowsServer> .\TestConfiguration.ps1 ..\ClusterConfig.Production.Shared.json
Trace folder doesn't exist. Creating trace folder: C:\git\sf-admin\DeploymentScripts\Microsoft.Azure.ServiceFabric.WindowsServer\DeploymentTraces
Running Best Practices Analyzer...
Standalone package dependent files not found. Check package structure. Error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ServiceFabric.Internal.Strings, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or on
e of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.ServiceFabric.Internal.Strings, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.ServiceFabric.ClusterManagementCommon.ValidatorExtensions.ThrowValidationExceptionIfNull[T](T parameter, String parameterName)
at Microsoft.ServiceFabric.DeploymentManager.BPA.BestPracticesAnalyzer.IsJsonConfigModelValid(StandAloneInstallerJsonModelBase config)
Thanks,
Hans
I believe you're getting that error due to the SDK/Runtime installing dll's to the GAC which are being picked up.
Try running moving your Microsoft.Azure.ServiceFabric.WindowsServer folder to another machine and running TestConfiguration.ps1 again.
If you're running the scripts from a box without internet access then you'll need to specify the location of the .cab which contains the runtime
-FabricRuntimePackagePath C:\temp\Microsoft.Azure.ServiceFabric.WindowsServer.5.5.216.0\MicrosoftAzureServiceFabric5.5.216.0.cab

NUnit v3 alpha in command line: Assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I'm trying to run NUnit v3 alpha from command line. Here's my command line:
[...] \NUnit3\nunit-console NUnitAlpha3Experimental.exe /framework:net-4.5
At first, I got this error:
Errors and Failures Could not load file or assembly 'nunit.framework,
Version=3.0.5378.31152, Culture=neutral,
PublicKeyToken=2638cd05610744eb' or one of its dependencies. This
assembly is built by a runtime newer than the currently loaded runtime
and cannot be loaded.
Then I edited nunit-console.exe.config to comment .net 2.0
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- Comment out the next line to force use of .NET 4.0 -->
<!--<supportedRuntime version="v2.0.50727" />-->
<supportedRuntime version="v4.0.30319" />
</startup>
I tried these command line (with 4.0 and with 4.5)
[...] \NUnit3\nunit-console NUnitAlpha3Experimental.exe /framework:net-4.0
[...] \NUnit3\nunit-console NUnitAlpha3Experimental.exe /framework:net-4.5
Here's the error message I get:
Errors and Failures Could not load file or assembly 'nunit.framework,
Version=3.0.5378.31152, Culture=neutral,
PublicKeyToken=2638cd05610744eb' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
Then I tried to edit nunit-console.exe.config to add a new entry for .net 4.5. I tried 4.5, 4.5.1, 4.5.50710, 4.5.50938, 4.5.50932, 4.5.51641 (all of them are present in control panel -> program and features) and I get a windows popup asking me to install .Net framework 4.5.
Edit: The new entry for .Net framework 4.5* shouldn't work anyways. The unit tests do run even if I get the error message. More info here: https://github.com/nunit/nunit-console/issues/42#issuecomment-58709851
Can someone help me with that? Thank you.
It looks like the problem was due to many versions of the dll included with nunit 3.0 (one of each .net framework version) and how it was made available to my assembly. More info here: https://github.com/nunit/nunit-console/issues/42#issuecomment-58713975