Devexpress Project Converter v17.2 converting from v12 have error? - devexpress

When I use project converter v17 of Devexpress to convert my project and build again, I see this error:
Error 3 The type 'DevExpress.XtraEditors.XtraForm' is defined in an assembly that is
not referenced. You must add a reference to assembly 'DevExpress.Utils.v12.1, Version=12.1.4.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a'.
I spend hours to solve this, please help me, thanks!

For some reason, your project still refers to version 12.1. Probably, your main project refers to some other project/library that utilizes version 12.1. Such projects should be upgraded as well. Try running the Project Converter again and ensure that you included all referenced projects.
If this doesn't help, you can manually delete incorrect references and add required assemblies to your projects.

Related

UWP - Cannot resolve Assembly or Windows Metadata file

Everything was rolling along smoothly until a few days ago when UWP all of a sudden stopped building after pulling a new version from VSTS (git) with the errors:
Cannot resolve Assembly or Windows Metadata file 'Type universe cannot resolve assembly: X.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.'
Could not copy the file "obj\x86\Debug\MainPage.xbf" because it was not found.
Could not copy the file "obj\x86\Debug\App.xbf" because it was not found.
Could not copy the file "obj\x86\Debug\X.Mobile.UWP.xr.xml" because it was not found.
I have a solution structure of the following:
X.Core (.NET Standard class library)
X.Mobile (.NET Standard PCL)
X.Mobile.UWP (UWP specific project)
UWP references Mobile, and Mobile references Core (Core is also referenced by a web API project).
The commit that I pulled from source control did not have any changes to the X.Mobile.UWP .csproj file.
Things I have tried:
The obligatory clean and rebuild.
Delete all obj and bin folders for the entire solution.
Remove and re-add all references in the .UWP project.
Upgrade Xamarin.Forms to the latest stable (3.1.0.637273).
Remove and re-add X.Core reference in the X.Mobile project.
Delete C:\Users\%username%.nuget folder.
Update Microsoft.NETCore.UniversalWindowsPlatform to the latest stable (6.1.5).
Change the target version to all available versions - we've been running on build 16299 for several months.
And I've been beating my head against this problem on and off for days now. Android and iOS projects build just fine, which is ironic considering UWP has been our most stable platform. Anyone have any insight?
EDIT:
After adding a reference to X.Core directly to the X.Mobile.UWP project, I can compile. This shouldn't be the answer though since UWP never directly references Core.
I found the solution.
I had the very same problem because I had added a new (.Net Standard 2.0 Class Library) project into my Xamarin.Forms solution.
In short, initially my solution included the following projects:
BackgroundTaskTest (which have all my Views and ViewModels)
BackgroundTaskTest.Android
BackgroundTaskTest.iOS
BackgroundTaskTest.UWP
Suddenly I decided to add a class library named "BackgroundTaskTest.Common" in the same solution folder:
BackgroundTaskTest.Common (new one)
BackgroundTaskTest (which have all my Views and ViewModels)
BackgroundTaskTest.Android
BackgroundTaskTest.iOS
BackgroundTaskTest.UWP
The Android was working fine with it but the UWP project didn't like that new neighbor (which in your case is named "X.Core"). So I moved my classes from that new project to the "BackgroundTaskTest" again and deleted "BackgroundTaskTest.Common" from my solution with all the references and it has started working.
To finalize and make it short, please compare your X.Mobile.csproj file with X.Mobile.Core.csproj file. you will find the issue in the differences. Plus try to check all your dependencies to the X.Core project to make sure they are the same.
I installed NuGet package "NETStandard.Library" and added a reference to all my .Net Standard libraries to my UWP project. This solved the problem for me!

Referencing class library in ASP.NET 5 - dependency issues

My custom class library (targeting .NET 4.5.1) references Newtonsoft.Json 8.0.2 (the latest version to date). I've added this class library as a reference to a new ASP.NET 5 Web API project.
From the Error List output:
Error NU1002 The dependency Newtonsoft.Json 1.0.0 in project MyProject does not support framework DNXCore,Version=v5.0.
That part seems somewhat self-explanatory, however, I couldn't understand why it was changing my referenced version to 1.0.0.
From the References --> DNX 4.5.1 --> MyClassLibrary Node:
NU1007 Dependency specified was Newtonsoft.Json >= 8.0.2 but ended up with Newtonsoft.Json 1.0.0.
I've tried removing/re-adding the references several times, all to no avail. I did notice that several of the ASP.NET libraries use Newtonsoft.Json 6.0.6 -- I'm not sure if this has anything to do with it.
If I navigate to the wrap folder --> Newtonsoft.Json --> json file, and replace "Newtonsoft.Json 1.0.0-*" with "Newtonsoft.Json 8.0.2-*", it fixes the references for the DNX 4.5.1 node.
However, errors still show afterwards saying that Newtonsoft.Json 8.0.2 referenced in my class library does not support DNXCore 50.
I'm at a loss as to what to do. Any help would be greatly appreciated.
Answer to my issue:
Thanks to Oleg's response I was able to make it work -- however there were two hurdles. One was the "wrap" folder that was created for Newtonsoft.Json. In the root of my solution was a "wrap" folder that contained a folder called Newtonsoft.Json. Apparently(?) that folder shouldn't have been created (how it was created I have no idea). Once removing that, I was able to add a reference to my custom class library without any errors referencing Newtonsoft.Json.
However when I began trying to use my custom assembly as in code, I would get an error about DNX50 not being supported -- which sort've makes sense because my custom referenced assembly was a .NET 4.5.1 class library.
This GitHub link has many people experiencing a similar issue
However, I managed to get everything to build and errors to go away by removing targeting for DNXCore50. This worked for me because I was just wanting to share some POCO data models between a Web API and WPF project. I'm not interested in targeting DNXCore at the moment.
I'm looking forward to the future of ASP.NET, but the newness is a bit challenging, at least for me.

