Last post Feb 03, 2021 01:56 PM by SimsenVejle
Feb 02, 2021 05:59 PM|SimsenVejle|LINK
I get the above error and I don't know what to do. I have went through a lot of pages, but nothing seams to get rid of the error. The error doesn't show up on compile time. I have 10-15 times reinstalled the nuget in both projects.
It's first after I made a new project (Businesslayer) the error came.
The error come here
@Html.DisplayNameFor(model => model.Name)
I have checked the System.ComponentModel version and also System.ComponentModel.Annotations and both is the same what I installed in the Nuget manager.
The BusinessLayer project look like this
<PackageReference Include="System.ComponentModel" Version="4.3.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
<HintPath>..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Configuration.dll</HintPath>
I hope some of you can help me. I do not know what to do :-)
Feb 02, 2021 07:44 PM|SimsenVejle|LINK
I don't know if that helps you telling me what I have to do.
I remove the System.ComponentModel.Annotations from my project in both projects. Then I go into Nuget Manager and install the latest stabel 5.0.0.
Then when look in my object browser I can see 2 System.ComponentModel.Annotations first 220.127.116.11 and then 18.104.22.168.
I have tried to remove the bin folder - then I right click on the System.ComponentModel.Annotations.dll file an the fileversion sais 4.6.26515.6
Feb 03, 2021 07:20 AM|YihuiSun|LINK
You can try
bindingRedirect to redirect one assembly version to another.
<bindingRedirect oldVersion="0.0.0.0-22.214.171.124" newVersion="126.96.36.199" />
click this link to see a more detailed explanation.
Feb 03, 2021 01:56 PM|SimsenVejle|LINK
Thank you very much