VS 2013 看不到我的自定义签入策略 [英] VS 2013 doesn't see my custom check-in policies
问题描述
我有通过 VSIX 部署的自定义签入策略.现在我正在尝试在 Visual Studio 2013 中使用它们.
I have custom check-in policies deploying via VSIX. Now I'm trying to use them in Visual Studio 2013.
我做了什么:我在 VS 2013 中打开了我的策略.将 vsixmanifest 中的安装目标"更改为 [10.0, 13.0).然后构建项目,安装VSIX并打开两个VS.
What I did: I opened my policies in VS 2013. Changed "Install Targets" in vsixmanifest to [10.0, 13.0). Then built project, installed VSIX and opened both VS.
VSIX 项目使用 .NET Framework 4.5,策略项目使用 4.0.
VSIX project uses .NET Framework 4.5, policies project uses 4.0.
我有什么:
- 我在
C:\Users\...\AppData\Local\Microsoft\VisualStudio\12.0Exp\Extensions
目录中的最新版本策略 C:\Users\...\AppData\Local\Microsoft\VisualStudio\11.0(和 12.0)\Extensions 中 2012 和 2013 VS 的策略副本
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config(and 12.0_Config)\TeamFoundation\SourceControl\Checkin Policies
- Last version of my policies in
C:\Users\...\AppData\Local\Microsoft\VisualStudio\12.0Exp\Extensions
directory - Copies of policies for both 2012 and 2013 VS in
C:\Users\...\AppData\Local\Microsoft\VisualStudio\11.0(and 12.0)\Extensions
- Key with path to policies in registry for both VS in
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config(and 12.0_Config)\TeamFoundation\SourceControl\Checkin Policies
现在,当我想在 Team Project Settings 中应用它们时 ->源代码管理 ->入住政策 ->添加
,我可以在 VS 2012 中选择我的自定义策略,但 VS 2013 只是看不到它们.
Now, when I want to apply them in Team Project Settings -> Source Control -> Check-in Policy -> Add
, I can choose my custom policies in VS 2012, but VS 2013 just doesn't see them.
我能做些什么来修复它?
What can I do to fix it?
UPD:
因此,我通过将 Microsoft.TeamFoundation.VersionControl.Client
的程序集版本从 11.0 更改为 12.0 解决了我的问题和政策项目中的 .NET Framework 版本从 4.0 到 4.5
So, I solved my problem by changing assembly version of Microsoft.TeamFoundation.VersionControl.Client
from 11.0 to 12.0
AND
.NET Framework version in policies project from 4.0 to 4.5
推荐答案
正如原始海报发布的那样,.NET 和引用的客户端对象模型的版本:
As the Original Poster has posted, the version of .NET and of the referenced Client Object Model:
- 对于 Visual Studio 2005,您需要引用
8.0.0.0
程序集,并且您的项目必须是 AnyCPU .NET 2.0 项目. - 对于 Visual Studio 2008,您需要引用
9.0.0.0
程序集,并且您的项目必须是 AnyCPU .NET 3.0 项目. - 对于 Visual Studio 2010,您需要引用
10.0.0.0
程序集,并且您的项目必须是 AnyCPU .NET 4.0 项目. - 对于 Visual Studio 2012,您需要引用
11.0.0.0
程序集,并且您的项目必须是 AnyCPU .NET 4.0 项目. - 对于 Visual Studio 2013,您需要引用
12.0.0.0
程序集,并且您的项目必须是 AnyCPU .NET 4.5 项目. - 对于 Visual Studio 2015,您需要引用
14.0.0.0
程序集,并且您的项目必须是 AnyCPU .NET 4.6 项目.
- For Visual Studio 2005, you need to reference the
8.0.0.0
assemblies and your project must be an AnyCPU .NET 2.0 project. - For Visual Studio 2008, you need to reference the
9.0.0.0
assemblies and your project must be an AnyCPU .NET 3.0 project. - For Visual Studio 2010, you need to reference the
10.0.0.0
assemblies and your project must be an AnyCPU .NET 4.0 project. - For Visual Studio 2012, you need to reference the
11.0.0.0
assemblies and your project must be an AnyCPU .NET 4.0 project. - For Visual Studio 2013, you need to reference the
12.0.0.0
assemblies and your project must be an AnyCPU .NET 4.5 project. - For Visual Studio 2015, you need to reference the
14.0.0.0
assemblies and your project must be an AnyCPU .NET 4.6 project.
如果安装了多个版本的 Visual Studio,则需要多次部署程序集,每个版本的 Visual Studio 部署一次.这些程序集必须具有相同的 AssemblyName
和相同的 AssemblyVersion
,并使用相同的强名称进行签名.
If you have multiple versions of Visual Studio installed, you need to deploy the assembly multiple times, once for each version of Visual Studio. These assemblies must have the same AssemblyName
and the same AssemblyVersion
and be signed with the same strong name.
每个策略都必须在注册表中的以下项下注册:
The policies must each be registered in the registry under the following keys:
HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\{VisualStudioVersion}\TeamFoundation\SourceControl\Checkin Policies
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\{VisualStudioVersion}\TeamFoundation\SourceControl\Checkin Policies
(仅限 64 位操作系统)HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{VisualStudioVersion}_Config\TeamFoundation\SourceControl\Checkin Policies
(应通过运行devenv/setup
自动添加)
HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\{VisualStudioVersion}\TeamFoundation\SourceControl\Checkin Policies
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\{VisualStudioVersion}\TeamFoundation\SourceControl\Checkin Policies
(64 bit OS only)HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{VisualStudioVersion}_Config\TeamFoundation\SourceControl\Checkin Policies
(should be added automatically by runningdevenv /setup
)
这篇关于VS 2013 看不到我的自定义签入策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!