Azure DevOps + LibMan + UNPKG Intermittent Error LIB010: Failed to download resource from unpkg.com - msbuild

I've setup Continuous Integration on Azure DevOps but I keep getting an intermittent issue whereby libman fails to download a resource here's a few examples:
##[error]libman.json(0,0): Error LIB010: Failed to download resource from "http://unpkg.com/devextreme#18.2.6/dist/css/icons/dxiconsmaterial.woff2"
##[error]libman.json(0,0): Error LIB010: Failed to download resource from "http://unpkg.com/globalize#1.4.2/dist/globalize-runtime/date.js"
##[error]libman.json(0,0): Error LIB010: Failed to download resource from "http://unpkg.com/cropperjs#2.0.0-alpha/src/js/preview.js"
It's always a different package that's causing the error so I'm assuming it's a timeout issue (either too slow or I'm abusing it - not sure).
Here's the actual exception message:
exception was thrown --- [d:\a\1\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build\1.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error : at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [d:\a\1\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build\1.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error : at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [d:\a\1\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build\1.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error : at Microsoft.Web.LibraryManager.CacheService.<RefreshCacheAsync>d__9.MoveNext() [d:\a\1\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build\1.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error : --- End of stack trace from previous location where exception was thrown --- [d:\a\1\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build\1.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error : at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) [d:\a\1\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build\1.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error : at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) [d:\a\1\s\MyAppPortal\MyAppPortal.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build\1.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): error : at Microsoft.Web.LibraryManager.Providers.Unpkg.UnpkgProvider.<RefreshCacheAsync>d__22.MoveNext() [d:\a\1\s\MyAppPortal\MyAppPortal.csproj]
[error]C:\Users\VssAdministrator\.nuget\packages\microsoft.web.librarymanager.build\1.0.172\build\Microsoft.Web.LibraryManager.Build.targets(35,9): Error : Microsoft.Web.LibraryManager.Contracts.ResourceDownloadException: Failed to download resource from "http://unpkg.com/knockout#3.4.0/package.json"
at Microsoft.Web.LibraryManager.WebRequestHandler.<GetStreamAsync>d__5.MoveNext()
How can I remedy this issue? Is there a way of caching and reusing the downloaded packages on DevOps the same way VS does when running a build?

There's an updated version of the LibraryManager package which retries the downloads a few times. Install the latest and see if that helps with the problem.

Related

Visual Studio 2022 - An error occurred while loading the project properties editor

I recently installed VS 2022 and opened a project I am working on which has been created and worked ok on VS 2019.
When using VS 2022 and trying to access the properties window of the application I get the following error:
=====================
09/09/2022 08:18:28
Recoverable
Microsoft.VisualStudio.ProjectSystem.Query.QueryExecutionException: '>' is an unexpected token. The expected token is '='. Line 9, position 16. ---> System.Xml.XmlException: '>' is an unexpected token. The expected token is '='. Line 9, position 16.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(TextReader textReader, LoadOptions options)
at Microsoft.VisualStudio.ProjectSystem.VS.WindowsForms.MyAppDocument..ctor(DocData docData)
at Microsoft.VisualStudio.ProjectSystem.VS.WindowsForms.MyAppFileAccessor.<TryGetMyAppFileAsync>d__18.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.WindowsForms.MyAppFileAccessor.<GetStringPropertyValueAsync>d__20.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.WindowsForms.MyAppFileAccessor.<GetBooleanPropertyValueAsync>d__21.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.WindowsForms.MyAppFileAccessor.<GetEnableVisualStylesAsync>d__31.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.Properties.ApplicationFrameworkValueProvider.<GetPropertyValueAsync>d__32.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.Properties.InterceptedProjectProperties.<GetUnevaluatedPropertyValueAsync>d__3.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.PropertyPages.PageProperty.<GetUnevaluatedValueFromDataSourceAsync>d__41.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.UIPropertyValueDataProducer.<CreateUIPropertyValueValueAsync>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.UIPropertyValueDataProducer.<CreateUIPropertyValueValueAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.VS.Query.UIPropertyValueDataProducer.<CreateUIPropertyValueValuesAsync>d__2.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()
===================
I have tried various thing suggested on other threads where users were unable to access the properties of their solution like:
Disable all extensions, restart VS
Re-enable all extensions, restart VS
Remove %AppData%\Microsoft\VisualStudio folder and restart VS
Once the %AppData%\Microsoft\VisualStudio folder got re-created, remove it again and run VS 2022 as administrator
Instead of right clicking VS 2022 on my taskbar and clicking the project I want to open, I tried opening it directly from the .sln file
Also tried opening VS 2022 and going to File > Open > Project/Solution and finding my project and opening it this way
None of the above have worked.
Do I need to re-create this project in VS 2022 for this to work or does someone have any knowledge of this error and has resolved it in the past and could share their information?
I found this error after converting a .NET Framework WinForms project to .NET 6 WinForms project. I found that the upgrade assistant had added <UseWPF>true</UseWPF> to the project file.
Removing this fixed the issue.

Docker Desktop installation failed:Failed to start service

Failed to start service: The service did not respond to the start or control request in a timely fashion
at CommunityInstaller.Service.Service.<StartAsync>d__4.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 CommunityInstaller.Service.Manager.<AddServiceAsync>d__7.MoveNext()
Could you please resolve this?
Started on: 2021-06-05 19:17:13.110
File: C:\Users\****\AppData\Local\Docker\install-log.txt
CommandLine: "C:\***\Docker Desktop Installer.exe"
[19:17:13.119][ManifestAndExistingInstallationLoader] No install path specified, looking for default installation registry key
[19:17:13.122][Program] No installation found
[19:17:13.328][InstallWorkflow] Cancel pending background download
[19:17:13.352][InstallWorkflow] Using package: res:DockerDesktop
[19:17:13.355][InstallWorkflow] Downloading
[19:17:15.436][InstallWorkflow] Extracting manifest
[19:17:16.725][InstallWorkflow] Manifest found: version=64133, displayVersion=3.3.3, channelUrl=https://desktop.docker.com/win/stable/amd64/appcast.xml
[19:17:16.726][InstallWorkflow] Checking prerequisites
[19:17:17.599][InstallWorkflow] Prompting for optional features
[19:17:20.159][InstallWorkflow] Unpacking artifacts
[19:19:43.911][InstallWorkflow] Deploying component CommunityInstaller.CreateGroupAction
[19:19:48.727][InstallWorkflow] Deploying component CommunityInstaller.AddToGroupAction
[19:19:48.737][InstallWorkflow] Deploying component CommunityInstaller.ServiceAction
[19:19:48.740][InstallWorkflow-ServiceAction] Removing service
[19:19:48.744][InstallWorkflow-ServiceAction] Creating service
[19:19:51.300][InstallWorkflow] Installation failed
Exception type: System.Exception, Exception message: Component CommunityInstaller.ServiceAction failed: Failed to start service: The service did not respond to the start or control request in a timely fashion, StackTrace:
at CommunityInstaller.InstallWorkflow.<DoHandleD4WPackageAsync>d__29.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 CommunityInstaller.InstallWorkflow.<DoProcessAsync>d__23.MoveNext()
[19:19:51.302][InstallWorkflow] Rollbacking component CommunityInstaller.AddToGroupAction
[19:19:51.304][InstallWorkflow] Rollbacking component CommunityInstaller.CreateGroupAction
[19:19:51.305][InstallWorkflow] Rollbacking component CommunityInstaller.UnpackArtifactsStep
[19:19:51.312][FileSystem] Deleting C:\Program Files\Docker\Docker
[19:19:51.758][FileSystem] Deleted C:\Program Files\Docker\Docker successfully
[19:19:51.759][InstallWorkflow] Rollbacking component CommunityInstaller.ExtractManifestStep
[19:19:51.760][InstallWorkflow] Rollbacking component CommunityInstaller.DownloadStep
Just disable the power service using the below steps,
Open msconfig.exe in the windows menu bar
Go to the "services" tab
Start typing "power" and it will auto find the correct service.
Untick the checkbox
Restart your PC
Make sure you do not have any Docker installation files in your
drive
Start the installation process again and hopefully that'll work for
you.

Sitecore Express Migration Tool 3.0 - Error on run

I am trying to migrate a Sitecore 8.0 installation to Sitecore 9.0, and the documentation in the Sitecore Developer portal suggests using the Sitecore Express Migration Tool as the most painless way to do this. However, when I run the application I get an immediate error:
An unexpected error has occured. Please restart the tool and try again. For more information, see the log files.
I checked the log files and I only see this:
[ 1] 11:40:43.421 INFO [WizardCore] Moving to the next step. Current step key: ''.
[ 1] 11:40:43.510 ERROR Unable to perform wizard step transition. Source: <no>, Target: basic_parameters_step.
System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at Sitecore.ExpressMigration.Core.Plugin.PluginRepository.LoadPlugins() in C:\BA\e849cf469cb4cf58\src\Sitecore.ExpressMigration.Core\Plugin\PluginRepository.cs:line 44
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at Sitecore.ExpressMigration.Pipelines.WizardSteps.CreateBasicParameters.AddModuleVersionSelectors.Process(CreateBasicParametersArgs args) in C:\BA\e849cf469cb4cf58\src\Sitecore.ExpressMigration\Pipelines\WizardSteps\CreateBasicParameters\30_AddModuleVersionSelectors.cs:line 54
at Sitecore.ExpressMigration.Core.Pipelines.PipelinesService.Pipeline.Run[T](T args) in C:\BA\e849cf469cb4cf58\src\Sitecore.ExpressMigration.Core\Pipelines\PipelinesService\Pipeline.cs:line 54
at Sitecore.ExpressMigration.Wizard.Steps.Start.BasicParameters.BasicParametersStep.CreateRootDataRequest(Migration migration) in C:\BA\e849cf469cb4cf58\src\Sitecore.ExpressMigration\Wizard\Steps\Start\BasicParameters\BasicParametersStep.cs:line 119
at Sitecore.ExpressMigration.Wizard.Steps.Start.BasicParameters.BasicParametersStep.<OnBeforeStepEnterAsync>d__29.MoveNext() in C:\BA\e849cf469cb4cf58\src\Sitecore.ExpressMigration\Wizard\Steps\Start\BasicParameters\BasicParametersStep.cs:line 84
--- 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 Sitecore.ExpressMigration.Wizard.Core.WizardCore.<PerformStepTransitionAsync>d__51.MoveNext() in C:\BA\e849cf469cb4cf58\src\Sitecore.ExpressMigration\Wizard\Core\WizardCore.cs:line 220
[ 1] 11:41:06.247 INFO [WizardCore] Moved to the next step. Current step key: ''.
This is default, without any configuration changes; the system paths referenced do not exist on my system (C:\BA\e849cf469cb4cf58) and I'm not sure how to specify where my actual Sitecore project folder is. I've been looking through the migration document on the Developer portal, but everything documented is written assuming starting the application worked.
What can I do to get past this error? Is there some configuration changes I need to make?
Open Sitecore.ExpressMigration.exe.config
Add the following line <loadFromRemoteSources enabled="true" /> to the <runtime> section

VS for Mac doesn't build if Proxifier is running

Can not build in Visual Studio Mac (Used to be Xamarin)
Nothing builds or cleans. Not even a console app. I am using version 7.1.5 on macOS 10.12.6.
I uninstalled and reinstall and still the same issue.
Error: Build failed. See the build log for details.
This is the error in the build log:
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /private/tmp/source-mono-d15-3/bockbuild-d15-3/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535
at MonoDevelop.Projects.Project+<>c__DisplayClass142_1+<<RunMSBuildTarget>b__0>d.MoveNext () [0x00113] in /Users/builder/data/lanes/5123/7afedcae/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs:1200
--- End of stack trace from previous location where exception was thrown ---
Update1:
This only happens when I am using Proxifier Version 2.21
http://www.proxifier.com/mac/
Update2:
Filed as a bug here: https://bugzilla.xamarin.com/show_bug.cgi?id=60008
Also contacted proxifier.

MissingMethodException with xsp4 and asp.net 4.5

I am trying to test a web site with xsp4, all assemblies are compiled for target framework 4.5. I get the following stack trace.
Exception during TraceManager initialization:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Web.Configuration.TraceSection ---> System.MissingMethodException: Method not found: 'System.Configuration.ConfigurationProperty..ctor'.
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
A search here on stackoverflow (and other places) found that a possible reason is that xsp4 runs within the 4.0 directory of mono. Mine is already located in 4.5 and is used by the xsp script, so I am stuck with this one. Any ideas?
Found it. The error resulted from having a FSharp.Core.Dll within the bin folder. It is a mixed F# / C# project and a local copy is not needed, if the Dll resides within the GAC. Removing it made the error disappear.