简体   繁体   English

Team Foundation Server:自定义签入策略在VS2010中起作用,但在VS2008中不起作用

[英]Team Foundation Server: Custom check-in policy working in VS2010 but not VS2008

We've got a server with Team Foundation Server 2008 installed on it. 我们已经在服务器上安装了Team Foundation Server 2008。 Clients using Visual Studio 2008 and Visual Studio 2010 connect to it. 使用Visual Studio 2008和Visual Studio 2010的客户端连接到它。 I've written a custom check-in policy for TFS which is working as expected in VS2010 but not in VS2008. 我已经为TFS编写了自定义的签入策略,该策略在VS2010中可以正常工作,但在VS2008中却无法正常工作。

I originally developed it in VS2010 but had some issues getting it working. 我最初是在VS2010中开发的,但是在使其工作时遇到了一些问题。 To rule out problems with my custom policy, I recreated the Solution and Project in VS2008 (as I had a working sample in VS2008). 为了排除自定义策略的问题,我在VS2008中重新创建了解决方案和项目(因为在VS2008中有一个工作示例)。

Once developed, I then tried setting it in VS2010 but had some issues. 开发完成后,我尝试在VS2010中进行设置,但遇到了一些问题。 I found this posting by Grant Smith (http://connect.microsoft.com/VisualStudio/feedback/details/553740/vs-2008-tfs-checkin-policies-fail-to-load-with-vs-2010) who suggested to change the binding redirects for VS2010. 我发现了格兰特·史密斯(http://connect.microsoft.com/VisualStudio/feedback/details/553740/vs-2008-tfs-checkin-policies-fail-to-load-with-vs-2010)的这篇帖子,他建议更改VS2010的绑定重定向。 This resolved the problem and policy is now working fine for it. 这样就解决了问题,并且政策现在可以正常工作了。

However, it is not working for VS2008. 但是,它不适用于VS2008。 When I try to check-in any code it says: "TF10139: The following check-in policies have not been satisfied. Internal error in My Custom Checkin Policy". 当我尝试签入任何代码时,它说:“ TF10139:以下签入策略未满足。我的自定义签入策略中的内部错误”。

When I try to change the settings for the policy, it gives me an error saying: "Error loading the My Custom Checkin Policy policy (The policy assembly 'MyCheckinPolicy, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not registered.). Installation instructions:". 当我尝试更改该策略的设置时,它给我一个错误消息:“加载“我的自定义签入策略”策略时出错(策略程序集“ MyCheckinPolicy,版本= 1.0.0.0,区域性=中性,PublicKeyToken = null”不是已注册。)。安装说明:”。

Even though it says "Installation instructions:" at the end of the error message, nothing else is displayed. 即使在错误消息的末尾显示“安装说明:”,也不会显示其他任何内容。

Does anyone know why this may be happening. 有谁知道为什么会这样。

TIA TIA

You will likely find that your policy will work with vs2010 if you reference the v10.xxx client dlls and vs2008 if you reference the v9.xxx dlls. 如果您引用v10.xxx客户端dll,则可能会发现策略适用于vs2010;如果引用v9.xxx dll,则策略将适用于vs2008。

I have not found a way to have a single policy dll that works with both but I have found that if I compile the dll twice (once for each VS) I can install both dlls on my system and then modify the Checkin Policies registry entry so that each VS points to the correct dll. 我还没有找到一种可以同时使用两者的策略dll的方法,但是我发现如果将dll编译两次(每个VS一次),则可以在系统上安装两个dll,然后修改Checkin Policies注册表项,因此每个VS指向正确的dll。

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

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