-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on trying to follow "Get Started With Windows" instructions #10155
Comments
Me too info Fetching system and libraries information...
System:
OS: Windows 10 10.0.22000
CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
Memory: 9.22 GB / 15.62 GB
Binaries:
Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions: 10.0.19041.0
IDEs:
Android Studio: Not Found
Visual Studio: 17.2.32602.215 (Visual Studio Community 2022)
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.0 => 0.68.0
react-native-windows: 0.68.5 => 0.68.5
npmGlobalPackages:
*react-native*: Not Found
-----------------------------------------------------------------------------------------------------------------------------------
利用率: 99.7 平均利用率: 99.7
√ Building Solution
√ Starting the React-Native Server
√ Enabling Developer Mode
错误: ReflectionTypeLoadException: 无法加载一个或多个请求的类型。有关更多信息,请检索 LoaderExceptions 属性。
在 System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
在 System.Reflection.Assembly.GetTypes()
在 System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
在 System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(ImportDefinition definition)
在 System.ComponentModel.Composition.Hosting.AggregateCatalog.GetExports(ImportDefinition definition)
在 System.ComponentModel.Composition.Hosting.CatalogExportProvider.InternalGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
在 System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
在 System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
在 System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
在 System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
在 System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
在 System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
在 System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
在 System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
在 System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
在 System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
在 System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(ExportProvider provider, ComposablePart part, ImportDefinition definition, AtomicComposition atomicComposition)
在 System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSubset(PartManager partManager, IEnumerable`1 imports, AtomicComposition atomicComposition)
在 System.ComponentModel.Composition.Hosting.ImportEngine.TryPreviewImportsStateMachine(PartManager partManager, ComposablePart part, AtomicComposition atomicComposition)
在 System.ComponentModel.Composition.Hosting.ImportEngine.PreviewImports(ComposablePart part, AtomicComposition atomicComposition)
在 System.ComponentModel.Composition.Hosting.ComposablePartExportProvider.Compose(CompositionBatch batch)
在 Microsoft.VisualStudio.Deployment.Deployer.Deploy()
错误: 反射加载程序中的异常:
错误: FileLoadException: 未能加载文件或程序集“NuGet.VisualStudio.Contracts, Version=17.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
错误: ArgumentNullException: 值不能为 null。
参数名: format
在 System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
在 System.String.Format(IFormatProvider provider, String format, Object[] args)
在 System.IO.TextWriter.WriteLine(String format, Object[] arg)
在 System.IO.TextWriter.SyncTextWriter.WriteLine(String format, Object[] arg)
在 System.Console.WriteLine(String format, Object[] arg)
在 Microsoft.VisualStudio.Deployment.Deployer.Microsoft.VisualStudio.Deployment.ILogger.Log(Level level, String format, Object[] args)
在 Microsoft.VisualStudio.Deployment.Deployer.Deploy()
× Deploying
× Failed to deploy: Deploying C:\Users\ansheng\Desktop\app\windows\x64\Debug\app\app.build.appxrecipe - exit error code 100
i Gathering MSBuild data for telemetry.
i Loading properties from msbuildproperties.g.json
Command failed with error DeployRecipeFailure: Deploying C:\Users\ansheng\Desktop\app\windows\x64\Debug\app\app.build.appxrecipe - exit error code 100
Your telemetry sessionId was 398388f187a1051e07fd1f14f543484d |
The failure actually seems to be in Visual Studio deployment:
And it's happening within the Visual Studio 2022 version. |
@srdjanjovcic could you please take a look? It looks like DeployAppRecipe is failing for these customers. |
@EdZ543 @aansheng could you please try upgrading to VS 2022 17.2.5? we believe this is an issue with one specific VS version. |
I have upgraded and it indeed does work as intended now. |
I am also hitting this issue when trying to build a Fabric app on RNW version canary-761 and running on VS 2022 17.8.7 (following the instructions to use the cpp-app template to create a new app here:
Updating VS 2022 version to 17.9.0 to see if that resolves the issue. |
Upgrading to 17.9.0 resolves the issue for me - I am able to successfully build the app. Keeping the issue closed. |
And we're back with this failing in 17.10.2. |
Opened a new bug to track the current iteration of this. |
how to fix this then? can you downgrade visual studio version? |
After you try to build there will be a cmd.exe window open for debugging, when it's showing you open the project in visual studio and hit build and it will deploy to the cmd.exe window and run correctly. That's how it works for me anyway. Hopefully will be fixed then broken in the next update lol. |
Problem Description
When running the app in visual studio code, I encountered an error.
Steps To Reproduce
Expected Results
The app running.
CLI version
7.0.3
Environment
Target Platform Version
No response
Target Device(s)
Desktop
Visual Studio Version
No response
Build Configuration
Debug
Snack, code example, screenshot, or link to a repository
Here is the output of react-native run-windows --logging.
The text was updated successfully, but these errors were encountered: