I have my windows forms application with WindowsAPICodePack
but i don't know where should I put the package in the release folder, and without it the program just gives me an error (it's in Hungarian so I don't think anybody can understand, but it said that it can't find the windowsAPICodePack
, the version number, culture and publickeytoken) on another PC, on mine it works.

- 13
- 3
-
Are you using a msi or msix project for packaging your application) – SoftwareCarpenter Dec 25 '19 at 15:45
-
No, is this the problem? – baggett Dec 25 '19 at 15:52
-
It depends without more information. If your planning to distribute your application then yes it will package up all dependencies needed by your application and install them where needed. However, if your just building your application and receiving this error then another solution is need. – SoftwareCarpenter Dec 25 '19 at 15:56
-
It's a school project, I'm gonna take it on a pendrive to school (I can't isntall anything there) – baggett Dec 25 '19 at 16:00
-
I've got this error when I test on another computer – baggett Dec 25 '19 at 16:43
-
Then build and set output property to your usb drive. See answer to figure out where your application is looking for package then change to your usb drive . – SoftwareCarpenter Dec 25 '19 at 16:58
-
what error? are you able to get the app to run locally? – SoftwareCarpenter Dec 25 '19 at 17:16
-
yes it works on my PC but when i'm tring to use it on another pc it gives me an error(I can send it but it's hungarian,or i can send the program) – baggett Dec 25 '19 at 17:19
-
If this is just a school project then just remove all NuGet packages references and find the dll . Then just add reference to dll and check the property to include in output . This will give you a simple folder with all the files needed to run you app from pendrive – SoftwareCarpenter Dec 25 '19 at 17:27
-
Can you mark answer please ... glad it worked – SoftwareCarpenter Dec 25 '19 at 17:49
-
Should i press the accept answer below this? – baggett Dec 25 '19 at 17:49
-
Yes. I will update answer with last comment . Thanks – SoftwareCarpenter Dec 25 '19 at 17:55
1 Answers
Depending on if your application is using a packages.config file to manage packages or if your project is using package references (PackageReference) will determine path to solution.
When a package is installed it records the package identifier and version into the project file or packages.config file in your solution workspace.
- If using a package.config to mange packages then ensure your packages are getting installed in the location as expected, possibly clearing the cache will help to ensure proper version is installed.
- find out the packages folder where your application is trying to load the references.
- Possibly config binding redirects.
- Clear you package cache and reinstall. use the package manager ui for your ‘debug’ and ‘release’ MSBuild configs to ensure the package is being referenced correctly.
- Verify your nuget.xml settings file for locations of packages
- Read all the version or property values to use for your application. Ensure you are configuring the release target as expected.
Here are some links to help you config the correct setup for your approach:
Package reference via project files
if using - Packages.config settings
Config setting for Nuget NuGet settings
Note: for simplicity if this is just a school project then just remove all NuGet packages references and find the dll . Then just add reference to dll and check the property to include in output . This will give you a simple folder with all the files needed to run your app from pen-drive

- 3,835
- 3
- 25
- 37