Can we compile and sign a windows 8 winjs application via commandline - visual-studio

Is there any way to create a windows 8 winjs .appx package file using command line?

Yes! Look for the MSBuild.exe executable in the .NET Framework folder. You run it like:
MSBuild.exe your/project.jsproj /p:Configuration=Release /t:Build /m
You can use "Debug" instead of "Release" and also "Deploy" instead of build (which will install the app locally, if not previously installed).
More at the MSBuild reference.
There are some usage samples in the Rainbowdriver project, which uses MSBuild to automatically test Windows 8 JS Apps using Selenium.

Related

Xamarin.forms project in Mac terminal without Visual Studio

I'm trying to build a job for Xamarin.forms project in mac terminal without UI method. but, not sure which are the tools are mandatory to be installed. Could anyone help here ?
Installed : Dotnet Core 6 version of visual studio SDK
Build need to be fully in terminal(mac-command line)
Need to do without visual studio application
Why not try build the app from the command line using MSBuild and see what errors it gives you. That way, you can find out what's missing and add things until it builds.
I'm using this command to build my apps from Windows (you may need to change a few things on Mac):
"C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\msbuild.exe" C:\Projects\MyApp\src\MyApp\MyApp.iOS\MyApp.iOS.csproj /p:Platform=iPhone /p:BuildIpa=true /p:IpaPackageDir=C:\Projects\MyApp\artifacts\App_iOS /p:IpaPackageName=MyApp.ipa /p:ServerAddress=192.168.0.23 /p:ServerUser="Username" /p:ServerPassword=123456SafePassword /p:ContinueOnDisconnected=false /p:Configuration=Release /restore /target:Build /verbosity:Normal
Here's some useful info on Continuous Integration with Xamarin.

How do I add an "install" target to a Xamarin.UWP .csproj file?

I am trying to build and launch a Xamarin.Forms UWP application from the command line. Using the developer command prompt for Visual Studio 2019 I run the following command:
msbuild -t:build "project path\SimToools.UWP.csproj" && msbuild -t:install "project path\SimTools.UWP.csproj"
Although once I run this command, the build is completed successfully, then I'm met with this error in the command prompt as shown in the image below:
How do I add an install target in the SimTools.UWP.csproj file for MSBuild?
How do I add an “install” target to a Xamarin.UWP .csproj file?
Derive from above description, you have build the app successfully. But it throw error when install the app. msbuild does not support install the UWP app. And for installing UWP app you may need use WinAppDeployCmd.exe command tool to approach. For more detail please refer Install apps with the WinAppDeployCmd.exe tool document.

How to build a Xamarin DLL in visual studio from the command line?

Xamarin Studio has been replaced for Visual Studio on MacOS. I have a project that builds a DLL using Xamarin iOS. For DevOps (automated release), I want to build the project for release from the command line. I know previously the mdtool was used for this purpose, as seen in this answer but now in visual studio there is no more mdtools binary anymore.
msbuild has replaced mdtool (and xbuild), so all the tasks that once were handled by mdtool are now handled by the cross-platform msbuild and its standard set of cmd-line options.
Release configuration:
Clean a single project in a solution
msbuild /p:SolutionDir=./ /target:Clean /p:Configuration=Release SomeProjectLibrary/SomeProjectLibrary.csproj
Build a single project in a solution
msbuild /p:SolutionDir=./ /target:Build /p:Configuration=Release SomeProjectLibrary/SomeProjectLibrary.csproj
Note: Using Using SolutionDir=./ so these cmds are being run from the root directory of the solution.

Equivalent command to build (on WDK 7) with WDK 10

I have some really old scripts using the build command for compiling with WDK 7. A sample command to build a static library is:
build /F /g /w /b /c /Z /jpath %BUILDROOT%
What is equivalent command I can use to compile the same with WDK 10?
Also where can I find documentation on the usage of the build command.
While going through a MSDN documentation of MSBuild I came across this:
Important Starting in Windows Driver Kit (WDK) 8, MSBuild replaced the
Windows Build Utility (Build.exe).
So that's it - no build command for WDK 8+.
Converting the earlier project into a WDK 10 format - by generating the vcxproj files, I was able to build it.
Microsoft has replaced Build with MSBuild. The reference is MSBuild Reference. Note that Visual Studio uses MSBuild, even for WDK projects. It will take time to create VS projects but if the code is to edited more than a little it will be worth doing that.
There is a chance however that you can just change Build to MSBuild.

MSBuild Console - How to Add Additional Include Directory?

I have setup a new server machine. I setup windows sdk, .net framework sdk, and checkout my visual studio from svn. I would like to build my application using msbuild but it keeps asking me where the "windowsx.h" file is. I do not want to setup any visual studio ide. How can I make msbuild see windows sdk include folder using console?
With a normal install of Visual Studio you get a shortcut to a Visual Studio prompt. This sets all environment variables so you can use the compiler (and other tools) from the command line. First you can try to run msbuild from such a prompt. If that works add the necessary folders to the msbuild settings.

Resources