unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.94k stars 724 forks source link

Android build fails because c:ReferencePictureViewer could not be found #8749

Closed jeanplevesque closed 2 years ago

jeanplevesque commented 2 years ago

Current behavior

When I build my Android app, I get the following output.

1>MSBUILD : error : Generation failed: System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Generation failed for Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator. System.AggregateException: One or more errors occurred. ---> System.Exception: Processing failed for file Views\Styles\MergedResourceDictionaries.xaml (System.InvalidOperationException: The type c:ReferencePictureViewer could not be found

The error is confusing because there's nothing called ReferencePictureViewer in the application's code.

Full error:

1>MSBUILD : error : Generation failed: System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Generation failed for Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator. System.AggregateException: One or more errors occurred. ---> System.Exception: Processing failed for file Views\Styles\MergedResourceDictionaries.xaml (System.InvalidOperationException: The type c:ReferencePictureViewer could not be found
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetType(String name) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.Reflection.cs:line 793
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetImplicitDictionaryResourceKey(XamlObjectDefinition resource) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1375
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionaryInitializers(IIndentedStringBuilder writer, XamlObjectDefinition dictionaryObject) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1263
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionary(IIndentedStringBuilder writer, XamlObjectDefinition topLevelControl) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1199
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.InnerGenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 429
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 338) ---> System.InvalidOperationException: The type c:ReferencePictureViewer could not be found
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetType(String name) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.Reflection.cs:line 793
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetImplicitDictionaryResourceKey(XamlObjectDefinition resource) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1375
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionaryInitializers(IIndentedStringBuilder writer, XamlObjectDefinition dictionaryObject) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1263
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionary(IIndentedStringBuilder writer, XamlObjectDefinition topLevelControl) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1199
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.InnerGenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 429
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 338
1>MSBUILD : error :    --- End of inner exception stack trace ---
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 346
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGeneration.<>c__DisplayClass40_0.<Generate>b__1(XamlFileDefinition file) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlCodeGeneration.cs:line 297
1>MSBUILD : error :    at System.Linq.Parallel.PartitionedDataSource`1.ListContiguousIndexRangeEnumerator.MoveNext(T& currentElement, Int32& currentKey)
1>MSBUILD : error :    at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
1>MSBUILD : error :    at System.Linq.Parallel.SpoolingTaskBase.Work()
1>MSBUILD : error :    at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
1>MSBUILD : error :    at System.Threading.Tasks.Task.Execute()
1>MSBUILD : error :    --- End of inner exception stack trace ---
1>MSBUILD : error :    at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
1>MSBUILD : error :    at System.Linq.Parallel.DefaultMergeHelper`2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute()
1>MSBUILD : error :    at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)
1>MSBUILD : error :    at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2 partitionedStream)
1>MSBUILD : error :    at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
1>MSBUILD : error :    at System.Linq.Parallel.QueryOperator`1.GetOpenedEnumerator(Nullable`1 mergeOptions, Boolean suppressOrder, Boolean forEffect, QuerySettings querySettings)
1>MSBUILD : error :    at System.Linq.Parallel.QueryOpeningEnumerator`1.OpenQuery()
1>MSBUILD : error :    at System.Linq.Parallel.QueryOpeningEnumerator`1.MoveNext()
1>MSBUILD : error :    at System.Linq.ParallelEnumerable.ToList[TSource](ParallelQuery`1 source)
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGeneration.Generate(GenerationRunInfo generationRunInfo) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlCodeGeneration.cs:line 349
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator.Execute(GeneratorExecutionContext context) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlCodeGenerator.cs:line 43
1>MSBUILD : error :    at Uno.SourceGeneration.Host.SourceGeneratorEngine.<>c__DisplayClass4_1.<Generate>b__13(ValueTuple`3 generatorDef) in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 226
1>MSBUILD : error : ---> (Inner Exception #0) System.Exception: Processing failed for file Views\Styles\MergedResourceDictionaries.xaml (System.InvalidOperationException: The type c:ReferencePictureViewer could not be found
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetType(String name) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.Reflection.cs:line 793
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetImplicitDictionaryResourceKey(XamlObjectDefinition resource) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1375
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionaryInitializers(IIndentedStringBuilder writer, XamlObjectDefinition dictionaryObject) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1263
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionary(IIndentedStringBuilder writer, XamlObjectDefinition topLevelControl) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1199
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.InnerGenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 429
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 338) ---> System.InvalidOperationException: The type c:ReferencePictureViewer could not be found
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetType(String name) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.Reflection.cs:line 793
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetImplicitDictionaryResourceKey(XamlObjectDefinition resource) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1375
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionaryInitializers(IIndentedStringBuilder writer, XamlObjectDefinition dictionaryObject) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1263
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionary(IIndentedStringBuilder writer, XamlObjectDefinition topLevelControl) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1199
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.InnerGenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 429
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 338
1>MSBUILD : error :    --- End of inner exception stack trace ---
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 346
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGeneration.<>c__DisplayClass40_0.<Generate>b__1(XamlFileDefinition file) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlCodeGeneration.cs:line 297
1>MSBUILD : error :    at System.Linq.Parallel.PartitionedDataSource`1.ListContiguousIndexRangeEnumerator.MoveNext(T& currentElement, Int32& currentKey)
1>MSBUILD : error :    at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
1>MSBUILD : error :    at System.Linq.Parallel.SpoolingTaskBase.Work()
1>MSBUILD : error :    at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
1>MSBUILD : error :    at System.Threading.Tasks.Task.Execute()<---
1>MSBUILD : error : 
1>MSBUILD : error :    at Uno.SourceGeneration.Host.SourceGeneratorEngine.<>c__DisplayClass4_1.<Generate>b__13(ValueTuple`3 generatorDef) in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 243
1>MSBUILD : error :    at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorEnumerator`1.MoveNext(TOutput& currentElement, TKey& currentKey)
1>MSBUILD : error :    at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
1>MSBUILD : error :    at System.Linq.Parallel.SpoolingTaskBase.Work()
1>MSBUILD : error :    at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
1>MSBUILD : error :    at System.Threading.Tasks.Task.Execute()
1>MSBUILD : error :    --- End of inner exception stack trace ---
1>MSBUILD : error : 
1>MSBUILD : error : Server stack trace: 
1>MSBUILD : error :    at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
1>MSBUILD : error :    at System.Linq.Parallel.DefaultMergeHelper`2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute()
1>MSBUILD : error :    at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)
1>MSBUILD : error :    at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2 partitionedStream)
1>MSBUILD : error :    at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.ChildResultsRecipient.Receive[TKey](PartitionedStream`2 inputStream)
1>MSBUILD : error :    at System.Linq.Parallel.ScanQueryOperator`1.ScanEnumerableQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
1>MSBUILD : error :    at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
1>MSBUILD : error :    at System.Linq.Parallel.QueryOperator`1.ExecuteAndGetResultsAsArray()
1>MSBUILD : error :    at Uno.SourceGeneration.Host.SourceGeneratorEngine.Generate() in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 166
1>MSBUILD : error :    at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
1>MSBUILD : error :    at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
1>MSBUILD : error : 
1>MSBUILD : error : Exception rethrown at [0]: 
1>MSBUILD : error :    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
1>MSBUILD : error :    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
1>MSBUILD : error :    at Uno.SourceGeneratorTasks.RemoteSourceGeneratorEngine.Generate(RemotableLogger2 logger, BuildEnvironment environment)
1>MSBUILD : error :    at Uno.SourceGeneration.Host.Server.GenerationServerHost.GenerateForCollection(EnvironmentPool collection, BuildEnvironment environment) in D:\a\1\s\src\Uno.SourceGeneration.Host\Server\GenerationServerHost.netframework.cs:line 61
1>MSBUILD : error :    at Uno.SourceGeneration.Host.Server.GenerationServerHost.RunGeneration(RunRequest request, CancellationToken cancellationToken) in D:\a\1\s\src\Uno.SourceGeneration.Host\Server\GenerationServerHost.cs:line 73
1>MSBUILD : error : ---> (Inner Exception #0) System.InvalidOperationException: Generation failed for Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator. System.AggregateException: One or more errors occurred. ---> System.Exception: Processing failed for file Views\Styles\MergedResourceDictionaries.xaml (System.InvalidOperationException: The type c:ReferencePictureViewer could not be found
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetType(String name) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.Reflection.cs:line 793
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetImplicitDictionaryResourceKey(XamlObjectDefinition resource) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1375
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionaryInitializers(IIndentedStringBuilder writer, XamlObjectDefinition dictionaryObject) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1263
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionary(IIndentedStringBuilder writer, XamlObjectDefinition topLevelControl) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1199
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.InnerGenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 429
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 338) ---> System.InvalidOperationException: The type c:ReferencePictureViewer could not be found
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetType(String name) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.Reflection.cs:line 793
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetImplicitDictionaryResourceKey(XamlObjectDefinition resource) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1375
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionaryInitializers(IIndentedStringBuilder writer, XamlObjectDefinition dictionaryObject) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1263
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionary(IIndentedStringBuilder writer, XamlObjectDefinition topLevelControl) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1199
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.InnerGenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 429
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 338
1>MSBUILD : error :    --- End of inner exception stack trace ---
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 346
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGeneration.<>c__DisplayClass40_0.<Generate>b__1(XamlFileDefinition file) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlCodeGeneration.cs:line 297
1>MSBUILD : error :    at System.Linq.Parallel.PartitionedDataSource`1.ListContiguousIndexRangeEnumerator.MoveNext(T& currentElement, Int32& currentKey)
1>MSBUILD : error :    at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
1>MSBUILD : error :    at System.Linq.Parallel.SpoolingTaskBase.Work()
1>MSBUILD : error :    at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
1>MSBUILD : error :    at System.Threading.Tasks.Task.Execute()
1>MSBUILD : error :    --- End of inner exception stack trace ---
1>MSBUILD : error :    at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
1>MSBUILD : error :    at System.Linq.Parallel.DefaultMergeHelper`2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute()
1>MSBUILD : error :    at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)
1>MSBUILD : error :    at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2 partitionedStream)
1>MSBUILD : error :    at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
1>MSBUILD : error :    at System.Linq.Parallel.QueryOperator`1.GetOpenedEnumerator(Nullable`1 mergeOptions, Boolean suppressOrder, Boolean forEffect, QuerySettings querySettings)
1>MSBUILD : error :    at System.Linq.Parallel.QueryOpeningEnumerator`1.OpenQuery()
1>MSBUILD : error :    at System.Linq.Parallel.QueryOpeningEnumerator`1.MoveNext()
1>MSBUILD : error :    at System.Linq.ParallelEnumerable.ToList[TSource](ParallelQuery`1 source)
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGeneration.Generate(GenerationRunInfo generationRunInfo) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlCodeGeneration.cs:line 349
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGenerator.Execute(GeneratorExecutionContext context) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlCodeGenerator.cs:line 43
1>MSBUILD : error :    at Uno.SourceGeneration.Host.SourceGeneratorEngine.<>c__DisplayClass4_1.<Generate>b__13(ValueTuple`3 generatorDef) in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 226
1>MSBUILD : error : ---> (Inner Exception #0) System.Exception: Processing failed for file Views\Styles\MergedResourceDictionaries.xaml (System.InvalidOperationException: The type c:ReferencePictureViewer could not be found
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetType(String name) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.Reflection.cs:line 793
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetImplicitDictionaryResourceKey(XamlObjectDefinition resource) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1375
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionaryInitializers(IIndentedStringBuilder writer, XamlObjectDefinition dictionaryObject) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1263
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionary(IIndentedStringBuilder writer, XamlObjectDefinition topLevelControl) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1199
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.InnerGenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 429
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 338) ---> System.InvalidOperationException: The type c:ReferencePictureViewer could not be found
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetType(String name) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.Reflection.cs:line 793
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GetImplicitDictionaryResourceKey(XamlObjectDefinition resource) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1375
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionaryInitializers(IIndentedStringBuilder writer, XamlObjectDefinition dictionaryObject) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1263
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.BuildTopLevelResourceDictionary(IIndentedStringBuilder writer, XamlObjectDefinition topLevelControl) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 1199
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.InnerGenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 429
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 338
1>MSBUILD : error :    --- End of inner exception stack trace ---
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlFileGenerator.GenerateFile() in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlFileGenerator.cs:line 346
1>MSBUILD : error :    at Uno.UI.SourceGenerators.XamlGenerator.XamlCodeGeneration.<>c__DisplayClass40_0.<Generate>b__1(XamlFileDefinition file) in C:\a\1\s\src\SourceGenerators\Uno.UI.SourceGenerators\XamlGenerator\XamlCodeGeneration.cs:line 297
1>MSBUILD : error :    at System.Linq.Parallel.PartitionedDataSource`1.ListContiguousIndexRangeEnumerator.MoveNext(T& currentElement, Int32& currentKey)
1>MSBUILD : error :    at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
1>MSBUILD : error :    at System.Linq.Parallel.SpoolingTaskBase.Work()
1>MSBUILD : error :    at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
1>MSBUILD : error :    at System.Threading.Tasks.Task.Execute()<---
1>MSBUILD : error : 
1>MSBUILD : error :    at Uno.SourceGeneration.Host.SourceGeneratorEngine.<>c__DisplayClass4_1.<Generate>b__13(ValueTuple`3 generatorDef) in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 243
1>MSBUILD : error :    at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorEnumerator`1.MoveNext(TOutput& currentElement, TKey& currentKey)
1>MSBUILD : error :    at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
1>MSBUILD : error :    at System.Linq.Parallel.SpoolingTaskBase.Work()
1>MSBUILD : error :    at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
1>MSBUILD : error :    at System.Threading.Tasks.Task.Execute()<---
1>MSBUILD : error : 

Expected behavior

There should not be any build errors because the same code works for other people. OR The error message gives indication on what to do to resolve the problem.

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

No response

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia, Uno.SourceGenerationTasks

NuGet package version(s)

    <PackageReference Include="Uno.XamlMerge.Task" Version="1.1.0-dev.12" />
    <PackageReference Include="Uno.Material" Version="2.0.0-dev.179" />
    <PackageReference Include="Uno.Microsoft.Toolkit.Uwp.DeveloperTools" Version="7.1.10" />
    <PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI.Controls" Version="7.1.10" />
    <PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Uwp.Managed" Version="2.3.0-uno.12" />
    <PackageReference Include="Uno.SourceGenerationTasks" Version="4.0.2" />
    <PackageReference Include="Uno.Toolkit.UI" Version="1.3.0-dev.11" />
    <PackageReference Include="Uno.Toolkit.UI.Material" Version="1.3.0-dev.11" />
    <PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.3.0-dev.7" />
    <PackageReference Include="Uno.UI" Version="4.3.0-dev.7" />
    <PackageReference Include="Uno.UI.RemoteControl" Version="4.3.0-dev.7" />
    <PackageReference Include="Uno.Injectable" Version="2.0.0-dev.10" />
    <PackageReference Include="Uno.CodeGen" Version="2.0.0-dev.10" />
    <PackageReference Include="Uno.UniversalImageLoader" Version="1.9.32" />

Affected platforms

Android

IDE

Visual Studio 2022

IDE version

17.1.1

Relevant plugins

No response

Anything else we need to know?

The app is using Uno.XamlMerge.Task.

I've tried the classics, namely:

Youssef1313 commented 2 years ago

@jeanplevesque Do you have a repro project?

jeanplevesque commented 2 years ago

@jeanplevesque Do you have a repro project?

Sadly no. ☹ However I'm not having this bug anymore. It might have been an issue with my dev environment.

jeromelaban commented 2 years ago

Thanks JP, let's close it for now then.