dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.42k stars 984 forks source link

Errors in "output : windows Form" when using winforms designer #8703

Closed AlessandroMenchiniTmaxLab closed 1 year ago

AlessandroMenchiniTmaxLab commented 1 year ago

Environment

Visual Studio Community 2022 (64bit) version: 17.5.0

.NET version

.net 6.0

Did this work in a previous version of Visual Studio and/or previous .NET release?

No response

Issue description

image

Steps to reproduce

opening a Form in designer

Diagnostics

[10:09:53.053019] fail: [Geco2023]: System.IO.FileNotFoundException: Could not load file or assembly 'System.ServiceProcess.ServiceController, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Impossibile trovare il file specificato.
                        File name: 'System.ServiceProcess.ServiceController, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
                           at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
                           at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
                           at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
                           at Microsoft.DotNet.DesignTools.Server.DesignToolsServer.LoadReferencedAssemblies(AssemblyName[] referencedAssemblyNames, HashSet`1 serverDependenciesNames, CancellationToken cancellationToken)

                        Per informazioni su come risolvere i problemi della finestra di progettazione, vedere la guida all'indirizzo https://aka.ms/winforms/designer/troubleshooting.
[10:09:53.054018] fail: [Geco2023]: System.IO.FileNotFoundException: Could not load file or assembly 'System.ServiceModel.Syndication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Impossibile trovare il file specificato.
                        File name: 'System.ServiceModel.Syndication, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
                           at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
                           at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
                           at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
                           at Microsoft.DotNet.DesignTools.Server.DesignToolsServer.LoadReferencedAssemblies(AssemblyName[] referencedAssemblyNames, HashSet`1 serverDependenciesNames, CancellationToken cancellationToken)

                        Per informazioni su come risolvere i problemi della finestra di progettazione, vedere la guida all'indirizzo https://aka.ms/winforms/designer/troubleshooting.
[10:09:53.080018] fail: [Geco2023]: System.IO.FileNotFoundException: Could not load file or assembly 'System.IO.Ports, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Impossibile trovare il file specificato.
                        File name: 'System.IO.Ports, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
                           at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
                           at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
                           at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
                           at Microsoft.DotNet.DesignTools.Server.DesignToolsServer.LoadReferencedAssemblies(AssemblyName[] referencedAssemblyNames, HashSet`1 serverDependenciesNames, CancellationToken cancellationToken)

                        Per informazioni su come risolvere i problemi della finestra di progettazione, vedere la guida all'indirizzo https://aka.ms/winforms/designer/troubleshooting.
[10:09:53.086017] fail: [Geco2023]: System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.OleDb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Impossibile trovare il file specificato.
                        File name: 'System.Data.OleDb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
                           at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
                           at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
                           at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
                           at Microsoft.DotNet.DesignTools.Server.DesignToolsServer.LoadReferencedAssemblies(AssemblyName[] referencedAssemblyNames, HashSet`1 serverDependenciesNames, CancellationToken cancellationToken)

                        Per informazioni su come risolvere i problemi della finestra di progettazione, vedere la guida all'indirizzo https://aka.ms/winforms/designer/troubleshooting.
[10:09:53.086017] fail: [Geco2023]: System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.Odbc, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Impossibile trovare il file specificato.
                        File name: 'System.Data.Odbc, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
                           at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
                           at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
                           at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
                           at Microsoft.DotNet.DesignTools.Server.DesignToolsServer.LoadReferencedAssemblies(AssemblyName[] referencedAssemblyNames, HashSet`1 serverDependenciesNames, CancellationToken cancellationToken)

                        Per informazioni su come risolvere i problemi della finestra di progettazione, vedere la guida all'indirizzo https://aka.ms/winforms/designer/troubleshooting.
[10:09:53.133017] fail: [Geco2023]: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AnalysisServices.AdomdClient, Version=19.16.3.4, Culture=neutral, PublicKeyToken=89845dcd8080cc91'. Impossibile trovare il file specificato.
                        File name: 'Microsoft.AnalysisServices.AdomdClient, Version=19.16.3.4, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
                           at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
                           at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
                           at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
                           at Microsoft.DotNet.DesignTools.Server.DesignToolsServer.LoadReferencedAssemblies(AssemblyName[] referencedAssemblyNames, HashSet`1 serverDependenciesNames, CancellationToken cancellationToken)

                        Per informazioni su come risolvere i problemi della finestra di progettazione, vedere la guida all'indirizzo https://aka.ms/winforms/designer/troubleshooting.
Shyam-Gupta commented 1 year ago

@AlessandroMenchiniTmaxLab During launch, designer spawns DesignToolsServer process which loads the .NET dlls referenced by the project, to find available Types. If a dll is not available, we log the error. But this should not affect designer functionality unless those Types are used in the code.

AlessandroMenchiniTmaxLab commented 1 year ago

@AlessandroMenchiniTmaxLab During launch, designer spawns DesignToolsServer process which loads the .NET dlls referenced by the project, to find available Types. If a dll is not available, we log the error. But this should not affect designer functionality unless those Types are used in the code.

Thanks for the clarification Shyam-Gupta. Seeing these errors in the log and noting some slowdowns in the designer I thought these errors were related in some way.

Shyam-Gupta commented 1 year ago

@AlessandroMenchiniTmaxLab We have addressed several designer performance issues in recent VS releases, and we will continue to do so. Please log a new bug with details about the designer slowdowns you are experiencing and we will investigate them. Thank you.

merriemcgaw commented 1 year ago

Thanks @AlessandroMenchiniTmaxLab, I'm glad this issue turned out not to be a major thing. Please feel free to create an issue with full logs if you have further troubles.

RussKie commented 1 year ago

During launch, designer spawns DesignToolsServer process which loads the .NET dlls referenced by the project, to find available Types. If a dll is not available, we log the error. But this should not affect designer functionality unless those Types are used in the code.

fail should denote only critical issues, which prevent the designer from functioning. If this isn't a critical issue, then perhaps the log level should be dialled down to a warning.