I have written a Xamarin.Forms application and now I want to deploy the UWP project to the store but I can't create app packages.
When using Microsoft.NetCore.UniversalWindowsPlatform 6.2.2 or 6.2.0-preview I
in release mode, I constantly get this error :
Payload contains two or more files with the same destination path 'System.Runtime.CompilerServices.Unsafe.dll'. Source files:
C:\Users\john.nuget\packages\runtime.win10-x86-aot.microsoft.netcore.universalwindowsplatform\6.2.0-preview1-26926-04\runtimes\win10-x86-aot\lib\uap10.0.15138\System.Runtime.CompilerServices.Unsafe.dll
C:\Users\john.nuget\packages\system.runtime.compilerservices.unsafe\4.5.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll OfflineCurrencyConverter.UWP
But I followed the answer to this GitHub issue saying I should downgrade the package to 6.1.9.
Doing this causes my application to build for ever... the build never stops.
But when I disable .NET Native Tool chain, it builds and run in release mode but packages can't still be created. Please does anyone have a solution ? I'm frustrated.
I feel wasted building a whole app and realizing it can't be packaged at the end for this UWP project.
If it took way longer than you expected to build in release mode, use nuget version of .net native by installing Microsoft.Net.Native.Compiler package on nuget in your project and re-build it as usual. This solution solves the very same problem you have now in my experience.
Building app for .NET Native in release mode can take a very long time. It can even take as much as 10 minutes for larger apps. So make sure to give the compiler the time it needs. It might seem it is building forever, but it should definitely finish.
Related
I was trying to run one of my apps after a fresh windows installation, and then I get this message in Visual Studio:
Severity Code Description Project File Line Suppression State
Error DEP0700: Registration of the app failed. [0x80073CF3] Windows cannot install package 464|APPPUBLISHER|.|APPNAME|_1.7.0.0_x86__yejd587sfa94t because this package depends on a framework that could not be found. Provide the framework "Microsoft.UI.Xaml.2.1" published by "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x86 processor architecture and minimum version 2.11904.5004.0, along with this package to install. The frameworks with name "Microsoft.UI.Xaml.2.1" currently installed are: {} |APPNAME|
And here is a screenshot (The app name and publisher are hidden):
Does anybody know a solution for this?
Also, in a desperate case, if I publish a recreation of this app in the Microsoft Store, will it install properly?
Edit: it seems like every time I change the version of the app, the package that won't install synchronizes with the changes
Edit 2: Is there any way to download this package from NuGet or restore it to the app package?
Edit 3: This app was always a big problem and never behaved as it should. This isn't the first time I'm having similar problems
Have you tried to right click on references, Select Manage NuGet Packages and searched for that package?
I found a solution to this problem and, actually, the only solution. Since this app had a history of API problems, I decided to make a new one with the exact same properties, but with some fresh NuGet packages. This solved the issue and improved the performance a lot. Now, I don't have to worry about it failing to load every time I reinstall Windows since it was the only app that caused problems.
The package that this app was asking for was a cache that I couldn't get rid of, and was stuck in the files as a dependency on something that doesn't even exist.
This is my first question here. I'm working on a Windows 8.1 with Visual Studio Community (Update 2). I'm building a small service in C# for my company that parses emails from an Exchange web service. In my solution, there are 2 projects: one built from scratch where I create the service and deal with emails, and the other one is a "Visual Studio Installer" that creates a small .exe to install the service with with all its dependencies.
The first project uses Microsoft.Exchange.WebServices.Auth and Microsoft.Exchange.WebServices libraries to communicate and parse emails from an exchange web service. These two dependencies are coming from NuGet. Both projects are built with the 4.5 .Net Framework. The installer has one main output which is the service project and has 4 dependencies:
Microsoft .NET Framwork.dll
Microsoft.Exchange.WebServices.Auth.dll
Microsoft.Exchange.WebServices.dll
System.net.HTTP.dll
The service works pretty well and I'm happy with it. I tried to update my code this week to see how I can write in the Windows journal. The issue is that since this week (30/05/2016) I can't regenerate my solution. I can build the first project (service one) and there are no issue but for the second one (installer), 4 warnings show up (both appear twice in DEBUG mode and 3 times in RELEASE mode):
WARNING: Unable to find dependency
'MICROSOFT.IDENTITYMODEL.EXTENSIONS' (Signature='69C3241E6F0468CA'
Version='2.0.0.0') of assembly
'Microsoft.Exchange.WebServices.Auth.dll'
WARNING: Unable to find dependency 'MICROSOFT.IDENTITYMODEL'
(Signature='31BF3856AD364E35' Version='3.5.0.0') of assembly
'Microsoft.Exchange.WebServices.Auth.dll'
These warnings explain the fact that the installer don't appear anymore in the DEBUG and RELEASE folder. I reverted the code I wrote and the error is the same. I also tried to create a new solution with the same project as 4.5 Framework basis and with an empty project but with the same dependencies I have the same warnings.
Do you guys have (had?) the same warnings?
I found a solution to my problem. My solution was saved directly on a remote hard drive. When I built the soution, .net framework was not found (my error). I re-create localy my solution and it works. Hope it will helps others.
Perhaps, I don't know why from one day to another .net was not found. Maybe Windows update has crashed during an update.
When I open a sample Blinky application in Visual Studio, compile and run it, it gets automatically deployed to the target configured WindowsIoT device. After that, on Windows 10 machine where I compile it, the application binaries are located in the bin sub-folder of the project folder as one would expect.
I would like to automate the deployment, so that I could run deployment code
without Visual Studio, specify target device and the binaries location and it would deploy it. I cannot find any API that allows
to deploy apps to Windows IoT, how do I do that?
This shiny Windows IoT stuff is a new area, and there is not a lot of info available apart from the samples and the getting started page. Any pointers are appreciated.
Update: As noted in comments, once one start thinking of mass production, they will probably need to conciser ICD. This, is not, however the problem I'm trying to solve currently. I would like to figure out how I can provide Over-the-Air updates to my UWP application running on Raspberry Pi and Windows IoT. I also would you like to know how I can automate build / deployment in general, but that may be automatically solved if I have a proper OTA solution.
There is a set of instructions on how to do it, which can be found in the same github repo you are linking in your question, but in a different folder. Note, that you need an appx for these instructions to work, and it's not created by the solution build by default.
This page provide (non IoT specific) instructions on using VS to build the appx. And this blog post talks about the command line tool that can be used for making appx.
Note, that the last two links are also talking about publishing an application to app store, so you'll need to make some mental adjustments around that.
I am trying to use cefsharp so i downloaded the repository from their website and tried to copy and paste every thing as it is from the windows forms application to my application in order to use the ChromiumWebBrowser.cs that comes with it... however when i run my application it only display a white area (sometimes just invisible hole) with no error or anything... have been trying for over 30 hours with no luck although it is running normally at the example project.
You dont need to copy any thing, just install Cefsharp from Nugetmanager of Visual studio.
GetStartfromhere
See this related issue for suggestions: CefSharp WinForms Web Browser Won't Display
If that doesn't help a few particular items you should check:
Work your way from the CefSharp.MinimalExample repo which now contains a WinForms example
Start your project by using the NuGet package (as mentioned in the SO answer above). It takes care of copying all needed Chromium resources
Make sure your NuGet version is at least 2.7
Setup your project configuration as either x86 or x64 ... with AnyCPU the NuGet magic won't work currently
Back then when I had Visual Studio 2011 installed, there was a "ClickOnce deployment" option in the project properties window that created self-extracting installation packages that also verified application dependencies (DirectX, ...). I have updated to VS2012 and switched to Monogame due to Microsoft cancelling any further XNA development. That also caused the "ClickOnce" deployment tab to be gone. Nobody I send the Release directory to (it includes some but apparently not all required libraries) can't get the game started - it always crashes, usually due to lack of some OpenAL DLL. Could you provide me with links and/or instructions on Monogame apps deployment/publishing? I've already tried Google but maybe I've overseen something.
I'm targetting Windows.
I found this article while googling for "Monogame Required Dlls":
http://xnameetingpoint.weebly.com/monogameintro.html
Basically, besides the assemblies in your Release folder the user would need to have OpenGL drivers installed.