Twinpack is a package manager for TwinCAT libraries with integration into the TwinCAT IDE. It enables the TwinCAT community to share their libraries and simplifies the continous integration of third-party components into TwinCAT projects.
I am currently getting the below error when trying to install a non-compiled library (*.library) from Azure Artifacts.
INFO Restoring all packages
INFO Downloaded CoreV1 0.1.2.0 (distributor: MyCompany) (from https://mycompany.pkgs.visualstudio.com/development/_packaging/twincat-feed/nuget/v3/index.json)
INFO Installing CoreV1 0.1.2.0
ERROR This type of library must have the extension ".library".
WARN The solution doesn't have a package configuration
INFO Finished
It appears that InstallPackageVersions uses the .Compiled flag to determine the file extension to look for in the cache. However the .Compiled extension is hard-coded to 1 in GetPackageVersionsAsync.
From a quick search, it appears you cannot have custom metadata fields in a nuspec file, to contain information such as the "compiled" flag. You can have file references, for example https://learn.microsoft.com/en-us/nuget/reference/nuspec#explicit-assembly-references. However for the time being I just changed the code to attempt to load either extension from cache.
I am currently getting the below error when trying to install a non-compiled library (*.library) from Azure Artifacts.
It appears that
InstallPackageVersions
uses the.Compiled
flag to determine the file extension to look for in the cache. However the.Compiled
extension is hard-coded to1
inGetPackageVersionsAsync
.From a quick search, it appears you cannot have custom metadata fields in a nuspec file, to contain information such as the "compiled" flag. You can have file references, for example https://learn.microsoft.com/en-us/nuget/reference/nuspec#explicit-assembly-references. However for the time being I just changed the code to attempt to load either extension from cache.
See https://github.com/Zeugwerk/Twinpack/pull/139 for a possible fix/work-around