find out what references dll

I just solved the following error:
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
Strange thing - it only seemed to be a problem when I made a release build although was a little intermittent - I could create a debug build and the issue could sometimes temporarily go away.
Turned out that I had an enterprise library dll in the project Microsoft.Practices.EnterpriseLibrary.Data.dll that wasn't being used, was version 5.0.505.0, and looks like it was trying to pull in v. 5.0.505.0 of Microsoft.Practices.EnterpriseLibrary.Common, when v. 5.0.414.0 of this 'Common' dll was already in the project. Didn't pin down why this was mainly happening in release mode.
Something that would've helped to track this down and clearly identify the cause would have been to find out for certain which dll is pulling another dll into my Visual Studio project? I want to be able to go from the dll that's causing the problem, and see what dll is including it. This answer:
Find out why Visual Studio decides to copy DLLs into a bin directory
says that ildasm or reflector can be used, but what do you need to look for using these tools and how? I've Googled this but didn't see anything.
As a side note, any ideas on why switching to release mode would cause my issue? I've wondered if doing this caused Visual Studio to attempt to pull a release version of Microsoft.Practices.EnterpriseLibrary.Common from somewhere and it's the wrong version, but this makes no sense to me as this is a '3rd party' (Microsoft) library that is already in release mode, it doesn't explain the intermittency, and I don't see why switching an individual project to release mode would affect a reference to an external library.

Telerik.web.ui Is Missing

I am Telerik controls in my project, Error is telerik.web.ui is not found, Coudn't find assembly
I have added Telerik.web.ui.dll inside Bin directory
Reference Code is available inside web.config
If you are running on a 64 bit comp then you will need to add the 64 bit version of Telerik.web.ui.dll that is properly the problem
Download Telerik DLLs and install them using NuGet Package installer . This will solve your problem and you may need not to worry about manually adding each and every DLL which are needed for your project

ASP.NET MVC 2 System.Web.Mvc.dll conflict

I have installed the ASP.NET MVC 2 RC and opened the default "example project", but get the following error:
Parser Error Message: The type
'System.Web.Mvc.ViewMasterPage' is
ambiguous: it could come from assembly
'C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mvc\2.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll' or from assembly 'C:\Documents and
Settings\sfent\My Documents\Visual
Studio
2008\Projects\MvcApplication1\MvcApplication1\bin\System.Web.Mvc.DLL'.
Please specify the assembly explicitly
in the type name.
This appears to be a conflict between the GAC dll and the dll created and placed in the bin directory (which I thought was supposed to be used in preference to the GAC version)
I have Googled this issue and have found similar problems, but relating to incorrect namespacing. This is the un-altered example application that comes bundled with the MVC framework.
I have also tried removing the framework entirely and re-installing the RC, but to no avail.
All suggestions appreciated.
I got this error, and in my case it was resolved quite easily.
I had made a new Master Page in my Views folder, but unnoticed by me, it came with code behind and designer, which of course you don't want with MVC2. It all built, but gave me that "Parser Error Message: The type 'System.Web.Mvc.ViewMasterPage' is ambiguous:..." error when I ran it.
To fix it, I removed the code-behind and designer files for my new Master page, and the error went away.
the problem might be that the Reference in your Project is still pointing to the old Version of the dll (v1.0). Delete the reference and add a new one to version (v2.0).
You find that hint as well in the release notes of MVC2 RC:
"Open the project using Visual Studio, and in Solution Explorer, expand the References node. Delete the reference to System.Web.Mvc (which points to the versionĀ 1.0 assembly). Add a reference to System.Web.Mvc (v2.0.0.0)."
Cheers,
Damrod
Does your project reference both v1 and v2 of the framework? Also, why not delete the matching dll that's been copied locally?

Resources