Search

C++/Cx component producing a corrupt .winmd file by lloyd

Closed
as Not Reproducible Help for as Not Reproducible

1
0
Sign in
to vote
Type: Bug
ID: 775871
Opened: 1/5/2013 6:43:07 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
I have a C++/Cx component which I use in a C# DirectX Metro app.
It worked fine.
until my latest innocuous changes.. where my C# project can't use the C++/Cx project anymore, I got this error:
"There was a problem reading metadata from 'C:\Dev\WinRTDirectXSamples\Debug\DXBase\DXBase.winmd' ('An attempt was made to load a program with an incorrect format.')."

Reverting the changes made it work
(only a few properties / method in the C++ component changed, i.e. no project - target architecture changes)
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

What category (if any) best represents this feedback?

 

Steps to reproduce

I got a sample there (VS2012bug.zip):
https://skydrive.live.com/redir?resid=7E5D519CDA2F47D0!1917

It's a Mercurial (HG) repository.
Revision 16 compiles and run fine, revision 17 doesn't.

Revision can be changed with TortoiseHG workbench:
http://tortoisehg.bitbucket.org/download/index.html

Product Language

English

Operating System

Windows 8

Operating System Language

English

Actual results

The solution doesn't compile, I got an error about a corrupted .winmd

Expected results

The solution should compile, or the C++ component should not compile and have an error message explaining what's wrong.

Locale

 
File Attachments
File Name Submitted By Submitted On File Size  
VS2012bug.zip 1/5/2013 481 KB
Sign in to post a comment.
Posted by Microsoft on 1/10/2013 at 1:44 AM
Hi lloyd, thanks for submitting feedback on Visual Studio and .Net Framework. We'll close this issue because you have found a workaround. Thanks for your time.
Posted by lloyd on 1/5/2013 at 7:00 AM
I found a weird work around:

On a wild hunch (it's a compiler problem, right? I though I'll try to help it)
There was 2 properties in DXContext defined with a macro (TargetType, Status), I got rid of the macro and used code instead and then it worked fine!
Posted by Microsoft on 1/5/2013 at 6:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.