microsoft / CodeContracts

Source code for the CodeContracts tools for .NET
Other
882 stars 150 forks source link

ccdocgen crash issue when using from Visual Studio 2015 #226

Open huwman opened 9 years ago

huwman commented 9 years ago

I receive the following issue when attempting compilation in Visual Studio 2015 (Worked in 2013):

OUTPUT:

Process is terminated due to StackOverflowException. 1>C:\Program Files (x86)\Microsoft\Contracts\MsBuild\v14.0\Microsoft.CodeContracts.targets(642,5): error MSB3073: The command ""C:\Program Files (x86)\Microsoft\Contracts\Bin\ccdocgen.exe" "@obj\Debug\Fortis.CSharpccdocgen.rsp"" exited with code -1073741571. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Configuration:

image

Please assist.

rkeithhill commented 9 years ago

If you uncheck the checkbox "Emit contracts into XML doc file" (bottom of the dialog) does it still error?

ContentsMayVary commented 9 years ago

Duplicate of #169

ndepend commented 8 years ago

In VS2015 + MSCC v1.9.10714.2 I get the error:

The command ""C:\Program Files (x86)\Microsoft\Contracts\Bin\ccdocgen.exe" "@obj\Debug\MyDLLNameccdocgen.rsp"" exited with code -1073741571.    MyDLLName

and when I uncheck "Emit contracts into XML doc file" I don't get it.

Hope this will be fixed soon (and so the wrong version number)

huwman commented 8 years ago

That resolves the error, thanks.

On Wed, 7 Oct 2015 15:43 psmacchia notifications@github.com wrote:

In VS2015 + MSCC v1.9.10714.2 I get the error:

The command ""C:\Program Files (x86)\Microsoft\Contracts\Bin\ccdocgen.exe" "@obj\Debug\MyDLLNameccdocgen.rsp"" exited with code -1073741571. MyDLLName

and when I uncheck "Emit contracts into XML doc file" I don't get it.

Hope this will be fixed soon (and so the wrong version number)

— Reply to this email directly or view it on GitHub https://github.com/Microsoft/CodeContracts/issues/226#issuecomment-146199851 .

Regards, Huw Simpson

ndepend commented 8 years ago

Huw, what is resolving the error? a new patch? or unchecking "Emit contracts into XML doc file"? In the second case, the error is fixed ok, but this removes a very important feature we absolutely need :/

huwman commented 8 years ago

Yes, turning off the "Emit contracts into XML doc file" option resolved the error. But I agree it would be best if that feature worked.

ndepend commented 8 years ago

VS2015 is RTM for more than 2 months and all VS projects that are using this "Emit contracts into XML doc file" just cannot be developed with VS2015.

When a fix is forecasted? Will it be ever fixed? Is MS CodeContract deprecated?

RealDotNetDave commented 8 years ago

I'm having the same issue. Setting the xml file to false did not work. But if I set Contract Reference Assembly to DoNotBuild, I get a bunch of these errors:

CA0001 : An error was encountered while parsing IL for method: 'System.Diagnostics.Contracts.__ContractsRuntime.Requires(System.Boolean,System.String,System.String)', instruction at offset '0x4B' with opcode 'Call'.

But I don't know what is causing this error. There isn't a line reference.

David

JamesFaix commented 8 years ago

I'm having the same issue as huwman with VS2015 and code contracts 1.9.10714.2. Unchecking the box prevents the error message.

I have several projects in the same solution, all with code contracts configured the same way, and all have been fine for a few weeks. Now one project is throwing this error on build.

Possibly relevant, is that the project with the error is highly implementation specified, while the other projects are mostly interfaces and simple structs.