Unable to build a cross platform apps on Xamarin.forms? - build

I'm following a tutorial to create a cross-platform app using xamarin.forms
except that I'm using Windows 7 and hence I skipped those steps for UWP part.
Now when I trying to build the solution, I'm getting the below error message
1> No way to resolve conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
Based on findings on the net it seems that something to do with versioning messed up however this should not happen as it's a new solution from scratch.
I've also checked the properties that stated as below:
- "Compile using android version (Android 7.1(Nougat))"
- Android Manifest "Target Android version" Use compile using SDK version
Well to be exact, the build was successful but with error logging as output. Please refer to below image
May I know what else I can try?

You can fix this by issuing an update-package -reinstall command in the Package Manager Console.

Make sure that your Xamarin (Visual Studio) installation version is the same as the Xamarin NuGet packages your using.
I recommend to:
Update Xamarin and your Xamarin NuGet packages to the latest versions.
Clean (in build menu)
Rebuild (in build menu)
Try again, if it does not work, continue steps:
Update all your Android related installations (using the SDK manager)
Check the paths for JDK, SDK and NDK in Visual Studio => Options => Xamarin
Try again
It could also be, that you are using a third-party NuGet package that is not compatible with your installed versions. Try removing NuGet packages to isolate the problem.
Unfortunately, there could be many things wrong here, but mostly it is related to versions and installations. Hope this helps.

It looks like you're trying to deploy to a device that does not meet the target requirements.
Verify that the version of the device or emulator you're working on is at least what is shown in your Android Build Options.
To troubleshoot any issues, I'd recommend opening the Android SDK Manager and downloading the Build and SDK tools that match the device you're planning to test on, and rebuild your project targeting the new SDK.

Related

Error trying to install latest nuget pkg Aspose.Cells

Trying to install the latest Aspose.Cells package in VS 2019. Had a buddy try the same thing, same error. Have a license. What am I missing?
Severity Code Description Project File Line Suppression State
Error The feed 'nuget.org [https://api.nuget.org/v3/index.json]' lists package 'Aspose.Cells.22.3.0' but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again.
Unable to find package 'Aspose.Cells.22.3.0'.
I tested your scenario/case. I created a new console application in VS.NET 2019. Then, I clicked on Tools|Nuget Package Manager|Manage Nuget Packages… option. Now I searched Aspose.Cells (v22.3.0) after clicking Browse link. I then installed the latest version and it works fine. I do not get any error during the import process as well.
The issue might be due to NuGet Package Manager configuration on your end. You may clear NuGet cache and give it a try in your VS.NET again.
PS. I am working as Support developer/ Evangelist at Aspose.

Package restore failed. Rolling back package changes for 'ConsoleApp1' while installing new package

I get Package restore failed. Rolling back package changes for 'ConsoleApp1' while installing a new package. In particular I am trying to install the dropbox API, but I tried several other packages and get the same result.
I install by right clicking on the project and choosing Manage nuGet Packages... Then I select the package and click Install.
The NuGet is able to connect with the NuGet server as the package seems to download. The download information flashes on the screen pretty quick so I captured it with screen recording software to see if there were error messages. There were none.
I updated visual studio 2017 to latest patch level. My windows 10 machine is also at the latest level.
The project I am trying to install into is a freshly created Console App(.Net Core).
Here are the other questions I looked at:
Package restore failed. Rolling back package changes
does not have any responses because it is not a well developed question.
package restore failed rolling back package change for ' myproject' in vs 2017 .net mvc core project
Yet another poorly worded question with no viable answers.
Package restore failed. Rolling back package changes for 'myproject' in vs 2017 in MVC Core
That one is trying to update packages, not install new.
Nuget - Package restore failed. Rolling back package changes for 'WebApplication1'. 0
Seems to be for a custom package.
I am new to using Visual Studio.
To expand on #Michael Potter's answer, create a Console App (.NET Framework), NOT Console App (.NET Core).
The problem was that I am using Console App(.Net Core) Core is not compatible with Dropbox API.
I figured that out by opening NuGet Package Manager -> Package Manager Console and running Install-Package Dropbox-Api.
Then the error message about compatibility was on the screen plain to see.
To solve the problem I am switching to Console App (.Net Framework).
bring the version of the solution package to 1.1.3enter image description here

