EntityFramework 5 use dll version 4.4.0.instead 5.0 - entity-framework-5

I have project based on .NET 4.0 but I need to use EntityFramework 5 in my solution. So I install it from the NuGet.
After that I change target framework to .NET 4.5 (I'm using VS 2012) and rebuild project.
But in reference folder I see that project use EntityFramework.dll version 4.4.0.0.
Ho can I use newer version of EntityFramework?
in web.config
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</assemblies>
</compilation>

Newer version (the real EF5) is dependent on .NET 4.5. If you have added EF5 when your project was based on .NET 4.0 you will have only EF 4.4 (EF5 version without features dependent on .NET 4.5). After upgrading to EF 5.0 you need to update EntityFramework package. You can try to use Update-Package command. If it doesn't help you will need to uninstall package first and than add it again.

Related

DocuSign.eSign, Version=4.3.0.0, could not be resolved on the .NET Framework assembly "System.ComponentModel.Annotations, Version=4.2.0.0

I am getting below error when adding reference of assembly DocuSign.eSign.dll and build the solution. I tried with version 4.3.0 and 4.1.1 for DocuSign.eSign.dll.
The primary reference "DocuSign.eSign, Version=4.3.0.0, Culture=neutral, PublicKeyToken=7fca6fcbbc219ede, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "System.ComponentModel.Annotations, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a higher version "4.2.0.0" than the version "4.0.0.0" in the current target framework.
Please note - I am using VS 2012 with latest framework 4.5.
The SDK requires at least version 4.5.2 of the .NET Framework or above.
VS 2012 is pretty old, but Microsoft says you can still upgrade your .NET Framework to 4.5.2 See here:
https://www.microsoft.com/en-us/download/details.aspx?id=42637

CS0012 The type 'XtraReport' is defined in an assembly that is not referenced

I recently updated my visual studio to 2017 Enterprise.
I used to use DevExpress v15.1
Today, I upgraded my DevExpress to version 18.1 and when I build my .Net MVC5 Application Solution, I got the following error
The type 'XtraReport' is defined in an assembly that is not
referenced. You must add a reference to assembly
'DevExpress.XtraReports.v15.1, Version=15.1.8.0, Culture=neutral,
PublicKeyToken=b88d1754d700e49a'.
The above Error is located in ReportController.cs
I checked my references Folder under the project to find that the DevExpress.XtraReports.v18.1 is there.
What might be the cause of this error?.
Thank you for your help.
Based from the message, the XtraReport still references the older version of its DLL assembly:
'DevExpress.XtraReports.v15.1, Version=15.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a'
Usually this problem occurred because Project Converter failed to update XtraReport related references after upgrade. In this case, you can manually remove all references to older assemblies (version 15.1) and then add references to new assemblies (version 18.1).
Also make sure that web.config file has these assembly information like below example (X indicates revision number):
<add assembly="DevExpress.XtraReports.v18.1, Version=18.1.X.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<add assembly="DevExpress.XtraReports.v18.1.Web, Version=18.1.X.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
If the solution above failed, try install the assemblies to the Global Assembly Cache (GAC) by navigating to X:\Windows\assembly (X stands for the system drive letter) and copy all new DevExpress assemblies to that folder (including DevExpress.XtraReports.v18.1), as mentioned in this issue.
Related issues:
Errors after upgrading DevExpress version
DevExpress.XtraReports.UI.XtraReport is not defined after upgrade
The type 'DevExpress.XtraReports.UI.XtraReport' is defined in an assembly that is not referenced

WSE 2.0 SP2 on WindowsServer 2012 R2

I moved an old application to WS2012R2. Now it throws :
Could not load file or assembly 'Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies
Is it possible somehow install WSE 2.0 SP2 to WS2012R2 ?
As much as I have googled, I can't find any solution which doesn't include upgrading assembly itself to a newer one.

Trouble hosting application using ServiceStack.Razor

When installing the servicestack.razor-package, it transforms the web.config file
<assemblies>
<add assembly="System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
When developing this runs fine, but when I'm deploying the solution to Windows Server 2012, the assembly cannot be found, giving me this error when loading the application:
<assemblies>
<add assembly="System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
Can anyone please give me any insight to how I can get my environment to host my application? Copying this single dll or installing Visual Studio on my server isn't my preferred option.
Thanks!
If System.Web.WebPages.Razor is a dependency that your application needs and it's not in the GAC of your server then you do need to copy that file.
MVC and Razor support are not included in the standard .NET Framework deployment, because they should be deployed as part of the solution.
You could install Microsoft WebMatrix v1 on the server, which should then add that library to the GAC on your server, but to me that seems like overkill when copying should be sufficient.
I would copy System.Web.WebPages.Razor.dll to the bin folder.

Windows Azure - The StorageClient framework could not be loaded

I have debugged and discovered that the StorageClient framework could not be loaded... I'm getting this error Could not load file or assembly Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
The Microsoft.WindowsAzure.StorageClient 1.1.0.0 should be in a very low version of Azure SDK. Currently it should be 1.7 along with SDK 1.8 and 2.0 alone with NuGet package.
You can install the latest SDK to get this solved. Alternatively you might need to mark this assembly as Copy Local = true so that it can be uploaded to azure.
I did delet the StorageClient 1.0 from my project and add the StorageClient 1.7

Resources