简体   繁体   English

在源代码管理中存储Interop AxInterop dll

[英]storing Interop AxInterop dlls in source control

I have recently inherited a C# .NET solution in VS 2008, .NET framework 3.5, with many 3rd party dependencies including several on COM dlls. 我最近在VS 2008,.NET Framework 3.5中继承了C#.NET解决方案,其中包含许多第三方的依赖关系,其中包括一些关于COM dll的依赖关系。 I checked out the latest from the source control system and found I had to generate the Interop, AxInterop dlls in Visual Studio (adding references and adding them to the Toolbox and dragging them onto a dialog) for them to be properly referenced in the project and registered. 我从源代码控制系统中检出了最新版本,发现我必须在Visual Studio中生成Interop,AxInterop dll(添加引用并将它们添加到工具箱中并将它们拖到对话框中),以便在项目中正确引用它们。注册。 From that process it seems to work ok but the project is referencing these dlls in the /obj area which isn't in source control. 从该过程看来,它可以正常工作,但是项目正在/ obj区域中引用这些dll,而这些不在源代码管理中。

I was wondering, and maybe this is not sensible, is there a way you can create these AxInterop/Interop dlls and submit them to source control such that if I wanted to check out the solution onto a new computer I wouldn't have to recreate these files (because they are stored in the obj area). 我想知道,也许这不明智,有没有办法创建这些AxInterop / Interop dll并将其提交给源代码管理,这样,如果我想在新计算机上签出解决方案,就不必重新创建这些文件(因为它们存储在obj区域中)。 I'd like to avoid having the obj area in source control because of all the other unnecessary files in it. 我想避免在源代码管理中包含obj区域,因为其中包含所有其他不必要的文件。

I tried copying the dlls to a source controled directory and creating references to these (AX)interop dlls but that creates a slightly different version of the dlls which causes other issues (eg errors saying a component isn't registered). 我尝试将dll复制到源代码控制的目录并创建对这些(AX)interop dll的引用,但这会导致dll的版本稍有不同,从而导致其他问题(例如错误,指出未注册组件)。

I hope that makes sense and thanks for any help! 我希望这是有道理的,感谢您的帮助!

the Toolbox and dragging them onto a dialog).... 工具箱并将其拖动到对话框中。...

Seems like your build process is currently dependent on the GUI. 似乎您的构建过程当前依赖于GUI。 Removing this dependency should help you a lot. 消除这种依赖性将对您有很大帮助。


Since you have to create these dll files and the process works its better you add these files to source control. 由于您必须创建这些dll文件,并且该过程可以更好地工作,因此请将这些文件添加到源代码管理中。 I am not sure why you are adverse to adding the obj folder to version control. 我不确定为什么您不利于将obj文件夹添加到版本控制中。 Even if there are temporary files getting created in the directory how does that going to affect your version controlled files? 即使在目录中创建了临时文件,这也会如何影响版本控制的文件?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM