无需安装即可使用 msbuild 社区任务

发布于 2024-08-30 03:29:06 字数 296 浏览 9 评论 0原文

在我们的开发环境中,没有用户拥有管理权限。因此,如果没有管理员权限,就无法安装 MSBuild.CommunityTasks。

我想知道与 NAnt 类似,即是否可以将文件包含在解决方案目录中,然后从那里引用它?这样,用户是否安装了它并不重要,当他们签出最新代码时,msbuild 社区文件将随之而来,并且解决方案将构建。

\SolutionDir\{solution}.sln
\SolutionDir\Project\{files}
\SolutionDir\MSBuild.Community\files

In our developer environment, no users have administration rights. As such, it's not possible to install MSBuild.CommunityTasks without getting admin to do so.

What I'm wondering is similar to NAnt, i.e. is it possible to include the files in your solution directory, and just reference it from there? This way, will not matter if the person has it installed, when they checkout latest code, the msbuild community files will come with, and solution will build.

\SolutionDir\{solution}.sln
\SolutionDir\Project\{files}
\SolutionDir\MSBuild.Community\files

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

胡大本事 2024-09-06 03:29:07

是的,你可以。只需提取文件并将其放置在某个位置,然后使用 MSBUILD IMPORT 来提取它们在项目文件中。您需要导入目标文件。

Yes you can. Just extract the files and place them somewhere and then use MSBUILD IMPORT to pull them in the project file. You'll need to import the targets files.

被你宠の有点坏 2024-09-06 03:29:07

Preet的答案很正确,但使用导入存在一些复杂性。
为了使导入正常工作,我需要遵循答案 由 Tom 概述。

具体来说,

<PropertyGroup>
  <MSBuildCommunityTasksPath>location of community files</MSBuildCommunityTasksPath>
</PropertyGroup>

<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets"/>

这设置了目标文件的路径。

Preet's answer is spot on, but there are some complexities in using the import.
In order to get the import to work properly, I needed to follow the answer outlined by Tom.

Specifically,

<PropertyGroup>
  <MSBuildCommunityTasksPath>location of community files</MSBuildCommunityTasksPath>
</PropertyGroup>

<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets"/>

This sets up the path for the targets file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文