I am migrating my application from net48 to net60. During the migration, I have to update my custom NuGet package to support net60 and add it to my application, but during the build, I am getting an error:
WcfWrapperGenerator.targets(36, 5): Could not load file or assembly'System.Runtime, Version=6.0.0.0, Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Thesystem cannot find the file specified.
actual place where the error (line 36):
<GenerateWrappers ContractsAssemblies="@(_source)" ContractsReferences="@(_references)" OutputNamespace="$(GenWithNamespace)" OutputPath="$(GenWrapperFilesPath)">
How can I fix it?
Also, I see an error, when trying to get code analysis:
Microsoft.VisualStudio.ProjectSystem.Query.QueryExecutionException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.VisualStudio.LanguageServices.CSharp.ProjectSystemShim.EntryPointFinder.FindEntryPoints(INamespaceSymbol symbol) at Microsoft.VisualStudio.ProjectSystem.Properties.StartupObjectsEnumGenerator.<GetListedValuesAsync>d__8.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.ProjectSystem.PropertyPages.PageDynamicEnumProperty.<CreateAdmissibleValuesAsync>d__6.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.ProjectSystem.VS.Query.SupportedValueDataProducer.<CreateSupportedValuesAsync>d__1.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.ProjectSystem.VS.Query.QueryDataFromProviderStateProducerBase`1.<SendRequestAsync>d__0.MoveNext() --- End of inner exception stack trace --- at Microsoft.VisualStudio.ProjectSystem.Query.QueryExecution.QuerySubscription`1.<RunQueryOnceAsync>d__9.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.ProjectSystem.Query.QueryExecution.QuerySubscription`1.<>c__DisplayClass8_0.<<Start>b__0>d.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.ProjectPropertyDataAccess.Observer.<InitializeAsync>d__10.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.ProjectPropertyDataAccess.Observer.<CreateAsync>d__9.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.ProjectPropertiesEditor.<>c__DisplayClass0_0.<<-ctor>b__0>d.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.PropertyPages.Designer.AsyncLoadContent.<>c__DisplayClass0_0.<<Initialize>b__0>d.MoveNext()