How can I deploy an application to Hololens without VS? - package

I've developed an application for Hololens, so the only way I know to install the application in hololens is by visual studio, so I want an application package to be able to install without needing Visual Studio. I tried to follow this tutorial here
"https://learn.microsoft.com/pt-br/windows/uwp/packaging/create-app-package-with-makeappx-tool"
but I can not find these two .appx and .appxsym files.
If anyone knew, I appreciate that.

Maybe you know some steps, but I will go the full way (it's only deploying without visual Studio):
In Unity:
File> Build Settings
Choose Universal Windows Plattform (older Versions Windows Store). Make sure your settings are right (for hololens, sdk enabled...)
hit "Build"
Now you have to select a Folder to build. In my Projects I create just an "App" Folder
Once it is build navigate to this Folder (if it's not opening automatically).
Open the Solution (in the App Folder, not the Unity one)
In the Explorer right Click on the "Project Properties" which are named like your Project and Select "Store>create App Package (or maybe build, i got it on German)"
If you want only the appx File select "no" at the Windows Store question
Select an Output Folder and Version Number (count's up itself, newer numbers will overwrite older versions on Hololens automatically) and for Hololens only select x86 (the others are not needed. Just consume time). Now hit the "create"(again i hope i translate it right) Button.
Apply on Hololens:
Connect the hololens via USB (you can do it with wifi too, but not in our Network, so i never tried)
Open a browser and type "127.0.0.1:10080" so you get access to your hololens
Navigate to "System>Apps" and under Install App select the appx file (in my case under: (myUnityProject/App/AppPackages/myUnityProject/myUnityProject_1.0.0.0_Win32_Master_Test)
First time deploying select the dependencies (Dependencies/x86)
Hit "go" to Deploy (wait until everything is uploaded)
Some Notes:
To build the Apps i needed mvs 2015 installed (just installed), but this was before the Fall creators Update. Now newer Versions (should) work fine. Also I needed to install the windows "buildtools 2015"
https://www.microsoft.com/de-de/download/details.aspx?id=48159
Hope it works and have fun!

Related

Publish WPF + EF Core App with Windows Installer Project

I have tried to create an .exe file to my WPF App and SQL Server related databse with EF Core using Windows Setup Installer Project.
I included all the dll's files from /bin/Release and built it for any CPU.
The Setup Project has been created successfully and it worked on my PC as I expected.
Otherwise when I try to install the Setup File on another PC, I can't even open it up and see what's wrong.
I guess the problem comes from the database but I can't find anything helpful on the internet.
So you get the application installed, run it and nothing happens, right? Here is what you do:
Run it. Watch nothing happen
Hit the Windows key and type "Event"
When "Event Viewer" appears in the list of applications, run it
In Event Viewer, go to Windows Logs >> Application
Near the top there will probably be an error entry. It will probably be related to your application. And if you were missing a key file needed to run your application, like a DLL, the name of the file will probably be in there in the details section
Go back to your installer and add that missing file. Or if that file is part of some support package (like, say, MS Redistributable for Visual C++) then add the installer for that too.

WPF application installed in program files just exits - but runs in another folder

Using Visual Studio 2017 on Windows 10, I have a WPF application with an installer created using the Visual Studio Installer extension. When I install it on another PC, the application starts but then exits within the same second. Nothing in logs.
If I add a manifest to force admin mode, its starts correct.
If I copy the files to another folder (outside program files) it starts correct.
Apparently the "program files" is restricted or something? Am I missing something in my setup/installer project? Any other ideas more than welcome!
EDIT:
I've tried to create the installer using WIX and then it runs fine. Seems to be some settings in the VS Installer extension.
You can modify the ACLs on the folder in question to allow write access by regular users (not great) or you could write the settings file somewhere else where write permission for users is standard.
There are many ways: Resolve lacking permissions.
There is another, similar answer here.
Adding a couple further links:
WiX and deployment links, various topics.

how to deploy Windows WPF Application?

I have a simple Windows Form application(WPF) with entity framework. After compiled, only a few files generated:
EntityFramework.dll
EntityFramework.xml
MyApp.exe
MyApp.application
MyApp.exe.config
...
Then I just copy following files to a network shared folder:
EntityFramework.dll
MyApp.exe
MyApp.exe.config
Then I can double click on MyApp.exe from developer computer the launch the app, but can not launch from another end user computer.
How to resolve this problem?
When you double click, app is not launching means certainly it is crashing so type the command eventvwr in run or cmd it'll open the Event viewer in that go to Windows Logs and Click on Application, you can see different levels of logs in that just find the last error log view the details it might help you
Have a look in the event log on the target computer and look at the error that is actually being reported.
It could be a missing installation of the correct version of the DotNet framework as suggested in the comments above, or it could also be that the execution policy of the target computer is preventing the user from running from a network drive (As a developer you probably have admin rights on your local pc allowing you to do this).
Whatever the actual cause you are always better to use some form of installer, rather than this form of putting files on the network (commonly known as xcopy deployment).
Probably the best solution is to use Visual studio to generate you a click once installer and publish it to your network drive. This will then copy the application locally on the users pc and run it from there.

Can't run Xilium. CefGlue built on Visual Studio 2012

'Hi all, I downloaded Xilium.CefGlue and built the source on Visual Studio (xilium-xilium.cefglue-b22787699e57), I also downloaded cef_binary_3.1453.1236_windows_xilium and copied the libcef.dll to the Xilium Winforms demo as the apps requires it to run but when I run it I get the following error:
An attempt was made to load a program with an incorrect format.
Exception from HRESULT: 0x8007000B
I've targeted x86, can I get some help?
Thanks
Ok, here's the steps I used to get the samples working in VS 2012:
Get the code from Xilium.CefGlue on github. (The one I used was c3d674a3a8)
Open the Xilium.CefGlue solution in VS2012
Remove or don't build the CefGlue.Demo.GtkSharp project (it didn't interest me & I didn't have the needed libraries)
In the Configuration Manager, select Active Solution Platform to be x86
Ensure that the target framework settings cooperate between projects. (e.g. CefGlue.Demo & CefGlue.Demo.WinForms by default are v2.0, but they depend on CefGlue which is v4.5) (For simplicity I set them all to v4.0 Client profile and it worked.)
Build solution — should succeed
Copy Xilium files from the unzipped cef_binary_3.1453.1236_windows_xilium to the output folder (bin\x86\Debug or bin\x86\Release). Minimum requirement seems to be:
libcef.dll and icudt.dll from .\Debug or .\Release
cef.pak and the locales\ folder from .out\Debug or .\Resources
Set CefGlue.Client as the StartUp Project
Run it

Issue Signing xap file in post build event on TFS Build

We have a silverlight(5) project, the source in TFS (2010) and Continuous Integration build has been setup and working fine. However, we are now at the stage where we are trying to release it to some users to get them using it and give feedback. I've set up the code so that it checks for updates and if there are any it downloads the latest xap file. However this requires the xap file to be signed. No problem when doing this from our dev machines, but when it comes to the automated build it fails, with the message
Xap packaging failed. Cannot locate the signing tool SignTool.exe.
I've tried numerous things to get the signtool to be recoginised and can't. However, we don't actually need this on the CI build, so I've then tried a second tack which is to make the postbuild event conditional on being run in VisualStudio. Followed various suggestions here on SO but can't gett them to work.
The post build event is
if "$(BuildingInsideVisualStudio)" == "true" (
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f "$(SolutionDir)castle.pfx" "$(TargetDir)Castle.xap"
copy "$(TargetDir)Castle.xap" "$(SolutionDir)Castle.Web\ClientBin"
)
still no joy. Have tried multiple variations of this, but keep getting the same message from the automated build.
So can anyone help with either a) getting the signing tool to be recoginised on the build server or b) getting the automated build to skip the postbuild event?
Found the problem in the end...
I had been putting in place some features so the app would download and install the latest xap file. This requires it to be signed. As this wasn't working I followed some instructions on signing a xap file, not realising that one of the other developers here had put in place the code I described above in the post build event.
I had mistakenly thought that this was created as a result of me checking the 'Sign The Xap File' check box.
So first issue was that other developer had not shared his pfx file with us to add to our certificate stores.
Second, and main issue, was that we then had two attempts at signing going on. The one via the check box and the one via the post build event. I removed the check box and it worked fine.
The issue with the check box is that it expects the SignTool.exe to be in a particular location. On our development boxes with full VS it is where it is looking for it, but on the build server it wasn't. Think it may also have something to do with 64bit machines.
By using only the build event (once you have the correct certificates installed) you can specify explicitly the location that the signtool is going to be, and if necessary install the windows sdk to that location.
This is the top result in Google for this error so updating it with my steps to resolve.
The above didnt work for me but performing the steps below should fix it.
Install the Windows 8.1 SDK on the build server (Windows 2008 R2 for me)
Adding the Windows SDK BIN directory (that contains signtool.exe, on my server) to the Environment PATH variable - e.g. c:\program files (x86)\Windows Kits\8.1\bin - note: Do not add quotes around this
Restart all the Visual Studio Team Foundation services in services.msc after you add the file path to the PATH variable as it needs to reload these before building

Resources