Cordova build on windows platform overrides appxmanifest file - windows

I am using a different package name as configured in my config.xml for my windows platform target.
For example, this is my config.xml (here package name is the id element in the widget tag) in my root project folder:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="de.myapplication.mobile" version="1.1.1" ...>
And my package.phone.appxmanifest file in my windows platform folder (here the package name is the Name element in the Identity tag) contains for example this:
<Package ...>
<Identity Name="de.myWindowsApplication.mobile" Publisher="XXX" Version="1.0.0.0" />
</Package>
Now building my windows platform target with cordova build windows replaces the Name element string de.myWindowsApplication.mobile with the id element string de.myapplication.mobile from the config.xml.
(How) Can i prevent this?

Related

External manifest seems to be unrecognized by Windows

I am using an external manifest for a very simple program I have written, program.exe. I have an external manifest, program.exe.1.manifest, in the same directory. These are the contents:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns="urn:schemas-microsoft-com:asm.v1"
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"
manifestVersion="1.0"
>
<assemblyIdentity
name="TestC.Testos.TestEx"
processorArchitecture="amd64"
type="win32"
version="0.1.0.0"
/>
<description>TestTool</description>
<file
loadFrom="%homepath%\Desktop\source\payload.dll"
name="payload.dll"
/>
</assembly>
Now, the simple program simply calls LoadLibraryW(L"payload.dll"). The payload.dll is located in the Windows directory of the system, however, I am trying to load a version of payload.dll from a folder called source on my desktop. This works when I embed the manifest in the program directly, but does not when it is an external manifest. Why does an external manifest not work?

Using VBControlExtender with manifest results in error 438 (doesn't support this property or method)?

I use vb6 dll/ocx without registration, using manifest file. 90% of application working ok, but one part who using VBControlExtender not working.
Dim oRegion as VBControlExtender 
Set oRegion.Properties = Prop
Error: 438 object doesn't support this property or method
If register ocx then working ok!?
manifest file:
<?xml version="1.0" encoding="UTF-8"?>
<file name="Dll\XMLKontrolaNalaz.ocx">
<typelib tlbid="{AFC41DA0-934F-46CB-9421-B0798C427C74}" version="1.0" flags="" helpdir="" />
<comClass clsid="{4437736B-A865-446B-B6E4-924EBC9197A5}"
tlbid="{AFC41DA0-934F-46CB-9421-B0798C427C74}"
threadingModel="Apartment" progid="XMLKontrolaNalaz.ucTxt" />
<comClass clsid="{37AB7E7A-C924-47C0-BA6F-05C9586D4AE4}"
tlbid="{AFC41DA0-934F-46CB-9421-B0798C427C74}"
threadingModel="Apartment" progid="XMLKontrolaNalaz.ucOpt" />
...

Xamarin Forms Mediaplugin Fileprovider

I'm trying to implement the MediaPlugin but I am running into a problem. I have done all steps in the setup instructions and get the following error:
Error: No resource found that matches the given name (at 'resource' with value '#xml/file_paths')
As explained in the setup instructions - in my Android project, I have added a folder inside the Resources-folder, called xml - containing a file called file_paths.xml with the following contents:
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-files-path name="my_images" path="Pictures" />
<external-files-path name="my_movies" path="Movies" />
</paths>
I expect this problem to be related to either the above or the AndroidManifest.xml, so I'll include my complete AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.company.Kvitt" android:installLocation="auto">
<uses-sdk android:minSdkVersion="15" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application android:label="Kvitt.Android">
<provider android:name="android.support.v4.content.FileProvider"
android:authorities="com.company.Kvitt.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths"/>
</provider>
</application>
</manifest>
Any help or ideas on how to solve this error are really appreciated!
The res/xml directory should be in the same sub-folder as other Resources; drawable, layout, mipmap-XXX, etc...
Do a clean all / build all just as a double check
Double-check your xml path in the project: Resources/xml/file_paths.xml
After a build, check the build artifacts for the file in obj/Debug/android/res/xml
If the resource file is not in the build artifacts the likely cause is the build action is wrong
Check that the build action on the file is set to AndroidResource

My nupkg is incompatible with my Unified API app

I've made a NuGet package that has a lib/Xamarin.iOS10 folder with a dll inside it.
I've created a test project (an iOS unified API Single View App) and I try to add my package but I get this response:
Could not install package 'mypackage 1.0'. You are trying to install
this package into a project that targets 'Xamarin.iOS,Version=v1.0',
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.
Extracting the file, I can verify that my dll is present.
This is the nuspec file:
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="2.8">
<id>MyPackage</id>
<version>1.0</version>
<title>My Package</title>
<authors>Kristian</authors>
<owners>Kristian</owners>
<developmentDependency>true</developmentDependency>
<licenseUrl>http://www.opensource.org/licenses/mit-license.php</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Experiment Package</description>
<summary />
<language>en-US</language>
<tags></tags>
<dependencies>
<dependency id="Fody" version="1.29.3"/>
</dependencies>
</metadata>
<files>
<file src="../MyPackage.XamarinIOS/bin/iPhone/Release/MyPackage.dll" target="lib/Xamarin.iOS10/MyPackage.dll" />
</files>
</package>
Is there anything else I need to do? I am not using the new project.json format for my package.. I am using Xamarin Studio version 5.9.8.
Shouldn't that be:
target="lib/xamarinios10/MyPackage.dll"
Instead of your Xamarin.iOS10 path?

How to add type metadata element in the OPF file?

I added following in the OPF file.
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" xml:lang="en" unique-identifier="pub-id">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:type>ePub</dc:type>
</metadata>
but getting error by Epub validator. http://validator.idpf.org/
element "dc:type" not allowed here; expected the element end-tag or element "dc:contributor", "dc:coverage", "dc:creator", "dc:description", "dc:format", "dc:identifier", "dc:language", "dc:publisher", "dc:relation", "dc:rights", "dc:subject", "dc:title", "link" or "meta"
How to add type metadata element in the OPF file?
Package Document (.opf)
The Package Document contains information about the book including the metadata, manifest, and
spine. It also defines the version must be 3.0.
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" version="3.0" prefix="rendition: http://www.idpf.org/vocab/rendition/#">
The Metadata
Minimum, you must include the following items.
Title
ID
Language
Type
Modified-date
For Example:
<dc:title>XXXXXX</dc:title>
<dc:creator>YYYYYY</dc:creator>
<dc:source>0000000</dc:source>
<dc:identifier id="p0000000">URN:ISBN:0000000<dc:identifier>
<dc:publisher>ZZZZZZ</dc:publisher>
<dc:language>en</dc:language>
<dc:type>Text</dc:type>
<dc:format>100 pages</dc:format>

Resources