-
Notifications
You must be signed in to change notification settings - Fork 151
Visual Studio 2017 support #451
Comments
Note to self: Looks like most of the targets work is in WiX: https://github.com/Microsoft/CodeContracts/blob/79a04c96679b6d400c286dd62d6a2ec77462da72/Microsoft.Research/ManagedContract.Setup/ManagedContracts.wxs#L1078-L1087 |
I had to setup a build server with VS15 for evaluation. Of course you don't get the CC settings page in the project properties, but it's sufficient to try out existing solutions |
That works for me too, though I haven't tried CC with any of the new C#7 features yet. I think the settings pane should show up if you run the MSI after installing VS15. If not, there's a breaking change somewhere in VS. |
Location since recent builds seem to be |
Does this mean that Code Contracts will be supported in Visual Studio 2017 soon? |
@takinosaji I've decided to move on and not have this headache at every new VS version :) |
I meant by support if Code Contract would be integrated into Visual Studios 2017 Settings Tab. |
I honestly have no idea how to do that at the moment.
… On 12 Mar 2017, at 9:44 am, mmusaev ***@***.***> wrote:
I meant by support if Code Contract would be integrated into Visual Studios 2017 Settings Tab.
―
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Would it be possible to ask for help from Microsoft/Research lab on this? |
@tom-englert the task manager appears to be provided by Code Contracts' As I understand it, all the Visual Studio extension-y bits would need to be packages as a VSIX, rather than the MSI dumping DLLs all over the place and writing to Visual Studio's registry. |
I see, so probably it's easier to turn on CC only temporary, than to try fixing this... |
Probably. I actually run cccheck completely out-of-band (see #459) so I didn't really notice. |
This works out of the box in Visual Studio 2017. It is past of the System.Diagnostics.Contracts namespace. See example below:
|
@Mzangwe While System.Diagnostics.Contracts types are in place in the class library itself, the rewriting tools needed to make use of this data aren't integrated with Visual Studio 2017. You can put in all the |
@coldacid Chris, I used the exact Code Contract in both Debug and Release. They both fail when adding a negative deposit amount. I added these in the .csproj below
Then for the Release Condition:
They App breaks in whichever mode. This then come very handy with Automated Tests even for the PROD stuff. I added CodeContracts.MSBuild Nuget Package for my automated build pipelines. |
What needs to be done to add support for VS15, however preliminary.
At minimum we need MSBuild targets for v15.0 (
C:\Program Files (x86)\Microsoft\Contracts\MsBuild
).What would I need to modify to add such targets to the project?
ITaskManager
for background static analysisThe text was updated successfully, but these errors were encountered: