T4MVC 对便携式区域的支持

发布于 2025-01-02 04:59:05 字数 348 浏览 2 评论 0原文

T4MVC.Settings 文件中的这是什么意思:

// You can list folders containing portable areas here
readonly string[] PortableAreas = new string[] {
    ""

“您可以在此处列出包含可移植区域的文件夹”是什么意思?

我们知道可移植区域是作为单独的项目/程序集实现的,并通过“添加引用”引入使用项目,因此我不太明白这些文件夹的含义。

我认为这意味着当 T4MVC 在区域内使用时,我们必须为可移植区域提供区域文件夹名称,但它不起作用。 T4MVC 不会生成任何内容。

What does this in T4MVC.Settings file mean:

// You can list folders containing portable areas here
readonly string[] PortableAreas = new string[] {
    ""

What does it mean "You can list folders containing portable areas here"?

We know that Portable Areas are implemented as separate projects/assemblies and brought in the consuming project via Add Reference so I don't quite understand what is meant with these folders.

I was thinking it means that we have to provide the area folder name for the Portable Area when T4MVC is being used within the area but it doesn't work. Nothing gets generated by T4MVC.

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

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

发布评论

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

评论(1

落在眉间の轻吻 2025-01-09 04:59:05

我对便携式区域功能不太熟悉,这个 T4MVC 功能是由其他人贡献的。如果您查看 T4MVC.tt,您会发现它的作用非常简单:它以与处理常规 MVC 区域相同的方式处理数组中指定的文件夹。

以下是贡献者在做出更改时所写的内容:

我稍微修改了 T4MVC 模板和设置来使用此功能(对我来说,更改似乎相当简单)。您能否检查一下补丁,如果可以的话可以应用到项目中吗? (或者用几句话告诉我有什么问题)

它在可移植区域项目和主 MVC 项目中都对我有用。

所以我认为想法是直接在可移植区域项目中使用T4MVC.tt。如果需要,我可以为您联系贡献者,他可能对此有更多要说的。

I'm not super familiar with the Portable Area feature, and this T4MVC feature was contributed by someone else. If you look at T4MVC.tt, what it does is fairly straightforward: it processes the folders specified in the array the same way it processes regular MVC areas.

Here is what the contributor had written at the time he made the change:

I've modified T4MVC template and settings a little bit to consume this feature (the change seem rather simple for me). Could you please review the patch and if it's ok apply to the project? (or tell me in a couple of words what's wrong with it)

It worked for me both from the portable area project and the main MVC project.

So I think the idea is to use T4MVC.tt in the portable area project directly. If needed, I can hook you up with the contributor, who may have more to say about it.

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