I've followed this really helpful blog post (https://blog.xamarin.com/drawing-with-skiasharp/) to install SkiaSharp 1.60.0 to present SVG images in an app. Once the necessary packages are installed, and all compiles, when I launch the app it crashes within the LoadApp method.
Uninstalling all the SkiaSharp nuget packages, then all works fine again, but of course no SVG support! Any pointers?
Ok, think this is the key - I needed to be really specific about the packages to install in each project, and to ensure that the versions are consistent. Posting this here to help others in need!
So the key is to be clear about which specific packages from nuget are needed in which project. The PCL requires SkiaSharp, SkiaSharp.svg (for SVG support) and SkiaSharp.View.Forms (for Xamarin.Forms support). The platform specific projects require all of these and SkiaSharp.View which will install platform specific libraries in each.
It's also important to ensure that the version of each package is consistent between the packages and between projects. The root of the problem I had was that 1.60.3 was installed automatically in the PCL and 1.60.0 in the platform specific projects. This caused the app to crash on load. Downgrading the PCL to 1.60.0 fixed the issue. Probably upgrading all to the latest version would also work as well.
Related
which exactly native librairies for a WPF Platform do I need from NuGet?
For the moment I installed those (see picture please) but It seems that I miss another one. Have someone an idea?
You have to also install VideoLAN.LibVLC.Windows nuget package and build the solution.
Probably you do not need LibVLCSharp.Forms.* nugets. They contain support for Xamarin.Forms.
I am using VS2017 15.9.6 with an XAF Winforms application and Desktop Bridge.
At one point I was able to create a .appxupload package to upload to the store however now I can only create a .msixupload bundle
The docs dont seem to explain the difference.
I am using Create App Packages, by right clicking the Packages project.
I don't think I changed anything in the manifest.
I tried Release (Any CPU) and Release (x64)
The solution is Framework 4.7.2 I also tried 4.5.1
This MCP Mag article explains that
MSIX is Microsoft's planned replacement for the MSI and AppX formats.
However this does not help me understand why one of my projects has flipped to using it when other projects have not.
Looks like it has to do with the minimum version of Universal Windows.
I had changed the target min version from Creators update 15063 to Windows 10 version 1809 Build 17763
VS2017 15.9 added support for MSIX when targeting Windows SDK 1809 (17763) as described in the release notes
You should not worry about .appxupload vs. .msixupload, since the store accept both and clients running 1809 won't see any difference between one or the other.
A while back, I experimented with NuGets while I was working on some programs. Recently (especially when I learned how to make a Direct Linking Library, so two of my programs use any code that is identical), I noticed that there are NuGets made by Microsoft that have names, similar to those shown at the start of every cs file (example: System.IO). I recall that Microsoft was going to issue updates for .NET Framework through these, but I never found how to apply them. So, I'd like to ask the following questions:
Does Microsoft distributes .NET updates for programs written for Framework 4.6.x? If yes, how do I apply them to my program?
Do I need to distribute the DLL files as well when I release an update to a program?
In addition, what do NETCore and NETStandard Nugets do exactly? I tried to install a set of NETCore to a 4.6.2 program, but it couldn't install them due to a dependency error.
Thank you in advance.
.NET Framework itself is considered part of Windows, and Microsoft does provide periodical updates via its channels automatically. Usually you should do nothing, but if your apps depend on specific hot fixes, then you have to ship them in your installers.
Anything you added as NuGet packages becomes part of your apps, and you become responsible to keep them up-to-date. So with your own app updates, you should ship new assemblies from updated NuGet packages.
.NET Core apps bundle the runtime, so you are fully responsible to republish your apps with updated runtime frequently. Check Microsoft LTS/Current support policies at http://dot.net
There is a project that wraps V8 engine into C# library. Its nuget package is broken and i'd like to fix it. Creating a package seems easy and there is documented way to pack different C# dlls for different .NET versions. However, i have no idea how to package .dll with C++ and C# code which could be built with different options:
x64 or x86 and not "Any CPU"
MS Visual C++ 2010/2012/2013
debug or release
.NET 4.0/...
I've found this thread and it seems that one can use .targets file with MSBuild commands inside. Then i've read in the docs that MSBuild way is old and not recommended. So what should i do?
One more question is: if this package depends on MSVC++, how to specify this? How to let package consumer select a specific version of dll (built against MSVC++2010, 2012 or 2013)? I suppose it is not a good idea to package msvcr*.dll.
Take a look at how the SQLite packages deploy their DLLs. With the 2.x and earlier versions of NuGet you need to write some powershell code to inspect the version of Visual Studio and apply your changes to the project manually.
We are working towards a more elegant solution for this exact problem with the updates that are to be deployed in NuGet v3
When creating a new solution within Xamarian studio I get this error
Could not install package 'Xamarin.Forms 1.0.6186'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5,Profile=Profile78', 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.
Is there a certain version of .Net that Xamarian Forms requires for it to be included in the solution? I've tried searching in their documentation but I'm only seeing marketing and not real in depth documentation.
I had a similar issue using Visual Studio and I've found that the following combination in the PCL works:
.NET Framework 4.5
Windows Phone Silverlight 8
Xamarin.Android
Xamarin.iOS
You have created the wrong project type, you created a normal Windows app, and I assume you are targeting iOS/Android or Mac.
Create the project with the correct type and it should work correctly.
If you are using Xamarin Studio for Windows (without also having Visual Studio installed) you need to download the Portable Library Tools. See the Xamarin doc Introduction to Portable Class Libraries.
I had the same problem with my Xamarin project. The problem was, that in the portable Xamarin project Windows Phone Silverlight was set as target. The PCL project from which I created the nuget, didn't reference Silverlight as target. I don't need Silverlight, so uninstalling all nuget packages from my portable Xamarin project, removing silverlight as target and reinstalling the NuGet packages solved it.
I had similar issue using VS and I found solution here - http://forums.xamarin.com/discussion/29674/xamarin-forms-dll-cannot-be-installed
"It looks like your NuGet Package Manager needs to be upgraded. The Xamarin PCL Profiles are installed but NuGet is not recognising Xamarin.iOS as a target framework. You can update NuGet by selecting Tools - Extensions and Updates, then select the Updates tab, then select Visual Studio Gallery. Then update NuGet from there."
I have invested a lot of time trying all the solutions posted here, but none of them helped me... Here is the solution that worked for me (on Windows 10):
1.) Open your .csproj file
2.) Find the TargetFrameworkProfile entry
3.) This entry contains Profile78 for me, therefore I open the folder below
c:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/.NETPortable/v4.5/Profile/Profile78/SupportedFrameworks
4.a) If the folder does not exist, then use one of the solutions posted here to install the PLC right on your PC
4.b) Unfortunately, ASP.NET and Xamarin don't like each other, therefore delete all ASP profiles from this folder. For me it was ASP.NET Core 5.0.xml. Obviously this will break your ASP.NET support in VS
5.) Restart Xamarin and have fun!
interesting reading about all that:
https://forums.xamarin.com/discussion/52846/cannot-create-new-xamarin-forms-project-pcl-in-xamarin-studio-win10-vs2015