避免 Visual Studio 2010 中 MSBuild 社区任务的本地依赖性
我正在尝试开始利用 MSBuild Community Tasks
,因此在安装 .msi
包后,我导入了 MSBuild.Community.targets
> 在
元素中这样:
<Import Project="lib\MSBuild.Community.Tasks.targets" />
有趣的是,我注意到这样的文件引用了 MSBuildExtensionsPath
中的本地安装路径,并给出了代替保留代码的信息依赖关系尽可能干净我愿意支付每个项目的分发/版本控制的开销,我想知道是否有可能使用 中与项目相关的位置覆盖默认/安装位置。 cproj 文件?
实际布局如下:
Dotnet.Samples.Foobar
\src
Foobar.cs
\lib
MSBuild.Community.Tasks.targets
MSBuild.Community.Tasks.dll
任何指导将不胜感激。非常感谢您想要分享的任何建议。
I'm trying to start taking advantage of the MSBuild Community Tasks
so right after installing the .msi
package I've imported MSBuild.Community.targets
within the <Project>
element this way:
<Import Project="lib\MSBuild.Community.Tasks.targets" />
Interestingly I've noticed such file have a reference to the local installation path in MSBuildExtensionsPath
and given that in lieu of keeping code dependencies as clean as possible I'm willing to pay the overhead of distributing/versioning them with every project, I was wondering if is it possible to sort of override the default/installation location with a project-relative one in the .cproj
file?
The actual layout would be like:
Dotnet.Samples.Foobar
\src
Foobar.cs
\lib
MSBuild.Community.Tasks.targets
MSBuild.Community.Tasks.dll
Any guidance will be sincerely appreciated. Thanks much in advace for any suggestion you might want to share.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在MSBuild.Community.Tasks.targets中指定了dll的路径。
您可以覆盖项目中的路径。
并使导入保持不变:
In MSBuild.Community.Tasks.targets specified the path to the dll.
You can override the path in the project.
And leave import the same: