Hot to fix 'VerifyVersionsTask' error at compile Xamarin.Forms project - c#

After creating a project from scratch using Xamarin.Form and after updating all the libraries (nuget packages)
When compiling gives the following error:
Unexpected task error "VerifyVersionsTask"
Create new blank Xamarin project
Update to the latest nuget packages (all them)
Try to build the project but it failes with the following error:
Error The “VerifyVersionsTask” task failed unexpectedly.”
“System.TypeInitializationException: The type initializer for ‘Xamarin.Android.Support.BuildTasks.NugetPackages’ threw an exception.
—> System.ArgumentException: An item with the same key has already
been added.
Build should run without error.

Please see this tweet
Sorry folks we have delisted 28.0.0.2 for the time being. Please revert back to 28.0.0.1 until we can resolve and release an update
You probably installed the Xamarin.Android.Support.* libraries with version 28.0.0.2 which is flawed and retracted. Revert to 28.0.0.1 for now.
Also see the related issue on GitHub for this error message and the progress.

Related

Linq2db issue witth linqtodb.ttinclude

Hello I've have a project created with linqtodb with a database in MySQL and make an upgrade so I can work with the Windows 10, the problem grow and I've been forced to remove the linq2db and all dependencies and now when I've reinstalled and try to run the connection with the database the system give me this error:
Severity Code Description Project File Line Suppression State Error Compiling transformation: Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type ~\..\contentFiles\any\any\LinqToDB.Templates\LinqToDB.ttinclude 1012
UPDATE
I've made a clean of cache give me an error updating the entityframework aparently there's no way to installed because of this:
Error Could not install package 'MySql.Data 8.0.16'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. 0
Any help thanks in advance.
Taking into account that those templates work for everyone, I will suspect that somemething lead to corruption of templates in nuget cache from where they referenced. I would first recommend to clear nuget cache (check this link How to clear NuGet package cache using command line?) and reinstall linq2db packages. If issue still persist - it will be better if you will fill issue with environment/versions details.

Nuget and "Unable to load the service index" [duplicate]

This question already has answers here:
Nuget connection attempt failed "Unable to load the service index for source"
(55 answers)
Closed 5 years ago.
I'm having a trouble with Monodevelop. I'm using LinuxMint Serena (18.1) and Monodevelop 7.0.1 (build 24). When trying to add nuget package on a new project, I get the next answer:
[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json. An error occurred while sending the request
Error: SecureChannelFailure (Object reference not set an instance of an object) Object reference not set to an instance of an object
I check the api nuget address and is normal, nothing strange about the link. I tried to copy the old package from the original Visual Studio project but remain the problem.
Thanks in advance.
EDIT:
After trying many things with no success, I use the old nuget packages downloaded from the old Visual Studio project. I don't know if making that works or the fact that I take the project and open it up with Monodevelop for Windows fixed the issue.
I have the same question in ubuntu(16.04) Monodevelop(7.0.1). I can access to http://api.nuget.org/v3/index.json in my browser, but when I add nuget package in monodevelop, it throw the exception, " Unable to load the service index for source https://api.nuget.org/v3/index.json".
I solve this problem by checking the updater, check and install all software updates.
You can try it. Good luck!

Build Error in Mono Develop

I tried to build my existing Mvc application with Mono by changing targeting framework to Mono/.Net 4.5 in Mono Develop.
That gives me build error
Build failed. Item has already been added. Key in dictionary: 'Path' Key being added: 'PATH'
Build: 1 error, 0 warnings
I tried to make new project that also gave the same error.
I also tried to updating nuget package but that also did not works.
This question is somewhat out of date, but I thought I'd include an answer to give folks a thread to follow.
I found several VS 2015 templates had elements in the projects that would cause this type of issue in sub-build files for mono. For example, references related to Rosyln or Microsoft.CodeDom.Providers.DotNetCompilerPlatform. My particular project didn't need the latter, and I removed the related references to resolve the issue. The full error was
Error building target IncludeRoslynCompilerFilesToItemGroup:
Item has already been added. Key in dictionary: 'Link' Key being added: 'Link'
I figured out that this was related to my Microsoft.CodeDom.Providers.DotNetCompilerPlatform by greping for the target, e.g.
grep IncludeRoslynCompilerFilesToItemGroup * -R
to find the offending package and figuring out if I could remove the code reference.

CS0012 Error when building the getting started Xamarin Android app

I am following along with the getting started tutorial:
https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-xamarin-android-get-started-preview/
I can successfully work the steps up through "Publish your server project to Azure". However, when I download, open and build the Xamarin.Android app I have issues. Specifically, the output window says the build was successful, but the error window indicates that there are 14 errors, all of which are CS0012.
I understand that the "System.Runtime" assembly isn't being referenced, but no solutions I have been able to identify on MSDN or on StackExchange seem to correct the issue.
Any help would be appreciated!
I was able to solve this issue, plus a number of others (related to missing references) by adding the references using the "server" portion of the getting started demo. I also had to update all of the nugget packages as the references I added were in conflict with some of the existing references in the project.

VS2010 compiles solution without errors, msbuild fails: "fatal error CS0002: Unable to load message string from resources"

I'm having a lot of trouble trying to track down the cause of this error message. I have a large Visual Studio 2010 solution which compiles without error on my local machine but on the build server, msbuild fails on one of the projects with the error:
fatal error CS0002: Unable to load message string from resources
Here's the red error section at the end:
Build FAILED.
"C:\TeamCity\buildAgent\work\85eff164854b9e67\Libraries\Domainface.Proxy.Common\Domainface.Proxy.Common.csproj" (default target) (9) ->
(CoreCompile target) ->
CSC : fatal error CS0002: Unable to load message string from resources. [C:\TeamCity\buildAgent\work\85eff164854b9e67\Libraries\Domainface.Proxy.Common\Domainface.Proxy.Common.csproj]
0 Warning(s)
1 Error(s)
The entire msbuild output from the build server is here: http://pastie.org/3660842
What does the error generally refer to, that would cause it to build locally but not on the build server?
UPDATE
I have just run msbuild /version on both machines and it turns out the .net framework versions are very slightly different. Local machine is 4.0.30319.488 and build server is 4.0.30319.1. I'm about to run windows update on the server to allow it to install some updates, as several seem to be .net framework-related, so I'll see if that makes a difference.
UPDATE
Installing the updates didn't help. Just remembered I copied up csc.exe from the async preview a little while ago in order to facilitate async compilation (the actual async preview had failed to install on the server due to visual studio not being there, but installing visual studio team viewer seems to have fixed that, so i've just run the proper async ctp3 installer to see if that makes a difference.
CS0002 is not documented. Interpreting the error message, I'd say that the compiler is trying to show you a compile error message but fails when it tries to retrieve the message text. Slightly odd is that it doesn't actually have a string table in its resources, not sure where it comes from.
Well, something is pretty borken. Your idea to update the .NET framework version is solid, that will update csc.exe as well. Ought to be good enough to fix any damage.
This is often a problem with the Entity Framework designer's handling of your connection strings. In your app.config file, make sure the assembly and resource names are what they're supposed to be.
Here's the format for that particular part of the connection string:
Metadata= res://<assemblyFullName>/<resourceName>
Ok based on my own experience of trying to solve the problem, as well as Hans's answer and a few other discussions I dug up while Googling, I'm guessing that the only way to make this error occur is to have an issue with current state of one's .Net framework installation. Essentially, a mismatch between the compiler and some other resource it uses means when the compiler hits an error, it tries to pull the error message from the referenced resource, but because the resource doesn't match the compiler build, the error message is unavailable and instead the compiler reports that it can't load the message (and thus can't effectively display the correct error message).
Hence the fix is to repair the .Net framework installation, which can be done by reinstalling it, running a repair on it, or installing a newer version (which in my case was the async ctp, which while not a full .net framework version upgrade, was enough to correct any mismatched resource references used by the compiler).

Categories

Resources