简体   繁体   English

添加对Travis-CI构建的缺失引用

[英]Adding a missing reference to Travis-CI build

I'm working on a program that uses a Dymo labelwriter 450, using a custom reference to interact with it from my c# program. 我正在开发一个使用Dymo标签打字机450的程序,使用自定义引用从我的c#程序中与它进行交互。 I'm using DYMO.Label.Framework 我正在使用DYMO.Label.Framework

When I sync with GitHub and Travis tries to test the software, it can't compile because it's missing a reference. 当我与GitHub同步并且Travis尝试测试软件时,它无法编译,因为它缺少引用。 error CS0246: The type or namespace name 'DYMO' could not be found. Are you missing an assembly reference?

I made sure to add the DLL to the project directory and reference it from the project using a relative path. 我确保将DLL添加到项目目录中,并使用相对路径从项目中引用它。

Is there something I need to add to the travis config? 我需要添加到travis配置吗? I can't find the package on NuGet. 我在NuGet上找不到包。

Thanks. 谢谢。

Travis works fine with references, even nuget packages are actually referenced by relative path. Travis适用于引用,甚至nuget包实际上都是通过相对路径引用的。 Make sure your dll is pushed to github and saved to the right place. 确保你的dll被推送到github并保存到正确的位置。 Project directory (not bin or something) should be the basis of relative path. 项目目录(不是bin或其他东西)应该是相对路径的基础。 One more thing to note -- path strings are case-sensitive as travis works on mono. 还有一点需要注意 - 路径字符串区分大小写,因为travis适用于单声道。

References like this worked for me: 像这样的参考资料对我有用:

<Reference Include="Nustache.Core">
  <HintPath>..\..\Tools\Rosalia\Nustache.Core.dll</HintPath>
</Reference>

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

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