Resource file error - compact-framework

I have a resource file for a pocket PC.
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Windows.Forms.Design.CFResXResourceReader, System.CF.Design, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</resheader>
<resheader name="writer">
<value>System.Windows.Forms.Design.CFResXResourceWriter, System.CF.Design, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</resheader>
Invalid Resx file. ResX input is not valid. Cannot find valid "resheader" tags for the ResX reader and writer type names.
My system doesn't have the system.CF.Design namespace. I have installed the compact version of .net framework 3.5.
Can anyone help me with this issue.This is a high priority issue.

Related

How to resolve warning messages of type: No way to resolve conflict between DLLs

I have a Windows service application made with VB.NET under Visual Studio 2013 and using NET Framework 4.5. I am using Nuget in this project.
Once I build the solution (it builds successfully) I get below warning messages in the results window:
No way to resolve conflict between "Microsoft.ReportViewer.ProcessingObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" and "Microsoft.ReportViewer.ProcessingObjectModel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "Microsoft.ReportViewer.ProcessingObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" arbitrarily.
No way to resolve conflict between "Microsoft.ReportViewer.DataVisualization, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" and "Microsoft.ReportViewer.DataVisualization, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "Microsoft.ReportViewer.DataVisualization, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" arbitrarily.
No way to resolve conflict between "Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" and "Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" arbitrarily.
No way to resolve conflict between "Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" and "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed". Choosing "Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" arbitrarily.
No way to resolve conflict between "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" and "Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed". Choosing "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" arbitrarily.
Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from version "9.0.0.0" [] to version "11.0.0.0" [C:\MyProjects\WindowsServices\MyService\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll] to solve conflict and get rid of warning.
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3276: Microsoft.Common.CurrentVersion.targets Found conflicts between different versions of the same dependent assembly.
Please set the "AutoGenerateBindingRedirects" property to true in the project file. For further information, see http://go.microsoft.com/fwlink/?LinkId=294190.
I have been searching for information about this, and I have found some posts and blogs talking about that:
No Way to Resolve Conflict Between dlls
No Way to Resolve Conflict Between dlls
I have tried to clean up all the references in the VB.NET project that were not being used but above warning messages continue appearing.
Also I have gone into Manage NuGet Packages but I have not seen any duplicate packages in the list.
I don't see the duplicates anywhere (vbproj project file, app.config, etc.). Where can I find those duplicates? Where are the duplicates? How to search for the duplicates?
Finally, I know there is another way to resolve those conflicts (I have not tried yet) and it consists on adding binding redirects for all the assemblies that are conflicted in the app.config file. For example, in case of ClosedXML DLL:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="ClosedXML" publicKeyToken="fd1eb21b62ae805b" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.85.0.0" newVersion="0.85.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Instead of adding manually confliting assemblies in the app.config file, I know it can be done automatically by Visual Studio by adding the property entry below in the vbproj project file:
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
as explained here.
Anyway, I would like to resolve those conflicts without binding redirects for all the conflicted assemblies in the app.config file. So Is that possible? If so, how?
Also I have some other questions in mind:
Binding redirects for conflicted assemblies in the app.config file
is a good practice?
Why those conflicts between assemblies happen? I do not understand it at all, so please could you explain me this?
What happens if I not resolve those conflicts and I ignore them (since solution is build successfully without errors)? Is it mandatory or highly recomended to resolve them for any kind of reason that I currently do not know?

EF6 Version error

I am using EF6 but got this error Assembly 'TBLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' which has a higher version than referenced assembly 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
You have to uninstall related packages and re-install them by using package manager console

When I am adding MvcSiteMapProvider.MVC4 System.Web.Mvc version difference error is coming

I am adding MvcSiteMapProvider in my sample site using Package Manager console like
PM> Install-Package MvcSiteMapProvider.MVC4
but after installation completion facing below Error.
i.e.
uses 'System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral
Error is like below :
Error 18 Assembly 'MvcApplication1121097jhgf7621jhg9999, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' c:\Offline\MvcApplication1121097jhgf7621jhg9999\MvcApplication1121097jhgf7621jhg9999\bin\MvcApplication1121097jhgf7621jhg9999.dll MvcApplication1121097jhgf7621jhg9999.Tests
I have changed all references form config files, which are referencing to version 4.0.0.0 to 4.0.0.1, but even after that above error is coming. Please help me.

Assembly Version Conflict .net 4

Does anyone know about resolving this error??
The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms**9.0.0.0**__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms**10.0.0.0**__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll'
I have referenced v10, when I check my GAC i found three versions of Microsoft.ReportViewer.WebForms. v9, v10, v11..! cant even able to remove older version of assembly from GAC.
I have resolved this with trail and error method. Assembly version was not updated in config file for some reasons. changed the version to 10 manually like this:
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
</httpHandlers>

A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe. Sharepoint 2010

I'm getting stuck with the above mentioned error. I have successfully deployed the webpart in 3 different ways, throgh stsadm, through Powershell (add-spsolution, install-spsolution) and via Central Administration.
The Webpart is .wsp which ran without any problems in Sharepoint 2007. I have changed the <safe control>entries in the web.config.
<SafeControl Assembly="TimeRecordingWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Namespace="TimeRecordingWP" TypeName="*" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="true" />
<SafeControl Assembly="TimeRecordingWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Namespace="TimeRecordingWP.Controls" TypeName="*" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="true" />
<SafeControl Assembly="TimeRecordingWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Namespace="TimeRecordingWP.Util" TypeName="*" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="true" />
<SafeControl Assembly="TimeRecordingWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Namespace="TimeRecordingWP.Dao" TypeName="*" Safe="True" AllowRemoteDesigner="True" SafeAgainstScript="true" />
I have changed the <trust>parameter to Full but no success. Neither the Preview in Webpartcatalog->all webparts nor the webpart will work showing the message named in the title of this post.
I'm pretty lost.
Thank's in advance..
I managed to fix the problem.
My case was:
Created new Visual Web Part with Visual Studio 2010
Copied some stuff from similar project
Renamed some properties to project-specific names
Got this error when tried to add the webpart to a page.
Thing that fixed my issue:
Changed Namespace value of SafeControl in SharePointProjectItem.spdata (hidden file) to match the actual namespace I was using
Hope this helps :)
Rene.
I gave some thoughts to the same matter few days ago. The problem was happened when I created not an empty project and rename some properties in it to more sensible.
Unfortunately, I couldn't find the reason of this problem. But I resolved it by creating an empty sharepoint project and adding the necessary items in it.