Team Foundation Server Deployment error

I have setup my own Team Foundation Build server and I am using Visual Studio Online to host my project online. I have a django project which I am trying to deploy on windows azure cloud service. The project can be published from my dev machine without any errors however when the build server tries to build it, it gives the following error during uploading the package:
Exception Message: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (type FileNotFoundException)
I checked in .pyproj and found a reference to Microsoft.WindowsAzure.Storage but there the version is 2.1.0.0 and that is the version that is installed on the server as well.
Also there are no errors during the build process but only during the deployment stage. How do I make Msbuild use Storage version 2.1.0.0 instead of 2.0.0.0 . Also, which SDK version contains Storage version 2.0.0.0
I just had this problem. This is the same problem as TFS Build Controller : "Could not load file or assembly 'Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0".
You'll need to copy Microsoft.WindowsAzure.Storage.dll version 2.0.0.0 to "C:\Program Files\Microsoft Team Foundation Server 12.0\Tools", and then restart the Visual Studio Team Foundation Build Service Host 2013 service.

Has VS 2010 SP1 changed where the .config file is picked up from in VSTO add ins?

I have an outlook 2010 add-in that has a service reference to a simple web service we have set up.
The config for the service is in the app.config file.
This add-in is deployed using windows installer into the program files folder.
This has been working without a problem until yesterday.
Yesterday I installed VS 2010 SP1 and now when the add-in tries to access the web service it has the error "Could not find default endpoint element that references contract in the ServiceModel client configuration section."
Does anyone know what has changed and what is causing this problem?
If I open the project in VS, build and then run from within VS the config is picked up fine.
Thanks
Gavin
The actual solution is more simple. There was a breaking change made to VSTO 4 sp1 in that the manifest has to be a fully qualified URI. So when building your setup project, you must prefix the path to the manifest with file:/// and everything works as you'd expect again. They didn't get the documentation and tutorial pages updated in time for the release. I'm not sure that they have been yet.
Perhaps you're hitting a problem with extensionless services after installing SP1? http://support.microsoft.com/kb/2468871 - Issue 16?
I had this exact same problem. After installing Visual Studio sp1 (which installs VSTO 4 sp1), my Outlook addin could no longer find its config file for service endpoints. The only solution I've found so far is to run the VSTO setup (the new one) and choose uninstall, then run the old version that was previously installed and rebuild the setup package. If the new version is installed on the client machine, that machine will have this issue. Your setup may not detect it because typically you specify a minimum version for it to look for. I haven't found any other info about others having this problem besides yourself or anything official from MS about the problem.

vs 2008 deployment project not working

I have a C++ console application that I want to deploy using a vs2008 setup project. When I create the setup project and add the output from my console app, the setup project detects that it needs MSVCP90.dll and MSVCR90.dll. When I build the project, those two dlls are included in the .msi file as expected.
When I download and launch the installer, everything goes as expected and the console app and the dlls are unpacked into the proper directory on the local machine.
When I try and run the app, I get the following error:
Error 1721. There is a problem with
this Windows Installer package. A
program required for this install to
complete could not be run. Contact
your support personnel or package
vendor.
I've tried compiling the app with /MT and /MD neither one works.
When I run a dependency walker against the app, it reports that it needs MSVCP90.dll and MSVCR90.dll as expected.
Finally, if I set the installer to require the Visual C++ runtime libraries, it downloads them and everything works fine.
Obviously, I would like to avoid downloading the CRT libraries.
Thanks for any help,
Jon
Check out this example on how to add the appropriate merge modules and deploy them to your target machine along with your setup.