system data entity core incompatible exception - c#-2.0

Am getting the below error when i try to run the project after deploying the changes from local to the server.
Tried the below methods:
Replaced only the modified Dll's
Replaced the Entity Framework Dll from the backup
None of the above mentioned step worked for me.
Adding the SS of line number to which it's pointing in the error msg

Related

Can't build app on release mode Xamarin iOS

I keep getting this error when I try to run the app on release mode:
Severity Code Description Project File Line Suppression State Error
Can't resolve the reference 'System.Void
System.Security.Cryptography.DSACng::.ctor(System.Security.Cryptography.CngKey)',
referenced from the method 'T
Internal.Cryptography.Pal.Windows.PkcsPalWindows::GetPrivateKey(System.Security.Cryptography.X509Certificates.X509Certificate2,System.Boolean,System.Boolean)'
in 'System.Security.Cryptography.Cng, Version=4.3.3.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. LabelApp.iOS
I see on the internet that it is related to mailkit, however, I deleted all references to mailkit. On android, everything works fine and even on debug mode it works fine.
I already tried removing the references to mailkit and used older and newer versions of mailkit. I expected that the error would be resolved because this worked on another app I made in the past, but it didn't.
I fixed it. It seems that the problem was with a package called EPPlus which I used to export data to an excel file.

Running .net Core App in Dockers generates File Not Found Error

I am running a .net core application on Dockers. At first it kept on slamming me with "FileNotFound_FileName": "/usr/share/dotnet/appsettings.json" error. I fixed it with replacing
//string baseDirectory = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
string baseDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
and now the app runs okay in Dockers but only in debug mode. When i switch to release i still see the same notorious file not found message. "FileNotFound_FileName": "/usr/share/dotnet/appsettings.json". It has resorted back to the original location. Any help understand what is going on here?
I have cleaned nuget cache, cleaned the project, rebuilt it. Even closed VS2019 and launched it again. But app still gives the same error in release mode.

How do I write a Logary target for my .NET application?

I am trying to get started with Logary. I need to write a new target and I have tried following the following tutorial https://logary.tech/tutorials. I have downloaded Logary.sln from https://github.com/logary/logary, but I am not able to build Logary.sln. When I build it I get 40 errors and all of them say: The command ""paket.exe" restore" exited with code 9009.
When I try to add the nuget Logary (latest 5.0) with NuGet manager I get NU1108: Cycle detected. Logary -> Logary (>= 5.0.0).
When I try following this https://logary.tech/logary-dotnet-quickstart I get 2 errors as well.
So, I am totally lost. What am I missing out? I will provide more information if necessary. I want to write a target in F# for my .NET application that would be sent as an event to Logary's centralised event storage.
I have used FAKE build and it worked OK. The problem was cause by some namespaces, which is fixed in the fake.
I seems that the problem is with the project name. Its name is the same as the referenced NuGet package. So to resolve this problem you should changed the project name and the build will succeeded.

Dagger 2 compile time error on CI

I've been using Dagger 2 recently and just did some work with scopes in my android project, adding scopes for Activities. While everything runs, builds and tests fine on my own machine. I'm getting a compile error on Jenkins CI.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':Adverts:compile***DebugJava'
.java.lang.ClassCastException: java.lang.String cannot be cast to javax.lang.model.type.TypeMirror
This is strange because the build has worked fine up until now with Dagger 2 just with less code being generated. When I navigate to the generated sources some, but not all of the code is generated. It looks like it's crapping it out somewhere along the way. Both CI and my machine are using the same version of JDK.
Has anybody ran into issues with CI & Dagger 2 before?
For people in the future who encounter this error as well, it's most likely because of a class you deleted or a class that doesn't exist that is being referenced in your Module.
I had the exact same error while compiling when I had code like this:
#Module(includes = {
AModuleThatDoesntExist.class
})
public class YourModule {
}
So what I'm saying is: if you encounter this error, check your Dagger modules and bootstrapper code, there's probably some invalid code there.
As to why it works on your machine and not on the CI server: I don't know. I would guess it's because of some cache issue where the .class file of your deleted .java file is still present on your local filesystem, so Dapper can find it, but it doesn't exist on your CI server. If you can still reproduce the issue, maybe you can try running "Rebuild" and see if the errors occurs locally too.
Whatever happens Dagger 2's annotation processor shouldn't throw an exception so assuming that is coming from the Dagger 2 annotation processor it might be worth raising a bug if you can create a reproducible example, preferably a simple one.
As others have suggested do a clean build (remove the classes yourself to make sure that they are all gone) and check for differences between your machine and the CI one.

Compilation failed for data model at path after upgrading Xcode

After upgrading to Xcode 4.3.2 I have started getting the following error when i do a build:
Compilation failed for data model at path '/Users/Administrator/Library/Developer/Xcode/DerivedData/AppName-ffeggcadwojrwacrwosvadafamrk/Build/Products/Debug-iphoneos/Data.momd/Data.mom'
This was not happening before the upgrade and if i check out the same project on machine running the previous version of Xcode it works fine. No Errors.
I have found a couple of similar posts here and here but none of the answers have helped at all. From the error message the file path it gives doesn't contain a file so i'm guessing its a property somewhere that i need to change but i just can't find it.
Please help, thanks.
EDIT: On further investigation, i can stop it from erroring if i remove certain entities from the data model file, we are currently using a large pre created sqlite file to load data so i could recreate the data model file but that would mean recreating the sqlite which would be a bit of a pain. Anyone know why certain entities cause this?

Resources