Code Contract Tab Missing
-
miércoles, 15 de febrero de 2012 19:57
I have installed, reinstalled rebooted etc, etc. The code contract tab is not present in my c# project properties page. VS2010 premium 64 bit windows pro. I also have resharper 6.0 and productivity power tools loaded. I am unable to use code contracts because of this any suggestion for turning on Static and runtime checking without the property page.
Thanks Jeff
Todas las respuestas
-
miércoles, 15 de febrero de 2012 21:27
Hi,
What kind of C# project is it?
Can you repro with a new empty project? If so, please post the .csproj file's contents and I'll try to repro.
- Dave
- Editado Dave Sexton miércoles, 15 de febrero de 2012 21:28 Grammar
-
miércoles, 15 de febrero de 2012 21:36
Dave,
Thanks for such a quick response. It fails on all project types. This was a new windows form project with nothing added.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DB4442E2-69EE-4FEF-93D1-6BDB9F60E0C8}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WindowsFormsApplication1</RootNamespace>
<AssemblyName>WindowsFormsApplication1</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>Thanks Jeff
Jeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
-
miércoles, 15 de febrero de 2012 22:05
Hi Jeff,
Looks fine, so I can't explain it. Maybe the CC team will be able to help.
For now, you can try adding the following element to the first PropertyGroup. Note that 1 = "Standard Contract Requires", so I assume that the default value is 0. Check the Contracts User Manual for more info.
<CodeContractsAssemblyMode>1</CodeContractsAssemblyMode>
Add the following elements to each of the configuration-specific PropertyGroup elements. The Properties window edits these elements depending upon the current solution configuration (e.g., Debug or Release). This should get the CC tools running for you when building.
<CodeContractsEnableRuntimeChecking>True</CodeContractsEnableRuntimeChecking> <CodeContractsRuntimeOnlyPublicSurface>False</CodeContractsRuntimeOnlyPublicSurface> <CodeContractsRuntimeThrowOnFailure>False</CodeContractsRuntimeThrowOnFailure> <CodeContractsRuntimeCallSiteRequires>False</CodeContractsRuntimeCallSiteRequires> <CodeContractsRuntimeSkipQuantifiers>False</CodeContractsRuntimeSkipQuantifiers> <CodeContractsRunCodeAnalysis>True</CodeContractsRunCodeAnalysis> <CodeContractsNonNullObligations>True</CodeContractsNonNullObligations> <CodeContractsBoundsObligations>True</CodeContractsBoundsObligations> <CodeContractsArithmeticObligations>True</CodeContractsArithmeticObligations> <CodeContractsEnumObligations>True</CodeContractsEnumObligations> <CodeContractsRedundantAssumptions>True</CodeContractsRedundantAssumptions> <CodeContractsRunInBackground>True</CodeContractsRunInBackground> <CodeContractsShowSquigglies>True</CodeContractsShowSquigglies> <CodeContractsUseBaseLine>False</CodeContractsUseBaseLine> <CodeContractsEmitXMLDocs>False</CodeContractsEmitXMLDocs> <CodeContractsCustomRewriterAssembly /> <CodeContractsCustomRewriterClass /> <CodeContractsLibPaths> </CodeContractsLibPaths> <CodeContractsExtraRewriteOptions /> <CodeContractsExtraAnalysisOptions /> <CodeContractsBaseLineFile /> <CodeContractsCacheAnalysisResults>True</CodeContractsCacheAnalysisResults> <CodeContractsRuntimeCheckingLevel>Full</CodeContractsRuntimeCheckingLevel> <CodeContractsReferenceAssembly>Build</CodeContractsReferenceAssembly> <CodeContractsAnalysisWarningLevel>0</CodeContractsAnalysisWarningLevel>
- Dave
http://davesexton.com/blog
-
jueves, 16 de febrero de 2012 21:57
Dave,
Tried you suggestion above with no success. The project file loads in the solution ok. - no errors but
Contract.Requires(document != null, "document cannot be null"); is still grayed out with "Method will be skipped ..."
Thanks Jeff
Jeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
-
jueves, 16 de febrero de 2012 23:57
Hi Jeff,
Does the output window show anything related to Code Contracts when you build? You may want to post the entire output here.
Neither Visual Studio or C# generates that warning, so you must have an extension installed. Perhaps ReSharper? Maybe you should try disabling it in case it conflicts with Code Contracts.
Where is Visual Studio installed on your computer? For example, mine is here:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
Where is Code Contracts installed on your computer? Mine is here:
C:\Program Files (x86)\Microsoft\Contracts\
Does the following file exist? If not, then it would seem that Code Contracts isn't installed properly.
C:\Program Files (x86)\MSBuild\4.0\Microsoft.Common.targets\ImportAfter\CodeContractsAfter.targets
- Dave
http://davesexton.com/blog
-
sábado, 18 de febrero de 2012 22:00
Hi,
As I posted in another thread I have a similar issue. The tab doesn't show up, my csproj file looks the same, adding the elements to configuration enables static checking upon build. I still however would like the Code Contracts tab to be in the properties and have it work without manually changing the configuration file, because it's really cumbersome and it's not really working as intended.
-
domingo, 19 de febrero de 2012 0:54
Hi,
Can you confirm whether your installation paths are the same as the ones that I posted previously?
Also, can you confirm whether the following registry keys exist on your computer? I found these on mine and I can see the tab.
(Note: Exclude the Wow6432Node key if you have a 32 bit OS.)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\CodeTools\CodeContracts\PropertyPages\{1F89CA21-E885-439d-92F5-C36ABE518593}\
- Default={Empty}
- category=ConfigPropertyPages
- clsid={6962fc39-92c8-4e9b-9e3e-4a52d08d1d83}
Projects\
- Default={Empty}
- {FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}=CSharp
- VisualBasic={Empty}
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Projects\{F184B08F-C81C-45f6-A57F-5ABD9991F28F}\ConfigPropertyPages\{1f89ca21-e885-439d-92f5-c36abe518593}\
- Default=Microsoft Code Contracts Property Page
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}\ConfigPropertyPages\{1f89ca21-e885-439d-92f5-c36abe518593}\
- Default=Microsoft Code Contracts Property Page
HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{6962FC39-92C8-4e9b-9E3E-4A52D08D1D83}\InProcServer32\
- Default=C:\Windows\SysWOW64\mscoree.dll
- Assembly=CodeContractsVSPropertyPane, Version=1.4.50126.1, Culture=neutral
- Class=Microsoft.Contracts.VisualStudio.PropertyPane
- CodeBase=C:\Program Files (x86)\Microsoft\Contracts\Bin\CodeContractsVSPropertyPane.dll
- ThreadingModel=Both
Curiously, I also have the following key containing $Installed that pretty much duplicates the first key's subkeys and values, but it seems like a strange name for a key.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\CodeTools\$Installed\CodeContracts
- Dave
http://davesexton.com/blog
-
domingo, 19 de febrero de 2012 9:48
Hi,
The paths are the same except I'm running Windows XP 32 bit and I have Program Files instead of Program Files (x86).
The first key's clsid is the same except it's in upper-case.
The third key is missing.
The fourth key is there, in upper case again.
The $installed key is also there.
-
domingo, 19 de febrero de 2012 12:23
Hi,
Exactly which key is missing?
If it's one of the project keys then that might explain why you aren't seeing a tab; although, it doesn't explain why the installer didn't add the key.
- Dave
http://davesexton.com/blog
-
domingo, 19 de febrero de 2012 14:41
Hi,
It was this one:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}\ConfigPropertyPages\{1f89ca21-e885-439d-92f5-c36abe518593}\
- Default=Microsoft Code Contracts Property Page
I tried to add it manually but unfortunately it didn't help
-
domingo, 19 de febrero de 2012 15:26
Hi,
Interesting, that key's for C# projects. If the key before it containing F184B08F-C81C-45F6-A57F-5ABD9991F28F is in your registry then try creating a VB project just to see if the Code Contracts tab appears.
If you added the key for C# and it didn't help, did you remember to omit the Wow6432Node key? Also, did you restart Visual Studio after adding the key? You may want to try rebooting as well, just in case.
- Dave
- Editado Dave Sexton domingo, 19 de febrero de 2012 15:27 Correction: Node = key
-
domingo, 19 de febrero de 2012 15:46
Hey,
Unfortunately creating a new project, restarting VS, rebooting PC, none of that made the tab visible. I did omit the Wow6432Node and still nothing. Just curious, are the keys case-sensitive?
-
domingo, 19 de febrero de 2012 17:12
Hi,
It's probably case-insensitive but I don't know for sure.
Did you try creating a VB project? If a tab doesn't show up for VB either then the problem is related to more than just the missing C# key (though that would seem to be true anyway based on your tests).
- Dave
http://davesexton.com/blog
-
domingo, 19 de febrero de 2012 17:18
Hi,
Sorry I've misread VB as VS. I've created a VB project and in fact there is a Code Contracts tab present.
-
domingo, 19 de febrero de 2012 19:01
Hi Septemptus,
I'm assuming that you're using the latest installer available here, correct? Have you installed any older versions of Code Contracts previously? If so, try uninstalling all versions and then check the install paths and reg keys to make sure they are actually removed. If they aren't, then I suggest removing them yourself (carefully!).
Also, if you've used previous releases of Code Contracts, did the Contracts tab ever show up?
I just looked at the installer in Orca but nothing jumped out at me as an obvious problem. I did notice that the missing reg key is marked as transitive, but I'm not sure whether that could cause a problem like this.
- Dave
http://davesexton.com/blog
-
domingo, 19 de febrero de 2012 19:34
Hey,
I have used this installer only. I mentioned in another thread that the only thing that I think may have caused it was installing Code Contracts on Visual C# Express, then installing VS Ultimate on top of it, removing Code Contracts and installing them again. I have never seen the Code Contracts tab in the properties panel of C# projects.
I'll try uninstalling CC again and look for any rogue registry keys and reinstall, though honestly I'm stripped of any hope at this moment.
-
domingo, 19 de febrero de 2012 19:54
Hi,
If you run the .msi with logging enabled, that may help to shed some light on the problem. For example:
Contracts.devlab9ts.msi /lv* cc.log
The first thing I'd do is search for the section where registry entries are installed to see if any reasons are logged for the C# key being omitted. Here's the associated record from the Registry Table:
regBFF359B95E28003C67EF0478F5F61943 2 Software\Microsoft\VisualStudio\10.0\CodeTools\CodeContracts\PropertyPages\{1F89CA21-E885-439d-92F5-C36ABE518593}\Projects {FAE04EC0-301F-11d3-BF4B-00C04F79EFBC} CSharp VS10PackageRegistryComponent- Dave
- Editado Dave Sexton domingo, 19 de febrero de 2012 19:56 Formatted
-
lunes, 20 de febrero de 2012 11:23
Hey Dave,
This comes from the log about the key you mentioned:
MSI (s) (C0:20) [12:05:53:812]: Executing op: RegOpenKey(Root=-2147483646,Key=Software\Microsoft\VisualStudio\10.0\CodeTools\CodeContracts\PropertyPages\{1F89CA21-E885-439d-92F5-C36ABE518593}\Projects,,BinaryType=0,)
MSI (s) (C0:20) [12:05:53:812]: Executing op: RegAddValue(Name={FAE04EC0-301F-11d3-BF4B-00C04F79EFBC},Value=CSharp,)
WriteRegistryValues: Key: \Software\Microsoft\VisualStudio\10.0\CodeTools\CodeContracts\PropertyPages\{1F89CA21-E885-439d-92F5-C36ABE518593}\Projects, Name: {FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}, Value: CSharpI've also looked for any mention of the key that I was missing, it's not in the log.
I'll be honest though I don't really know what I'm looking for exactly, so if you'd like I can provide the whole registry part of the log.
-
lunes, 20 de febrero de 2012 11:28
The funny thing is, now I do have a Code Contracts tab in my propery pages!
Though I do not know if that's what caused it, because I believe I have had some visual studio updates going on overnight. So if that was the cause then I am terribly sorry for taking your time, and thank you for all the help!
-
lunes, 20 de febrero de 2012 12:26
Hi,
I hadn't even considered VS being out of date. Did you just install SP1 or did you already have it before you reported this issue?
- Dave
http://davesexton.com/blog
-
lunes, 20 de febrero de 2012 12:51I have had SP1, but the updates that installed were ones that followed the SP1 release I think, I remember there were some security updates in the bulk but didn't pay too much attention to it.
-
miércoles, 22 de febrero de 2012 20:15
Dave,
Sorry, been off a couple of days skiing. :) I tried all the things mentioned above. I did have two keys missing, which I inserted manually.
I inserted this key.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}\ConfigPropertyPages\{1f89ca21-e885-439d-92f5-c36abe518593}\
- Default=Microsoft Code Contracts Property Page
I also have the $Installed key as well expect my category key was empty. I set it to ConfigPropertyPages.
I checked for updates but none were required.
I uninstalled CC and re-installed
I disabled all VS Extension and Resharper. It now appears the Code contracts are being processed. (They are no longer greyed out even after I re-enabled Resharper) But, I still do not have a CC tab.
I do have the CC tab on VB projects.
I have reboot, blah , blah, etc.
I did have a version of Ultimate installed prior to this installation of Premium. (it was previously loaded and I realized my MSDN subscription did not give me Ultimate, so I unloaded it and installed premium.)
Any additional ideas would be appreciated.
Thanks Jeff
Jeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
-
jueves, 23 de febrero de 2012 8:24
Hi Jeff,
After updating your C# project file manually and inserting the elements that I had posted previously, does building the project run the static checker and the rewriter? Please check the Output window for any information regarding Code Contracts after building.
- Dave
http://davesexton.com/blog
-
jueves, 23 de febrero de 2012 13:32
Dave,
Yea it seems to be working except for getting the tab to show up. here is some of the output.
EnsureContractReferenceAssemblyOfDependeeProjects:
EnsureContractReferenceAssemblies: C:\DEV4\Templates\Source\Empower.Templates.Messages\bin\Debug\Empower.Templates.Messages.dll;C:\DEV4\Templates\Source\Empower.Templates.Resources\bin\Debug\Empower.Templates.Resources.dll
C:\Program Files (x86)\Microsoft\Contracts\MsBuild\v4.0\Microsoft.CodeContracts.targets(389,5): warning : Contract reference assembly for project 'Empower.Templates.Messages' not found. Select 'Build' or 'DoNotBuild' for Contract Reference in project settings.
C:\Program Files (x86)\Microsoft\Contracts\MsBuild\v4.0\Microsoft.CodeContracts.targets(389,5): warning : Contract reference assembly for project 'Empower.Templates.Resources' not found. Select 'Build' or 'DoNotBuild' for Contract Reference in project settings.
CodeContractRewrite:
"C:\Program Files (x86)\Microsoft\Contracts\Bin\ccrewrite" "@Empower.Templates.Providersccrewrite.rsp"
Jeff
Jeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
-
viernes, 24 de febrero de 2012 16:29
Dave,
So you know, it is difinetely working. I am using it and really like its capabliilties. I been building against different options, like suggest and various warning levels. It has taken me sometime to get my head around everything, but I am really excited about the opportunity it provides for injecting some quality improvements into our development process. Now we just need the options tab to show up in the properties editor.
Thanks Jeff
Jeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
-
viernes, 24 de febrero de 2012 17:35
Hi Jeff,
At this point I'm not sure what is causing the problem with the tab not showing up in C# projects. It seems to be related to missing registry entries, but so far I can't tell why they're missing from just peeking into the installer or examining fragments of installer logs. As Septemptus mentioned, it may have something to do with having a previous installation of a different edition of Visual Studio; e.g., Express or Ultimate.
Hopefully the CC team is aware of this issue, or perhaps they can offer further assistance if they need more info from you guys.
- Dave
http://davesexton.com/blog
-
viernes, 24 de febrero de 2012 18:26
I'm having the exact same problem.
At first I experienced it at work, I thought it was because we work on shared machines via RDP or maybe because we have resharper, but then I tried at home too, where I have my own computer, I'm administrator and I don't have resharper, and I had the same problem.
I was missing that "third" registry key as the post before, and I also have the tab appearing on VB projects but not on C# projects.
I tried reboot, restart, adding that missing key manually, etc. still not working.
I remember in the past, with other versions of the toolkit, that the tab was appearing correctly. It must be a bug of the latest version of the toolkit.
-
viernes, 24 de febrero de 2012 20:22
Just to add my "me too" to the conversation. Exactly as described above, except I had Express on my machine beforehand (was uninstalled though). My machine is also 64bit.
I have SP1 on the machine, but I'm going to try applying all the service updates I can find.
-
viernes, 24 de febrero de 2012 20:30
Dave,
I was looking through the vbproj file to see what some of the settings were when I toggled them since the CC tab was available in my vb projects. I noticed that the following tags were not in the elements you had me add earlier to my csproj.
<CodeContractsInferRequires>False</CodeContractsInferRequires>
<CodeContractsInferEnsures>False</CodeContractsInferEnsures>
<CodeContractsInferObjectInvariants>False</CodeContractsInferObjectInvariants>
<CodeContractsSuggestAssumptions>False</CodeContractsSuggestAssumptions>
<CodeContractsSuggestRequires>True</CodeContractsSuggestRequires>
<CodeContractsSuggestEnsures>False</CodeContractsSuggestEnsures>
<CodeContractsSuggestObjectInvariants>False</CodeContractsSuggestObjectInvariants>
<CodeContractsDisjunctiveRequires>False</CodeContractsDisjunctiveRequires>I have added them and now the CC tab is visible. Unfortunately, my Code Analysis tab is no longer there.
Jeff
Jeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
-
viernes, 24 de febrero de 2012 21:00Okay, tried the registry hack, but to no avail. I think I'll come back when it's advanced to the Beta software stage...... Sounds interesting if you can actually install it!
-
viernes, 24 de febrero de 2012 23:16
Hi Jeff,
I don't have those elements in the project that I copied and posted here because they correspond to new features that were added in the latest release and I haven't updated that particular project yet. However, the tab shows up for me even without those elements. So perhaps something else triggered the tab to show besides adding them to your project?
- Dave
http://davesexton.com/blog
-
viernes, 24 de febrero de 2012 23:19
Hi Jeff,
Also, the tab is present for me even with your original project file that doesn't have any CC elements.
- Dave
http://davesexton.com/blog
-
lunes, 27 de febrero de 2012 14:37
Dave,
This is becoming extremely frustrating and unproductive. Now that the Code Contract tab is available, several other tabs are missing. I completely uninstalled VS2010, cleaned the registery and reinstalled VS2010. Still have missing tabs. How do I recover the tabs that I am missing.
Thanks Jeff
Jeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
-
lunes, 27 de febrero de 2012 15:07
Dave,
I removed all the registery entries around code contracts and the tabs reappeared. This is really strange.
Jeff
Jeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
-
lunes, 27 de febrero de 2012 15:18
Dave,
Re-installed the keys and the CC tab does not appear, but at least my other tabs did not disappear. Any thoughts?
Thanks Jeff
Jeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
-
lunes, 27 de febrero de 2012 17:10
Hi Jeff,
The registry keys that I posted were from my personal computer. I don't know if those keys are correct for your particular environment. Actually, it seems that they aren't ;)
- Dave
http://davesexton.com/blog
-
lunes, 27 de febrero de 2012 21:32
Thanks for this. On my system, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}\ConfigPropertyPages\{1f89ca21-e885-439d-92f5-c36abe518593}\ was also the one that was missing, but on my system, after I added that it initially didn't work, but when I also cleared my user settings (removed HKCU\Software\Microsoft\VisualStudio) and started with fresh settings, it did work. Something less drastic would probably also work, but this is fine for me.
-
jueves, 01 de marzo de 2012 22:13Propietario
Sorry for all this trouble you went through.
Can you try the following:
1. Uninstall the code contracts msi
2. Install the latest one.
3. before starting VS, run devenv /setup from a VS command prompt.
That should hopefully do the trick.
The installation of the property pane is extremely tricky, and just setting these registry entries by hand will not work.
-MaF
Cheers, -MaF (Manuel Fahndrich)
-
jueves, 01 de marzo de 2012 22:30
Followed your instructions. No tab. Any other ideas?
Jeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
-
domingo, 04 de marzo de 2012 20:21Propietario
Try devenv /resetskippkgs to see if some package was disabled by mistake.
Cheers, -MaF (Manuel Fahndrich)
-
lunes, 05 de marzo de 2012 14:41No go.
Jeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
-
miércoles, 07 de marzo de 2012 6:51
I have had similar problems in the past on some systems. RIght now, I am running CodeContracts+ReSharper on 7 systems, and one of them also does not show the tab even though it recognizes and utilizes the CC settings. Another system appears to be having CC cache problems with the default settings. I think some VisualStudio settings may linger, even after you have "completely" removed it. Maybe because the VisualStudio "shell" is used by other programs (SQL studio maybe?). I use CC+RS on Windows7-32, Windows7-64, Server2008R2-64, and have also done the Ultimate/Premium/Pro shuffle on occassion (as well as 4.5/VS11Beta, VS2005, VS2008, SQL DENALI, ...). When desperate I have created a virtual machine and installed everything from scratch there to continue using CC+RS, but I don't know if that is an option for you.
But I don't recall ever being able to clean this problem up enough where all the tabs appeared (and appeared to be working). I think there is some sort of /activityLog setting for VS but I have not tried it yet (a popup occurs suggesting this sometimes, but I have not tried it yet).
I hope you folks can come up with a fix!
-
miércoles, 07 de marzo de 2012 20:27
Hi Jeff, the reason the other tabs are gone is that once you add the "configpropertypages" key, you need to be explicit about all tabs that should be there. Here is how it should look:
Can you try if that works for you?
Best, Daan
-
miércoles, 07 de marzo de 2012 20:31
Hi all,
I think I may have an idea why the install fails for some of you. In order to debug this, I would like to ask that some of you have have install problems send me a screenshot of their registry. In particular, I would like to see both the values of the C# project key, and the subkeys under the ConfigPropertyPages key. It should look like this (this is from my system):
-
miércoles, 07 de marzo de 2012 21:16
Daan,
I have none of those keys. And not sure what vlaues would go with them.
Jeff
Jeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
-
jueves, 08 de marzo de 2012 15:12
Hi All!
I had the same problem. I solve this by just adding section ConfigPropertyChange here:
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\ConfigPropertyPages]
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0_Config\Projects\{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\ConfigPropertyPages\{1f89ca21-e885-439d-92f5-c36abe518593}]
@="Microsoft Code Contracts Property Page"
-
jueves, 08 de marzo de 2012 18:24
Daan,
I have none of those keys. And not sure what vlaues would go with them.
Jeff
Thanks for your reply. I actually need to see the values given on the project key itself ({FAE...}). Can you send me a screenshot of that -- just like I showed in my original post?
(Also, because you have no subkeys in "ConfigPropertyPages" that explains why you don't see the property page for code contracts. I suspect it is because our tool for setting up these entries is failing and I need to see the values in the project key to figure out what is going wrong.)
-
jueves, 08 de marzo de 2012 18:26
Hi Maximvm,
What you did will work -- but you probably will also lose some of the default property pages. See my initial mail in this thread to see what other keys to add to get those back.
btw. Of course, our installer should take care of all of this registry magic so messing with these entries by hand is not recommended.
-
viernes, 09 de marzo de 2012 17:45
Hi all,
In order for us to debug this problem, we need a bit more information. I have set up a special version of the tool we use to set the registry entries at install time (CodeToolsUpdate.exe). It can be downloaded from here:
Just unpack the zip file and get the two files (CodeToolsUpdate.exe, diag.cmd), and close any visual studio instances you have open.
Now, open a command prompt in *administrator* mode and run "diag.cmd".
It should do an uninstall/install cycle and show lots of debug info. It may actually be that everything will start working after doing this, so please test this in VS. If it does not work yet, please post the output of the tool here or send it to me directly so we can see what goes wrong (hopefully :-) ). Also, if things magically start working after running this tool, let us know too so we can update the installer.
-
domingo, 11 de marzo de 2012 9:47
Hi.
No, it does not help.
Here is result:
C:\Temp\CodeToolsDiag>.\codetoolsupdate /uninstall /verbose
CodeToolsUpdate Version 1.0.0.20703.
Update for visual studio 10.0.
Codetools: Property pane found: HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\10.0\CodeTools\$Installed\CodeContracts\PropertyPages\{6962fc39-92c8-4e9b-9e3e-4a52d08d1d83}
Uninstalling Microsoft Code Contracts.
Uninstalled Microsoft Code Contracts MSBuild targets.
Codetools: Found associated project by name: Microsoft Code Contracts: VisualBasic: {F184B08F-C81C-45F6-A57F-5ABD9991F28F}
Codetools: Uninstalled Microsoft Code Contracts property page for {F184B08F-C81C-45F6-A57F-5ABD9991F28F} projects
Uninstalled Microsoft Code Contracts property pages.
Update for visual studio 11.0.
Codetools: Property pane found: HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\11.0\CodeTools\$Installed\CodeContracts\PropertyPages\{6962fc39-92c8-4e9b-9e3e-4a52d08d1d83}
Uninstalling Microsoft Code Contracts.
Uninstalled Microsoft Code Contracts MSBuild targets.
Uninstalled Microsoft Code Contracts property pages.
Update for visual studio 9.0.
Codetools: Property pane found: HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\CodeTools\$Installed\CodeContracts\PropertyPages\{6962fc39-92c8-4e9b-9e3e-4a52d08d1d83}
Uninstalling Microsoft Code Contracts.
Uninstalled Microsoft Code Contracts MSBuild targets.
Uninstalled Microsoft Code Contracts property pages.
Done.
C:\Temp\CodeToolsDiag>.\codetoolsupdate /install /verbose
CodeToolsUpdate Version 1.0.0.20703.
Update for visual studio 10.0.
Codetools: Property pane found: HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\10.0\CodeTools\CodeContracts\PropertyPages\{6962FC39-92C8-4e9b-9E3E-4A52D08D1D83}
Installing Microsoft Code Contracts.
Codetools: Install property pane for Microsoft Code Contracts
Codetools: Found associated project by name: Microsoft Code Contracts: VisualBasic: {F184B08F-C81C-45F6-A57F-5ABD9991F28F}
Codetools: project {F184B08F-C81C-45F6-A57F-5ABD9991F28F}: install default page: {6185191F-1008-4FB2-A715-3A4E4F27E610}
Codetools: project {F184B08F-C81C-45F6-A57F-5ABD9991F28F}: install default page: {EDA661EA-DC61-4750-B3A5-F6E9C74060F5}
Codetools: Installed Microsoft Code Contracts property page for {F184B08F-C81C-45F6-A57F-5ABD9991F28F} projects
Codetools: Register installed property pane for Microsoft Code Contracts
Installed Microsoft Code Contracts property pages.
Installed Microsoft Code Contracts MSBuild targets.
Update for visual studio 11.0.
Codetools: Property pane found: HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\11.0\CodeTools\CodeContracts\PropertyPages\{6962FC39-92C8-4e9b-9E3E-4A52D08D1D83}
Installing Microsoft Code Contracts.
Codetools: Install property pane for Microsoft Code Contracts
Codetools: Register installed property pane for Microsoft Code Contracts
Installed Microsoft Code Contracts property pages.
Installed Microsoft Code Contracts MSBuild targets.
Update for visual studio 9.0.
Codetools: Property pane found: HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\9.0\CodeTools\CodeContracts\PropertyPages\{6962FC39-92C8-4e9b-9E3E-4A52D08D1D83}
Installing Microsoft Code Contracts.
Codetools: Install property pane for Microsoft Code Contracts
Codetools: Register installed property pane for Microsoft Code Contracts
Installed Microsoft Code Contracts property pages.
Installed Microsoft Code Contracts MSBuild targets.
Done.
-
domingo, 11 de marzo de 2012 9:50
btw. just info.
As someone say in this thread - problem only with C# Projects.
In VB projects all fine.
-
lunes, 12 de marzo de 2012 22:27Ha, thanks Maximvm. I think I now know what goes wrong. I am currently uploading a new version of CodeToolsUpdate and if you can run that one more time I think that will fix the issue. I'll post again once it is uploaded.
-
martes, 13 de marzo de 2012 10:16
Hi DaanL!
I download new zip file with CodeToolsUpdate.exe from your SkyDrive folder and try it.
Situation looks like this:
1. I uninstall Contracts.devlab9ts.msi from my machine.
2. Run CodeToolsUpdate.exe /uninstall (in admin mode)
3. Install Contracts.devlab9ts.msi
4. Run CodeToolsUpdate.exe /install (in admin mode)
5. Start VS and load some previously created solution with C# project, and... Code Contarcts tab is missing!!!
6. I create new C# project, and.. all fine - i see Code Contarcts tab.
7. After this i reload my solution from step 5 and all fine - i see all tabs include Code Contracts. :)
it seems for VS 2010 propblem is solved! Its just needed to include correct version of registration tools to the Contracts.devlab9ts.msi package.
Thanks a lot for your answers and help!!
- Propuesto como respuesta baSSiLL martes, 27 de marzo de 2012 11:53
-
martes, 13 de marzo de 2012 13:01
Daanl, Followed the above steps listed by maximvm and my CC tab is now correctly displayed. Thanks for your time and effort. JeffJeff Walker Software Architect Development Department Lender Processing Services, Inc. 50 South Water Ave., Sharon, PA 16146 Office: 800.441.0830 jeff.walker@lpsvcs.com www.LPSVCS.com
- Propuesto como respuesta DaanL miércoles, 14 de marzo de 2012 23:38
-
miércoles, 14 de marzo de 2012 3:25
also followed above steps - appears to have fixed my codecontracts tabs.
thanks
-
miércoles, 14 de marzo de 2012 19:55
Steps followed and tabs are OK!
Thank you all!!
-
miércoles, 14 de marzo de 2012 22:08
Yahoo -- glad to see this fixed the problem -- we will integrate these fixes as soon as possible into the installer.
Thanks everyone for helping out to debug this problem!! :-)
-
martes, 27 de marzo de 2012 11:57
Thanks. Just got Code Contracts page in VS2010 Ultimate.
Unfortunately, trying to resolve problem, I already managed to uninstall Windows Phone SDK 7.1 (including VS 2010 Express for WP) and Visual C# 2008 Express used in other projects. Now need to reinstall :(

