Create store Application modifying the Package appxmanifest - c++

I have a universal windows application (Windows run time component) which I am trying to package from:
Project->Store->Create App Package
But each time after the packaging is done, I can see my Package.appxmanifest is modified.
I have below extension section in the application node which I can't find after the packaging:
<Applications>
<Applications>
...
<Extensions>
<uap:Extension Category="windows.appService" EntryPoint="AppForUpdaterService.BackGroundUpdaterTask">
<uap3:AppService Name="com.mhas.appUpdater" uap4:SupportsMultipleInstances="true" />
</uap:Extension>
</Extensions>
</Applications>
</Applications>
As a result I am unable to consume the service after packaging it.
It's working when I am deploying from visual studio.
What am i doing wrong here?
My Platform details :
Target Platform : Windows 10
Target Platform Version : 10.0.14393.0
Target Platform Min Version : 10.0.10586.0

Well this was strange. When i edit the Package.appxmanifest from xml editor it's gone while packaging from
Project->Store->Create App Package
But It remains unchanged if edited from the App Manifest Designer ! This may be helpful for someone trying to distribute offline app(Side-loaded Service App).
I think it's a bug in visual studio.

Related

How to build Ionic for Windows UAP?

When I run ,
ionic build windows
in command prompt, it says Windows Phone SDK 8.1 is not found. In case I'm trying to build for Windows UAP, do I still need SDK 8.1? I have Windows SDK 10.0 along with Visual Studio 2015 installed. I'm working on a Windows 64-bit platform.
First and foremost thing after you create a new app, you would need to add a platform.
ionic platform add windows
And as for windows, I think it defaults to win 8.1/8. So, naturally it would search for windows 8.1 SDK. At this point you could tweak the config.xml file (present in the root of your app, not elsewhere) by adding these lines to it, as a child of the <widget/> tag.
<platform name="windows">
<preference name="windows-target-version" value="10.0" />
</platform>
Then you should run
ionic build windows
for the changes to take effect.
And then running
cordova requirements
would show you that all the requirements are met.

Building UWP app from command line

I need to create kind of builder for my Universal Windows App (UWP) application, that would load some configuration into it, build it and create app store package. Is there any way to build UWP app from command line, without associating it with the store and using Visual Studio at all?
There is WinAppDeployCmd, but it can be used to install builded appx package on device and I need tool like that to generate that package.
UPDATE
I've managed to build it and create app packages with command line, here is command I used:
msbuild "path to .csproj file" /p:OutDir=output_dir /p:AppxBundle=Always;AppxBundlePlatforms="x86|x64|ARM" /p:BuildAppxUploadPackageForUap=true
It's working but not as it should apparently. I can not install generated appx package on my phone (and emulator). I just get error
Failure reason: Failed to start deployment. Failure text: Install failed. Please contact your software vendor. (0x80073cf9)
I found many solutions for Windows 10 PC version, but there is only one solution I found for Windows 10 Mobile and this "solution" is to hard reset the phone, but I do not want to do that. Is there any other way?
And there is one more problem. This command doesn't work with parameter /p:Configuration=Release; and it only builds with Debug configuration, but I believe this is not related to previous error, because it doesn't work with Visual Studio either.
UPDATE
I could not find another solution, so I did the 'hard reset' of my phone and now it is working. It's sad, but I hope the reason is the Windows 10 Mobile OS is still in beta version.
Step 1 : See, you need to install .NET Framework installer from the below link. https://www.microsoft.com/en-us/download/details.aspx?id=30653
Step 2 : Go to C: drive and find where msbuild.exe is. You will find more msbuild. But mostly it will be in the location like C:\Windows\Microsoft.NET\Framework\v4.0.30319.
Step 3: Open the CMD in administrator and point to the location which is mentioned in Step 2.
Step 4 : Paste this. msbuild.exe "YourCompleteProjectPath.sln" /t:rebuild
See this for reference : https://msdn.microsoft.com/en-us/library/ms164311%28v=vs.85%29.aspx

Nant build issue: Failed to initialize the Microsoft .NET compact framework

