locked
Failed to load a dependency winmd file RRS feed

  • Question

  • I have create an c++ Component the I use it in C# project  in Win8 CP, now I upgrade to Win8 RP

    but the project show many error !!!! 

    such as "error MIDL4034: Failed to load a dependency file. Windows.winmd" 

    how should I do to fix this error ?

    Tuesday, June 5, 2012 1:59 AM

Answers

  • I have create a new project in win8 CP, then compare the vcxproj file I found the new one has add something:

    <Midl Include="GeometricSource.idl">
          <MetadataFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
          </MetadataFileName>
          <MetadataFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
          </MetadataFileName>
          <MetadataFileName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
          </MetadataFileName>
          <MetadataFileName Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
          </MetadataFileName>
          <MetadataFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
          </MetadataFileName>
          <MetadataFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
          </MetadataFileName>
          <AdditionalMetadataDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(WindowsSDK_MetadataPath)</AdditionalMetadataDirectories>
          <AdditionalMetadataDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(WindowsSDK_MetadataPath)</AdditionalMetadataDirectories>
          <AdditionalMetadataDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">$(WindowsSDK_MetadataPath)</AdditionalMetadataDirectories>
          <AdditionalMetadataDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">$(WindowsSDK_MetadataPath)</AdditionalMetadataDirectories>
          <AdditionalMetadataDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(WindowsSDK_MetadataPath)</AdditionalMetadataDirectories>
          <AdditionalMetadataDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(WindowsSDK_MetadataPath)</AdditionalMetadataDirectories>
          <EnableWindowsRuntime Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EnableWindowsRuntime>
          <EnableWindowsRuntime Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EnableWindowsRuntime>
          <EnableWindowsRuntime Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</EnableWindowsRuntime>
          <EnableWindowsRuntime Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</EnableWindowsRuntime>
          <EnableWindowsRuntime Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</EnableWindowsRuntime>
          <EnableWindowsRuntime Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</EnableWindowsRuntime>
          <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).h</HeaderFileName>
          <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).h</HeaderFileName>
          <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">%(Filename).h</HeaderFileName>
          <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(Filename).h</HeaderFileName>
          <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).h</HeaderFileName>
          <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).h</HeaderFileName>
        </Midl>
    Add this into vcxproj file and then resolve the problem 

    • Marked as answer by troyou Wednesday, June 6, 2012 1:23 AM
    Wednesday, June 6, 2012 1:23 AM