Adding "Uno.Cupertino" or "Uno.Material" to an Uno-Platform project make the project not compile. Even a blank project - uno-platform

After adding "Uno.Cupertino" or "Uno.Material" to any Uno-Platform project even a newly created blank project, the project no longer builds and throws tons of build errors.
Here are some of the common errors:
Error CS0433 The type 'SuspendingEventArgs' exists in both 'Microsoft.Windows.SDK.NET, Version=10.0.19041.24, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'Uno, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'
Error UXAML0001 Unable to find type Windows.UI.Xaml.ElementStub (net6.0-android)
I tried to solve the dependency errors by uninstalling or updating some of the packages to latest version but it makes no difference and it does not compile.

Related

Building Core2.0 project in Visual Studio Team Services fails with numerous assembly import errors

I have Build Definition
.NET Core Restore
.Net Core Build
.Net Core Test
.Net Core Publish
Publish Artefact
While I was using Core1.1 it worked without any issue. But after upgrading project to Core2.0 it fails with multiple errors like
error CS1703: Multiple assemblies with equivalent identity have been imported: 'C:\Users\buildguest\.nuget\packages\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Threading.Tasks.Parallel.dll' and 'C:\Users\buildguest\.nuget\packages\system.threading.tasks.parallel\4.3.0\ref\netstandard1.1\System.Threading.Tasks.Parallel.dll'
error CS0433: The type 'TargetFrameworkAttribute' exists in both 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
error CS0518: Predefined type 'System.String' is not defined or imported
Solution is perfectly building locally. I tried to add task Use .NET Core runtime 2.0.0 in the beginning but without any success.
You should add .NET Core Tool Installer task at the beginning of the build steps. Then install the SDK not only runtime. Then save your build definition and queue again.

Running Dotnet EF migrations add ... generates FileNotFoundException when run

Error generated is as follows.
System.IO.FileNotFoundException: Could not load file or assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The system cannot find the file specified.
File name: 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'
at Microsoft.DotNet.ProjectModel.ProjectReader.ReadProject(Stream stream, String projectName, String projectPath, ProjectReaderSettings settings)
at Microsoft.DotNet.ProjectModel.ProjectReader.GetProject(String projectPath, ProjectReaderSettings settings)
at Microsoft.EntityFrameworkCore.Tools.DispatchCommand.<>c__DisplayClass2_0.<Create>b__0()
at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args)
Could not load file or assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The system cannot find the file specified.
This error occurs for any DOTNET EF command (even --help)
we have multiple machines that this does work on but 2 of the machines are seeing the above error, and it is very frustrating?
I have even tried to install just the ProjectModel component from Github with no success
Any help appreciated on how to get over this issue
I had this problem (along with other similar errors running other dotnet commands. For me it was due to having older RC1 and SDK installations. I removed everything from add/remove programs, along with removing the dotnet and DNX directories in c:\program files. Then I reinstalled and it started working.
I tried the suggested of uninstalling and deleting all of the DNX and DOTNET directories to no avail.
Then i did some more searching and found the answer. I had to change my Tools - entityframework configuration to the following
"Microsoft.EntityFrameworkCore.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net451+win8"
},
Then I had to clear the caches for the Entity Framework as per this article link
https://github.com/aspnet/EntityFramework/issues/5458#issuecomment-221912806
Then I needed to remove the Reference for Microsoft.EntityFrameworkCore.SqlServer from the project and let VS fix up the reference itself by reloading
After this a Build sorted out the issue and i could again run dotnet ef commands

RandomSiteControls, Version=7.1.5200.1, uses Telerik.Sitefinity which has a higher version than referenced assembly Telerik.Sitefinity

I m getting following error while trying to add RandomSiteControls to my project.How to fix below error?
" CS1705: Assembly 'RandomSiteControls, Version=7.1.5200.1, Culture=neutral, PublicKeyToken=null' uses 'Telerik.Sitefinity, Version=7.1.5202.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' which has a higher version than referenced assembly 'Telerik.Sitefinity, Version=7.1.5200.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' "
I am using sitefinity version 7.1.5200.0
To get rid of the errors, you can either add some assembly bindings to your web.config or download a different version of the RamdonSiteControls that was built against those particular Sitefinity dlls.
You can find the version for 7.1.5200 here.

Error on server - FIle or assembly load issue

I am getting the following error on server-
Could not load file or assembly 'Microsoft.Moles.Framework, Version=0.94.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
The strange thing is it is not consistent. On deploying the bin again the error disappears and reappears randomly again.
The other random error which occurs in similar way:
The requested script resource 'Common.Common.js' requires version 'AjaxControlToolKit, version=4.1.40412.0 culture=neutral, PublicKeyToken=28f01b0e84b6d53e' of the ASP.NET AJAX Framework. To use this resource, make sure that the softwarereferences version
'AjaxControlToolKit, version=4.1.40412.0 culture=neutral, PublicKeyToken=28f01b0e84b6d53e'
Although I do not have any JSS with this name or used in the application.

"Could not load file or assembly" error when installing Google.api.customsearch.v1 client library

I am trying to install Google.api.customsearch.v1 client library from Nuget but I get this error when I try to run my asp.net website.
Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0,
Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its
dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)
I have discovered stackoverflow for such issue, but non of them resolved my problem. any suggestion?
Ok, I fixed the problem by updating Newtonsoft.Json package. Run the following command in the Package Manager Console
Update-Package Newtonsoft.Json

Resources