安装Visual Studio设置项目后,DLL无法正常工作
我有一个我正在创建的C#项目,该项目使用了项目中单独文件夹中的一些DLL。我已经在安装程序项目中的文件系统查看器上的应用程序文件夹中添加了这些文件。 一切似乎都可以正常工作,它可以正确地构建,并且没有显示任何大错误。
但是,在我尝试安装应用程序后,它比应有的要小(8.24 MB,而400 MB超过400 MB)。我相信,当我尝试打开Microsoft Azure Kinect摄像头时,就会出现问题。当我这样做时,错误会弹出一个错误。这对我来说很奇怪,因为该程序在Visual Studio中的调试模式下运行良好,这意味着相机已正确插入并可以正常工作。
我比较了顾问制作的工作旧版本中的一些DLL文件(他们创建了一个在我的计算机上工作正常的安装程序)。这些DLL的文件大小截然不同。
供参考: 文件尺寸差异
我尝试重新删除安装程序,删除和重新添加DLL,并覆盖DLL,并覆盖dlls安装后,较大的文件进入我的应用程序。我在计算机上下载了Kinect的SDK。我也不是这台计算机的管理员,因为它不是我的个人计算机。另一个注意事项是,顾问的安装程序工作正常,但是当我尝试下载安装程序来自的源代码并尝试从那里安装它时,也会发生同样的问题。
顾问用来创建安装程序的视频是: https://youtu.be/6mfp2exmvni 我也遵循本教程,但同样的问题。
I have a C# project that I am creating which uses a few DLLs located in a separate folder in my project. I have added these files into the application folder on the file system viewer in the installer project.
Everything seems to work fine, it builds properly and doesn't show any big errors.
However, after I try to install my application, it is way smaller than it should be (8.24 MB compared to over 400 MB). I believe the issue arises when I try to open the Microsoft Azure Kinect camera. An error pops up when I do this saying the device could not be opened. This is strange to me because the program runs just fine in debug mode in Visual Studio, meaning the camera is plugged in properly and works.
I compared some of the DLL files from a working, older version that a consultant had made (they created an installer that works fine on my computer). The file sizes were drastically different for these DLLs.
For reference:
File Size Differences
I have tried redoing the installer, deleting and re-adding the DLLs, and overwriting the bigger files into my application after installation. I have the SDKs for the Kinect downloaded on my computer. I am also not an administrator for this computer as it is not my personal computer. Another note, the installer from the consultant works fine, however when I try to download the source code that installer came from and try to install it from there, the same issue happens.
The video the consultant used to create the installer is this: https://youtu.be/6Mfp2EXmVNI
I followed this tutorial as well, but same issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我上面的评论的摘要
,因此您似乎正在使用Git大文件系统(LFS)。您目前只有占位符文件。使用git lfs repo a git plut只能抓住非LFS文件,同时将占位符文件提供其他所有内容。您需要告诉Git LFS实际下载它们。
尝试:
一些GIT GUI客户会自动为您执行此操作。
OP:
顺便说一句,如果这些文件本质上是静态的,则考虑将它们添加到git中作为非LFS文件,那么您可以像git repo中的任何其他文件一样抓住它们。如果文件将更改合理的次数,那么LFS才是“有用的”,然后您必须问自己真的值得。
另请参见
This is a summary of my comments above
So it looks like you are using Git Large File System (LFS). You currently only have placeholder files. With a Git LFS repo a git pull only grabs non-LFS files whilst leaving placeholder files for everything else. You need to tell Git LFS to actually download them proper.
Try:
Some Git GUI clients will do this for you automatically.
OP:
BTW, if these files are essentially static consider adding them to Git as non-LFS files then you can grab them like any other files in your Git repo. LFS is only "useful" if the files will be changing a reasonable number of times and then you have to ask yourself is it really worth it.
See also