0

midlrt : error MIDL1001: [msg]cannot open input file [context]Error opening or processing WinMD d:\Desktop\projects\plenusbusiness\windows\packages\microsoft.ui.xaml.2.3.191129002\lib\uap10.0\microsoft.ui.xaml.winm d. HRESULT 0x80070003. [D:\Desktop\projects\Example\node_modules\react-native-windows\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj] D:\Desktop\projects\Example\node_modules\react-native-windows\ReactUWP\Views\cppwinrt\AccessibilityAction.idl(1): error MIDL5157: [msg]An invalid winmd file was specified for import [context]: D:\Desktop\projects\Example\windows\packages\Microsoft.UI.Xaml.2.3.191129002\lib\uap10.0\Microsoft.UI.Xaml.winmd [D:\Desktop\projects\Example\node_modules\react-native-windows\Microsoft.ReactNative\Microsof t.ReactNative.vcxproj]

5
  • You might add an actual question, stating what you were attempting to achieve, and how. Just an error dump alone does not make for a good question for itself. Forgive the double pleonasm. – yeoman Oct 4 '20 at 14:48
  • He tried to run npx react-native run-windows to start/build a React Native Windows project. I get a similar error. × Build failed with message 5>midlrt : error MIDL1001: [msg]cannot open input file [context]Error opening or processing WinMD c:\my project\windows\packages\microsoft.ui.xaml.2.3.191129002\lib\uap10.0\microsoft.ui.xaml.winmd. HRESULT 0x80070003. [C:\my project\node_modules\react-native-windows\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]. Check your build configuration. – user10981072 Oct 4 '20 at 15:02
  • Thanks, that's actually actionable 🙂😎💪 – yeoman Oct 4 '20 at 15:24
  • Might take a look into the runtime with a debugger a bit later 🙂 (js & native, depending on where I end up debugging the JS part) – yeoman Oct 4 '20 at 15:25
  • 1
    I think I've found the problem. The project's path probably should not contain space or special characters. – user10981072 Oct 4 '20 at 16:56
2

You should be able to fix the error by removing any spaces and special characters from your project's path and I think after this you have to use npm install again before building the project. This solution worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.