Uno.UWPSyncGenerator crashes if Visual Studio 2017 is not installed on the developer PC.
Uno.UWPSyncGenerator should run successfully.
Clean Windows 10, install Visual Studio 2019 with all required workloads 馃槉
Clone Uno.UI
Uno.UI.sln Uno.UWPSyncGenerator for debuggingGenerator.cs on line 1415:Exception detail:
System.Reflection.ReflectionTypeLoadException: 'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.'
Stack trace:
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeAssembly.get_DefinedTypes()
at System.Composition.Hosting.ContainerConfiguration.<>c.b__16_0(Assembly a)
at System.Linq.Enumerable.d__17 2.MoveNext() at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor(IEnumerable1 types, AttributedModelProvider attributeContext)
at System.Composition.Hosting.ContainerConfiguration.CreateContainer()
at Microsoft.CodeAnalysis.Host.Mef.MefHostServices.Create(IEnumerable1 assemblies) at Microsoft.CodeAnalysis.Host.Mef.MSBuildMefHostServices.get_DefaultServices() at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.Create(IDictionary2 properties)
at Uno.UWPSyncGenerator.Generator.LoadProject(String projectFile, String targetFramework)
at Uno.UWPSyncGenerator.Generator.Build(String basePath, String baseName, String sourceAssembly)
at Uno.UWPSyncGenerator.Program.Main(String[] args)
App output:
*** WARNING: Close all editor files in visual studio, otherwise VS will freeze for a few minutes ****
Press enter to continue...
Generating for Uno.Foundation Windows.Foundation.FoundationContract
Loading for : Uno.UWPSyncGenerator.Reference.csproj
Searching for [Microsoft.CodeAnalysis.Features, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35] from [C:\Dev\Uno\src\Uno.UWPSyncGenerator\bin\Debug\net461]
Searching for [Microsoft.CodeAnalysis.CSharp.Features, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35] from [C:\Dev\Uno\src\Uno.UWPSyncGenerator\bin\Debug\net461]
Searching for [Microsoft.CodeAnalysis.VisualBasic.Features, Version=2.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35] from [C:\Dev\Uno\src\Uno.UWPSyncGenerator\bin\Debug\net461]
Searching for [Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Dev\Uno\src\Uno.UWPSyncGenerator\bin\Debug\net461]
Searching for [Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Dev\Uno\src\Uno.UWPSyncGenerator\bin\Debug\net461]
Searching for [Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Dev\Uno\src\Uno.UWPSyncGenerator\bin\Debug\net461]
Searching for [Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Dev\Uno\src\Uno.UWPSyncGenerator\bin\Debug\net461]
Searching for [Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Dev\Uno\src\Uno.UWPSyncGenerator\bin\Debug\net461]
Searching for [Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Dev\Uno\src\Uno.UWPSyncGenerator\bin\Debug\net461]
Searching for [Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a] from [C:\Dev\Uno\src\Uno.UWPSyncGenerator\bin\Debug\net461]
Nuget Package:
Package Version(s):
Affected platform(s):
Visual Studio
Relevant plugins
Interestingly enough, the same problem remains even after installing Visual Studio 2017 after installing 2019 first. I will verify now if that is a consistent problem and then will do one more clean reinstall in the "correct" order (2017 first, 2019 second).
I can now confirm that when Visual Studio 2017 is installed first and Visual Studio 2019 second, the tool does not crash when launched from either of the IDEs.
This has been fixed since then (it also runs during parts of the CI now)