barnhill / barcodelib

C# Barcode Image Generation Library
Apache License 2.0
736 stars 239 forks source link

The referenced component 'BarcodeStandard' could not be found. #121

Closed HelloNewW closed 3 years ago

HelloNewW commented 3 years ago

Hi

I can`t find BarcodeStandard reference file

"The referenced component 'BarcodeStandard' could not be found."

Any Idea ?

binki commented 3 years ago

@HelloNewW

That is kind of a generic error which could have any number of different causes.

Are you able to share your solution somewhere so that we can look at it and check it out for any issues?

What .net runtime does your project target? Does it target an older version of .net framework? You may need to update it to target .net-4.7.2 or newer.

Did you install the reference using the Nuget package manager? You may need to try deleting the reference from Solution Explorer under References and then right-clicking your project, choosing “Manage NuGet Packages”, searching under Browse for BarcodeLib, and installing it through there.

HelloNewW commented 3 years ago

Hi,

I am using VS2013 try target to .net-4.7.2 or .net-4.8 latest runtime

My project https://file.io/SzNo3WqdKc6O

Installing 'BarcodeLib 2.2.10'. Successfully installed 'BarcodeLib 2.2.10'. Adding 'BarcodeLib 2.2.10' to BarcodeStandardExample. Uninstalling 'BarcodeLib 2.2.10'. Successfully uninstalled 'BarcodeLib 2.2.10'. Install failed. Rolling back... Could not install package 'BarcodeLib 2.2.10'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', 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.

Installing 'BarcodeLib 2.2.10'. Successfully installed 'BarcodeLib 2.2.10'. Adding 'BarcodeLib 2.2.10' to BarcodeStandardExample. Uninstalling 'BarcodeLib 2.2.10'. Successfully uninstalled 'BarcodeLib 2.2.10'. Install failed. Rolling back... Could not install package 'BarcodeLib 2.2.10'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.8', 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.

binki commented 3 years ago

@HelloNewW

Hi,

I am using VS2013

I would try VS2019 or at least VS2017 if that is an option. Older versions likely do not support the modern way of doing NuGet package installs well. Are you able to upgrade or do you need to use VS2013? I am not sure we have the resources to update the modern builds of BarcodeLib to support ancient build tools.

What version of the NuGet package manager extension do you have installed into VS? Maye you can run a more modern NuGet extension in the older VisualStudio, but that might not be supported either. The last release of the NuGet package manager for VS2013 was 2.12.0.817 in 2016. I haven’t fully researched, but I bet the 2.x version is prior to many improvements to NuGet and some of the changes that have been made to support modern things like .NETStandard.

Could not install package 'BarcodeLib 2.2.10'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', 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.

This error really sounds like you are using too old of a NuGet extension (which might be due to using too old of a Visual Studio). That version of NuGet doesn’t know that the NuGet package does run on .netfx-4.7.2, so it doesn’t even try the installation. Even if it did realize that, it is possible that it would install the NuGet package wrong.

HelloNewW commented 3 years ago

Hi,

Yes is true , NuGet package manager version 2.12.0.817. Then I will try to upgrade my VS version. Or maybe I will search an old solution that convert string to encode string of code 128 without the barcode image.

I really appreciate your comment and your time ... Thank you Nathan Phillip Brink

barnhill commented 3 years ago

Im pretty sure that VS2019 is free ...