Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install library from nuget repo #138

Closed
dfreiberger opened this issue Aug 5, 2024 · 1 comment
Closed

Cannot install library from nuget repo #138

dfreiberger opened this issue Aug 5, 2024 · 1 comment

Comments

@dfreiberger
Copy link

dfreiberger commented Aug 5, 2024

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.

See #139 for a possible fix/work-around

@iadonkey
Copy link
Contributor

iadonkey commented Aug 6, 2024

Should be fixed, for details see #139, e9a243d

@iadonkey iadonkey closed this as completed Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants