TKCustomMap Version Conflict - google-maps

This issue has been reported on GitHub here -
https://github.com/TorbenK/TK.CustomMap/issues/325
Has anyone else has struggled with this? I was stoked to find this nuget package because it does exactly what I'm looking for but it needs Places and some other GooglePlayServices installed and I can't install them because of this conflict.
I'm also not sure if uninstalling TK.CustomMap and then installing the Play Services would even help because the person who reported the issue on GitHub said-
I converted my app to .net 2.0 and had to use the newest Google play services
60.1142.1 for AdMob to work. It wouldn't install until I uninstalled TK.CustomMap, and now TK.CustomMap won't reinstall because it only want to use GooglePlayServices 42.1021.1
Severity Code Description Project File Line Suppression State
Error NU1107 Version conflict detected for Xamarin.GooglePlayServices.Tasks. Reference the package directly from the project to resolve this issue.
HunterTracker.Android -> Xamarin.GooglePlayServices.Base 60.1142.1 -> Xamarin.GooglePlayServices.Tasks (= 60.1142.1)
HunterTracker.Android -> HunterTracker -> TK.CustomMap 2.0.1 -> Xamarin.GooglePlayServices.Location 42.1021.1 -> Xamarin.GooglePlayServices.Tasks (= 42.1021.1).
That's pretty much the exact error I'm getting trying to install the other packages. There's no resolution on github.
Anybody found a work around? Or does anyone know how to "Reference the package directly from the project"?

Thanks to SushiHangover's comments above pointing me in the right direction I was able to discover what I needed to do here. I had an error updating the nuget packages of TK.CustomMap at first because v26 Xamarin.Android.Support.Vector.Drawable was targeting MonoAndroid8.0 and the update to v27 must target MonoAndroid8.1 So it took quite a bit just to be able to update the nuget packages in order to get the assemblies with later versions so I could use TK.CustomMap in my solution. But I was eventually able to get there. Here were the steps I followed (as best I can remember). I am unable to compile ios right now because I don't have a MAC so that fix will have to come later. This fix is for the shared project and Android project only
Download the TK.CustomMap-master from github
Extract it and delete the Sample project completely (I also deleted the UWP project as I'm not really interested in that at this time)
Opened and built then closed. Deleted packages folder, vs folder, bin and obj from Android and Shared Project (this step is probably not necessary but I did it so...)
In the packages.config in Android changed all targets from monoandroid80 to monoandroid81 save file
In the TK.CustomMap.Android.csproj for every v26.0.1 of any Xamarin.Android.Support or other Xamarin.Android util package changed 26.0.1\lib\MonoAndroid80 to 27.0.2.1\lib\MonoAndroid81 - save file
In the nuget folder in TK.CustomMap.nuspec changed the target framework in this section
<group targetFramework="lib\MonoAndroid7.0">
<dependency id="Xamarin.GooglePlayServices.Location" version="42.1021.1" />
<dependency id="Xamarin.GooglePlayServices.Places" version="42.1021.1" />
<dependency id="Xamarin.Android.Maps.Utils" version="0.5.0" />
<dependency id="Xamarin.Forms" version="2.5.0.91635" />
<dependency id="Newtonsoft.Json" version="10.0.3" />
</group>
to
<group targetFramework="lib\MonoAndroid">
so it could target any version
Opened and updated all nuget packages using package manager (not console). Built debug and release builds
At this point opened solution I had tried to implement TK.CustomMap in previously to attempt the fix. Remember the original issues was that the latest frameworks could not be used and 42.1021.1 frameworks were unable to locate com.google.gms.location and com.google.gms.places.ui files so they had to be updated or no TK.CustomMap
In the problem solution uninstalled TK.CustomMap from all projects
In the problem solution Android project added reference to all the dlls in the release folder of the Android bin file from TK.CustomMap project.
Installed updates for all Xamarin.Android frameworks in problem solution through Package Manager (not console)
Installed updates of all other nuget packages for all projects using Package Manager (not console)
Installed TK.CustomMap to Shared project using Package Manager (not console)
Added the References to the android project a second time. May or may not have helped.
Installed TK.CustomMap Nuget Package using Package Manager (not console)
Built and ran on Live Player successfully!!
Thanks to Sushi Hangover for the advice. I haven't seen any comprehensive tutorials anywhere on how to accomplish this so I figured I would post my own answer in case anyone else was looking. Definitely if you are new to VS all this stuff is no walk in the park in the beginning.

Thanks to #Travis Fleenor. This is my solution. I change a bit your sequence in order to work on mine.
1. Make sure the original proyect from github (https://github.com/TorbenK/TK.CustomMap) works and you can run it.
2. Update the nugets where you get the conflict. In my case I got conflicted in googleplay library version. I updated it in the original proyect and then assure it could run it.
3. Compile entire solution in release mode. Then, copied the generated dll from bin/release and pasted them in a folder in my desktop.
4. I referenced those dll to shared proyect and android proyect. I only used nuget package manager to install some missing packages needed for the tk.custom. Notice that you only will reference some dll that the proyect accept. For the mayority Visual will prompt ' dll already referenced' something.
5. first reference your shared proyect, later your android one. That's all. make sure the you ca recompile solution.
Hope this helps

Related

The target "ResolveTagHelperRazorGenerateInputs" does not exist in the project

I am getting the following error when i try to build an AspNetCore Web Application targeting netcoreapp2.2.
Error MSB4057 The target "ResolveTagHelperRazorGenerateInputs" does not exist in the project. C:\Program Files\dotnet\sdk\2.2.103\Sdks\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets
I have tried the following:
clear cache on vs according to this post
update vs2017 to 15.9.5
reinstall net core sdks
reinstall vs
Nothing helped. I first got the error during an upgrade from core 2.1 to core 2.2 on a different project, and it's possible that by mistake edited the
Sdk.Razor.CurrentVersion.targets file. From that moment on, i keep getting this error on any project that targets core 2.2 (even new ones).
Does anyone encountered this problem or have any clues about solving it?
Thanks
After long battles it figured out to be a problem with VS NuGet Package Manager.
All I had to do was:
VS > Tools > Options > NuGet Package Manager > Clear All NuGet Cache(s).
The Following Link was my solution. I also struggled to get this fixed.
Just copy the files from the NetStandard2.0 folder from GitHub then replace it with you Directory from the same location.
Hopefully this helps someone.!
Here is the Answered Link:
https://social.msdn.microsoft.com/Forums/en-US/cafc9823-eb61-46f7-8489-007242ef2ad2/target-quotresolvetaghelperrazorgenerateinputsquot-does-not-exist-in-the-project?forum=msbuild
Here is the GitHub Link
https://github.com/aspnet/Razor/tree/master/src/Microsoft.NET.Sdk.Razor/build/netstandard2.0
I encountered the same issue during the Azure build pipeline process, and clearing the NuGet package cache resolved the issue.
Solution:
I used a dotnet tasks with "custom" to issue the following command before NuGet package restore task:
command:
dotnet nuget locals global-packages -c
Screenshot shows the build pipeline task
For me the solution was as follows:
In Visual Studio
Right click on each project and click "Unload Project"
Right click on each project and click "Reload Project"

Installing packages with nuget on command line on MacOS?

I'm trying F# on OS X and I'm having trouble installing packages. My problem is to use MySQL.
I have downloaded Nuget and I can launch it. However, I didn't find any useful documentation about how to use it on the command line.
I managed to install MySQL.Data by doing
mono nuget.exe install MySql.Data
which downloaded it to my current repository. Is that normal? I was expecting it to be "installed" in a more central directory.
Moreover, when I try to require it, r "MySql.Data it doesn't work. It works if I set the include path properly by doing:
fsharpi --lib:MySql.Data.6.8.3/lib/net45
But that seems super heavy. Is there a way to add all the installed nuget in the path automatically?
Short answer: No.
Long answer: Yes, but it won't be what you hoped for.
It is possible to get NuGet to put installed library some specific place. On Mac OS, add the following to the end of ~/.config/NuGet/NuGet.Config
<configuration>
<config>
<add key="repositoryPath" value="/path/to/where/you/want/it/to/go" />
</config>
</configuration>
However, (a) NuGet still puts DLLs in different directories, so there is still no single place for fsharpi to find them. (b) Anyway fsharpi doesn't honor $MONO_PATH, Mono's canonical way to add to the DLL search path.
The closest I've come to a workable solution for fsharpi is:
Whenever you nuget a package, manually add it to MONO_PATH (say, in ~/.profile). E.g., supposing you told nuget to put stuff in /opt/nuget you would add:
export MONO_PATH=$MONO_PATH:/opt/nuget/MySql.Data.6.8.3/lib/net45
Whenever you run fsharpi, explicitly feed it $MONO_PATH:
fsharpi -I:$MONO_PATH
If you feel adventurous you could then patch the fsharpi script to automatically include $MONO_PATH.
I find that this is not worth the effort. Simply constructing a script that starts fsharpi with the options you need for whatever you're currently working on is a much more practical solution.
I'm an F# programmer on a Mac. My life is like an illicit love affair with someone married: I endure all the little slights because my heart leaves me no choice.
The most common use I see is
mono nuget.exe install mysql.data -OutputDirectory packages -ExcludeVersion
Which would install in your project's directory (generally you ignore the packages directory in your repository however and just restore it with a script) and you'd then find it at packages/MySql.Data/lib/net45
Downloading nuget to your repository is also common.
You can always write your own script to do the the fsharpi hookups you want, nuget has a lot of convention, so it's possible to pick the right dll from lib/*/ for your purposes
And it's possible to do it with an fsharp script, here's an fsx script that can be executed directly, it downloads nuget, installs from nuget, and then executes another script (with fake not fsharpi, but that's totally possible.

Compiling sqlite-winrt for using SQL in WinRT/WP app with SQLite

I'm trying to use the sqlite-winrt library at https://sqlwinrt.codeplex.com (cf. http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/05/30/sqlite-winrt-wrapper-for-windows-phone.aspx) because I need to access an SQLite database via SQL commands in a WinRT 8.1 and a WP8 app and this library seems the only available option.
Anyway, there is no binary release and if I try compiling the source I get several link errors for unresolved externals against the SQLite DLL. I posted an issue at codeplex but got no reply yet, so I was wondering if anyone had already managed to successfully compile this lib and how (or if you know of any viable alternative for RT8.1 and WP8). Here is what I did:
downloaded the latest source from the site.
downloaded and installed 2 VSIX from http://www.sqlite.org/download.html: sqlite-winrt81-3080002.vsix for RT 8.1 and sqlite-wp80-winrt-3080100.vsix for WP.
executed the powershell scripts in each subfolder of the source code solution, which are required to update the projects with newer releases of the SQLite for WinRT extension. The current versions of the scripts refer to SQLite for WinRT 8.1 (prerelease) which is the same I downloaded above.
opened the VS2013 solution and removed the RT project (I just need RT8.1 and WP, this was for WinRT 8.0).
5) built the solution, which failed with link errors.
If I see the RT8.1 project properties, I can confirm the reference to SQLite is under C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\SQLite.WinRT81\3.8.0.2.
Did anyone manage to use this lib? Thanks!
I also once had that problem. I fix it by editing the project file manually. At that time, the powershell script updating the wrong path. That's why I always failed when compiling my project. After I edit the project file using external text editor (I use sublime text), the projects are linked correctly.
You can try DatabasesCx. It is another SQLite Wrapper using Windows Runtime Component technology. It is freeware distributed as precompiled binary. You can find the details at http://www.almanacsoft.com/databasescx

How to properly update Monogame with a Github PR

Heey,
I got a little problem. The current Monogame 3.2 build available hasn't got a working template for Windows Phone 8. This will result into a black screen and a non working app. So I went onto their git hub and found the issue https://github.com/mono/MonoGame/pull/2089 and someone who fixed it and posted a Pull request.
The problem now is I have close to zero experience with building my own version or editing project template files. I got some common knowledge and started to delve into this all and already tried copying the template files to my visual studio files and building projects and throwing around the new .DLL but it all doesn't want to work properly. I started to work with the older template but I need the new version due to proper support for landscape in windows phone 8 that we need to utilize for our game.
Now is my question if someone knows the right/proper way to do this. A short summing up from what to copy where will do.
Thanks in advance.
Okay it took me some time but I figured out what to copy,build,set and run.
You download the .Zip or make a pull with your Github into an empty folder and when finished extract it.
In the map open the MonoGame.Framework or MonoGame.Framework.”your
target platform” which will startup visual studio.
Build the solution/project (don’t forget to build in ARM, x86 and
x64 if enabled and needed) and navigate to “Extracted
folder”/MonoGame.Framework/bin/”your targeted platform” at the same
time open a new explorer and navigate to your MonoGame installation
by default C:\Program Files (x86)\MonoGame\v3.0
Navigate in your extracted folder to your targeted platform and
build and copy the MonoGame.Framework.dll to the opposing C:\Program
Files (x86)\MonoGame\v3.0\Assemblies\”targeted platform”\”build”
Rebuild your Project/Solution
Gratz you now updated your MonoGame :)
This could fix your problem but it’s possible that you still get an error when initializing your app on your phone or emulator DXGI related.
If this occurs then follow these steps. The problem lies probably by your SharpDX.WP8.dll how to fix this? In my case download and install the newest SharpDX http://sharpdx.org/download/ you could also look further how to only download the SharpDX.WP8.dll & .winmd!
Navigate to your SharpDX install (by default C:\Program Files
(x86)\SharpDX) navigate further to
Bin\DirectX11_1-“platform”-“build”\ and copy the SharpDX.WP8.dll and
.winmd to C:\Program Files
(x86)\MonoGame\v3.0\Assemblies\WindowsPhone\”build”
Rebuild your Project/Solution (if this still doesn't work you may
need to manually add the references again to SharpDX.WP8.winmd for
both builds)
So if it’s alright this should fix most issues but there is one left. Between MonoGame 3.0.x and 3.2 the project template of a windows phone game has changed but this didn't went well in the code. So we’re now going to update the project template of our Visual Studio.
Go back to your extracted Monogame map and head into the folder
“ProjectTemplates”\”your visual studio version”\WindowsPhone
Select all files and create a .Zip (could be done by the integrated
windows option “Send To”) make sure when you open the .Zip you will
immediately see all the files and they aren't nested into a folder
inside the .Zip
Navigate to C:\Users\”your PC name”\Documents\Visual Studio
201X\Templates\ProjectTemplates\Visual C#\MonoGame and copy your
just created .Zip and overwrite the existing file.
You may have to follow these steps if you use different version of Visual Studio because of the lack of support for XNA inside VS2013.
Now you should've fixed any possible problem. If your project still gives errors try to recreate a new one (this would now use the new updated template you just copy pasted and would work) If this still doesn't work than please post what goes wrong but this all should do! These instructions should also work for all other platforms (at least which you could build of course)
Pretty easy to do pull it in to your own version.
Follow these steps:
Fork the Monogame repository
Clone your version to your local machine
Find the repository of the fixed code.
In a command prompt, move to your MonoGame folder, and pull the changes in using this line on your machine. (the branch is most likely master)
git pull http://github.com/other/repo branch_name
Once you have the pull request pulled into your local branch, just build it using Visual Studio.
You can also follow these steps if you think you'll be doing this often.
https://help.github.com/articles/syncing-a-fork
For some reason MrME, I couldn't get your solution to work because of some missing SharpDX reference which REFUSED to be added manually. While your solution may be valid I would like to present an alternative if you have the patience to transfer the code to a Monogame 3.2 project and are still getting the black screen:
Set the DrawingSurface to a DrawingSurfaceBackgroundGrid in the GamePage.xaml. Full details are found in the commented explanation at the bottom of the GamePage.xaml file.
Source: https://github.com/mono/MonoGame/issues/2081

Problems compiling MvvmCross TipCalc sample

I am trying to run the MvvmCross TipCalc sample. Using NuGet on TipCalc.UI.Droid to resolve references works OK. I then try to do same on TipCalc.Core and get:
Adding 'MvvmCross.PortableSupport 3.0.13' to TipCalc.Core.
Could not install package 'MvvmCross.PortableSupport 3.0.13'. You are trying
to install this package into a project that targets 'portable-win+net40+sl40+wp',
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.
Shouldn't the project just be ready to go for NuGet and it should "just work"? I am newbie to NuGet and MvvmCross. I am on Win7, VS.NET 2012, NuGet 2.7.40911.225, and latest MvvmCross-Tutorials from GitHub.
The problem will probably be in 'net40' and 'wp' platforms you've included - for PCL reasons we need a minimum of 'net45' and wp75' used - see the chart in http://msdn.microsoft.com/en-us/library/gg597391.aspx for the fact that 'net40' doesn't currently support Mvvm Types (e.g. INotifyPropertyChanged).
If it helps, my current development setup here has remained unchanged since March - it's still http://slodge.blogspot.co.uk/2013/04/my-current-pcl-setup-in-visual-studio.html
Shouldn't the project just be ready to go for NuGet and it should "just work"?
The process towards getting all the tooling for PCLs, nuget, VS, XS, etc working across all the platforms has been slow, hard work.... it is happening and it will one day 'just work' but it continues to take time and lots of work from lots of people.
There are still open workitems within nuget and within Xamarin - e.g. http://nuget.codeplex.com/workitem/2926 - which people are working on; some of the MS legal hurdles have recently been cleared (http://blogs.msdn.com/b/dotnet/archive/2013/10/14/portable-class-library-pcl-now-available-on-all-platforms.aspx); and technically things change on the Xamarin side with almost every Alpha release. But it is hard to get definitive answers on when things will be 100% ready and will "just work".
The good news is that:
with the 2 XML files from http://slodge.blogspot.co.uk/2013/04/my-current-pcl-setup-in-visual-studio.html I and plenty of others have been happily using PCLs and nuget for the last 6 months or so.
progress is still moving forwards
Some of these Q&A's may also help:
MVVMCross StarterPack not installing from Nuget in fresh PCL
Can't install MVVMCross on PCL project
MvvMCross 3.0.6 Nuget package installation issue
Adding MvvmCross nuget package reference to PCL failed
Getting PCL, Mvvmcross, Nuget and Xamarin Studio to play "nice" on Mac