i have some problems regarding building .NET solution for handheld device using NAnt 0.92. The solution consists of typical csproj and CAB installer (vddproj). The target platform is .NET CF 3.5.
However, if i set the target platform in the script as:
< property name="nant.settings.currentframework" value="netcf-3.5" />
when i execute then i receive an error:
Target framework could not be changed. "netcf-3.5" is not a valid framework identifier.
This means that i cannot build solutions for target platform 3.5. Logically, i have tried with CF 2.0 afterwards:
< property name="nant.settings.currentframework" value="netcf-2.0" />
and then i receive an error
Failed to initialize the 'Microsoft .NET Compact Framework 2.0' (netcf-2.0) target framework. Registry path not found! - key = 'SOFTWARE\MICROSOFT......'
I have the proper SDK installed as some other posts suggested. Also, tried to disable the antivirus, as also suggested in similar posts, but couldn't find any solution.
Can you give any advice, please?
Thank you in advance. Daniel
I know it's a bit late but I would suggest that you're using NAnt only to trigger MSBuild.exe. Thats what we're doing in our CI environment and it works perfectly. Also make sure that your project is a smart device project or else it won't build correctly. I'm not even sure if NAnt supports the CF 3.5 (anymore).

Running SpecFlow Report - ERROR - The attribute "Label" in element <Target> is unrecognized

I have been following the tutorial found here for a SpecFlow test report generator.
My issue is, when I run the tool, I receive the following message:
The attribute "Label" in element Target is unrecognized
I've found a few possible solutions, none of which have worked e.g. here
I am able to show that I am running version 4.x as when I run MSBuild using the Visual Studio 2012, command prompt I can see the following:
Microsoft (R) Build Engine version 4.0.30319.17929 [Microsoft .NET
Framework, version 4.0.30319.18052]
I have created a config file as suggested here
but unfortunately I am still getting the error. The project is running locally off git and this issue has been fixed in the past by using the config file, however since swapping to a VMware Virtual machine, it is now occurring again.
I have also right clicked > Properties which states that the file is using .NET 4.0, in addition created a Environment Variable linking directly to the MSBuild directory. I've spent a good while browsing the internet and cannot get this working. Please help!
Many thanks for any help you can provide,
Cheers!
Solved this with the internal devs. There was some problem with the Chromedriver update script which had been added by (I'm assuming NuGet)
Starting
<PropertyGroup Label="DownloadChromeDriverBuildTask">
and also:
<Target Name="DownloadChromeDriver" Label="DownloadChromeDriverBuildTask">
It was a small script that was installing ChromeDriver if it was not already available. Removing this seems to have resolved it. Hope this provides help to anyone with a similar issue.

Why are my MSpec specifications not recognized by ReSharper?

I know how to integrate MSpec with R#, I'm aware of "blocked DLLs" problem. But I still can't figure out why my tests are not recognized. I'm integrating MSpec in an unusual way though. I do not use NuGet. I have old MSpec build - 0.4.9 - which my tests are built for. I manually create Plugins folder for R# and put the following DLLs there:
Machine.Specifications.dll 0.4.9
Machine.Specifications.ReSharperRunner.6.1.dll 0.5.0 (built from GitHub sources)
After I start VS and open R#'s options dialog the runner is displayed in the Plugins section. But my tests are not recognized. Can the version mismatch be an issue? Does R# have any logging where I can see its communication with the plugin?
Did you try to download the 0.4.9 binaries from NuGet and use the ReSharper runner from this release? The current source doesn't support these old versions anymore.
I have finally sorted that out. I had to debug the runner as described here - https://github.com/machine/machine.specifications/blob/master/debugging-resharper.txt. And I found out that the runner was built for ReSharper 6.1.37.86, which is not the latest 6.1 release, list is here - http://resharper-support.jetbrains.com/entries/21206508-Where-can-I-download-an-old-previous-ReSharper-version-. The latest 6.1 release is 6.1.1000.82 which is installed on my machine. So the runner just could not find required ReSharper assemblies during startup. I fixed the problem by adding assembly redirects into devenv's config file. The redirects are needed for all ReSharper files the runner depends upon, there are 16 of them in total. Example redirect is:
<dependentAssembly>
<assemblyIdentity name="JetBrains.Platform.ReSharper.ComponentModel" publicKeyToken="1010a0d8d6380325" culture="neutral"/>
<bindingRedirect oldVersion="6.1.37.86" newVersion="6.1.1000.82"/>
</dependentAssembly>
For anyone coming at this problem with a Visual Studio 2019 / Resharper 2019.3.4+ setup, what worked is using Resharper's inbuilt extensions manager.
In VS, go to:
Extensions -> ReSharper -> Extension Manager
and search/install "Machine.Specifications for ReSharper"