These are chat archives for Microsoft/CodeContracts

22nd
Jul 2015
jbcutting
@jbcutting
Jul 22 2015 01:26
Weeeeird. I wonder why they're there now.
I doubt anyone who's used to them being in messages/warnings would look there... I definitely wouldn't havea.
I wonder if that's a VS2015 bug.
Sam Harwell
@sharwell
Jul 22 2015 01:43
Could be a bug, but I know how to work around it too
Sam Harwell
@sharwell
Jul 22 2015 02:36
@jbcutting Probably not a bug in VS 2015
I think I figured out why it's broken
Sam Harwell
@sharwell
Jul 22 2015 02:52
@SergeyTeplyakov I need #162 merged before I can send a pull request for fixing #137
Sam Harwell
@sharwell
Jul 22 2015 03:20
@jbcutting It actually was a case where a bug was fixed in Visual Studio 2015. These messages never should have gone to the errors window in any version of Visual Studio.
Sam Harwell
@sharwell
Jul 22 2015 03:33
@jbcutting your build should be ready in 15 minutes
I have not tested it, but I should know by that time whether or not the build will work :D
Sergey Teplyakov
@SergeyTeplyakov
Jul 22 2015 03:51
merged #162
Sam Harwell
@sharwell
Jul 22 2015 03:51
Thanks :)
@SergeyTeplyakov I'm having trouble with the code tools
I made a change to TaskManager.dll but the build isn't picking it up.
(I did not make any changes to ITaskManager.dll)
Sam Harwell
@sharwell
Jul 22 2015 04:18
I figured it out. The binaries are embedded in ImportedCodeTools\CodeTools.msm. I need to update buildCC to rebuild that file during a build.
Sergey Teplyakov
@SergeyTeplyakov
Jul 22 2015 04:23
Sorry, didn't noticed you message, but glad that you figured that out! I had no idea about that stuff:)
Sam Harwell
@sharwell
Jul 22 2015 05:34
blob
@jbcutting So this :arrow_up:
@SergeyTeplyakov I'm waiting for an AppVeyor build of that branch to complete before sending a pull request. I want to make sure it's not depending on some sort of local system state specific to my machine.
I'll check back in about an hour
The AppVeyor build will actually create an installer and attach it to the build result, so @jbcutting can test it as soon as he wants
(Assuming the build is successful of course)
It's this build (ignore the summary message - I intentionally cherry-picked the fix for 161 into this branch knowing someone is likely to actually install it)
build failed, will fix after some tv time
Sam Harwell
@sharwell
Jul 22 2015 06:38
Later than I thought; resuming tomorrow.
Sam Harwell
@sharwell
Jul 22 2015 06:46
New build which I'm hoping works (it's queued; link will work as soon as it starts): https://ci.appveyor.com/project/sharwell/codecontracts/build/1.9.10722.26
Sam Harwell
@sharwell
Jul 22 2015 07:01
jbcutting
@jbcutting
Jul 22 2015 08:02
I tried out that build, but I'm still not seeing the messages and warnings in the 'error list' window... :(
Sam Harwell
@sharwell
Jul 22 2015 12:02
@jbcutting it still failed
I can't figure out the path to tlbexp on the AppVeyor machine
I tried tlbexp first, then $(WindowsSDKDir)\tlbexp.exe
Now I'm trying $(TargetFrameworkSDKToolsDirectory)\tlbexp.exe
Sam Harwell
@sharwell
Jul 22 2015 12:17
Now I'm trying $(WindowsSDKDir)Bin\tlbexp.exe
Sam Harwell
@sharwell
Jul 22 2015 12:50
Now I'm trying just tlbexp again, but I updated appveyor.yml to call SetEnv.bat according to this message.
Sam Harwell
@sharwell
Jul 22 2015 13:09
I gave up and put TlbExp.exe in the repo
Let me know if those work
Sam Harwell
@sharwell
Jul 22 2015 14:23
Installing that AppVeyor artifact MSI worked for me :tada:
Sam Harwell
@sharwell
Jul 22 2015 14:31
Would anyone have a major objection to changes to CodeContracts.sln which require Visual Studio 2015, if it means it's easier to use overall?
In particular, I'm thinking of splitting each of the reference contract projects into a shared project containing the source code, and separate projects for each target (.net 3.5, silverlight, 4.5, etc.). I'd also like to migrate towards using analyzers to verify you have the correct APIs defined in the reference contract assemblies while you work.
Shared projects may work in 2013, but they certainly work well in 2015. Analyzers are only 2015+.
jbcutting
@jbcutting
Jul 22 2015 16:58
@sharwell Thanks - I'll try out that newer build here shortly.
Sam Harwell
@sharwell
Jul 22 2015 16:59
When you do, can you uninstall the old one before installing the new one?
jbcutting
@jbcutting
Jul 22 2015 16:59
yes
Sam Harwell
@sharwell
Jul 22 2015 17:00
It works either way, but I want to see if #161 shows up for you if you uninstall and reinstall. I installed it right over the top of the previous one and #161 did appear for me, even though it should be fixed.
jbcutting
@jbcutting
Jul 22 2015 17:00
I usually do (when I actually install it... I usually just extract the binaries with msiexec and move them into my Tools folder where we have them in our source tree)
ok
I can install it to verify that.
Sam Harwell
@sharwell
Jul 22 2015 17:02
Fixing your primary issue required updating the CodeTools binaries, which you probably don't include in your source tree.
jbcutting
@jbcutting
Jul 22 2015 17:28
I'll check, but why would that be the case? The analysis was outputting messages in the MSBuild format. VS adds messages in that format to the errors list.
Sam Harwell
@sharwell
Jul 22 2015 18:04
Oh trust me, it does not work like that :(
@jbcutting so did this build fix it?? :)
jbcutting
@jbcutting
Jul 22 2015 18:29
Sorry, got pulled into a discussion with our PM... I'll try to get it tested now.
I'm still confused, though, because it has been working like that for us in VS2013. We don't require all devs to have the code contracts MSI installed since it's in our source tree and they get the warnings/messages without it.
Sam Harwell
@sharwell
Jul 22 2015 18:41
Maybe it will work then.
If it works like that it would be awesome. Puts us a big step ahead in the goal to only distribute via NuGet+VS Gallery eventually (no msi installer)
jbcutting
@jbcutting
Jul 22 2015 18:49
Still verifying, but I think it's working as it should now. I actually uninstalled CC completely and only updated the binaries in the source tree and I'm getting a warning in my errors list. So that's promising, but give me another ten mins or so to check a few more things.
Sam Harwell
@sharwell
Jul 22 2015 18:58
Exciting!
Note that I haven't fixed the bugs that result in crash reports
Oh, but those are editor extensions anyway
jbcutting
@jbcutting
Jul 22 2015 18:58
Understood. :)
The editor extension is more of a nice to have. A big nice-to-have, but less critical than the core stuff. :)
jbcutting
@jbcutting
Jul 22 2015 19:18
Okay... I think this looks good. Warnings always make it into the errors list now, regardless of whether the CC MSI is installed. Messages get to the error list if (and only if) the CC MSI is installed, but it looks like that's unavoidable and was true for 2013 as well (the MSBuild output syntax only works with errors and warnings).
I also just learned that background analysis only works if you have the CC MSI installed. I didn't realize that before (probably because I've always had it installed on my primary box).
Sam Harwell
@sharwell
Jul 22 2015 19:20
Ohhhhh, yeah, we're on the same page now
jbcutting
@jbcutting
Jul 22 2015 19:21
I think so. I'm good with your fix. Thank you!
Sam Harwell
@sharwell
Jul 22 2015 19:21
With the MSI installed, what version of Code Contracts shows as installed in Visual Studio's Extensions and Updates?
jbcutting
@jbcutting
Jul 22 2015 19:25
Hmm... not the right one. Let me check something.
Sam Harwell
@sharwell
Jul 22 2015 19:25
1.8.x?
jbcutting
@jbcutting
Jul 22 2015 19:31
I do see 1.8.10107.10 installed and update (1.9.10714.2) is shown.
and AN update is shown
Sam Harwell
@sharwell
Jul 22 2015 19:31
so weird
There are no files in source control with the string 1.8.10107.10
at least not for the branch we're using. it means it's either left over from a previous install (something I've definitely seen happen), or the installer is actually using the installed file from the previous build when creating a new installer instead of using the file in source contorl
What version(s) do you see installed in Visual Studio 2013 and/or 2012 and/or 2010?
jbcutting
@jbcutting
Jul 22 2015 19:36
Well, that's what I'm looking at... I removed the MSI altogether, but Code Contracts Tools still shows up in VS (version 1.7.11202.10). I'm unable to uninstall that extension... but I also don't see it installed in Add/Remove Programs, so I'm not sure where that's coming from. Does something not get removed cleanly in some scenario?
I see that version in both VS2013 and 2015.
Ahh... it looks like the Common7\IDE\Extensions\Microsoft\CodeContracts folder doesn't get cleared out when you remove the MSI
jbcutting
@jbcutting
Jul 22 2015 19:43
I'm not sure where the extensions get registered, but it looks like the original version is registered and can't be uninstalled. That folder still exists for both versions of VS, but isn't what's driving what appears in the Extensions and Updates window.
If I install the MSI for the latest version from the gallery, my CC Tools version appears as 1.8.10107.10 (I can provide a screenshot - it really does show that). And it still tells me there's an update available.
Sam Harwell
@sharwell
Jul 22 2015 19:51
I believe you
Sam Harwell
@sharwell
Jul 22 2015 21:02
@SergeyTeplyakov I'll try to review #159 in detail tonight