Please close all running VS instances and manually delete the obj and bin folders in the project folder. Then, re-launch the VS and build the project again.
How to fix Visual Studio's MSBUILD errors
Using Visual Studio, I get a clean compile with the RELEASE; however, I get MSBUILD errors with DEBUG selected. See below for the detailed messages. Here's what I did: I have VS on my local hard drive and the project on an external hard drive (via USB). I previously moved the external hard drive (with the project to another PC) to do additional run-time troubleshooting. Not sure how to fix these Msbuild errors.
Build started...
1>------ Build started: Project: HOHAdminWin, Configuration: Debug Any CPU ------
1>MSBUILD : error : This is an unhandled exception in MSBuild -- PLEASE UPVOTE AN EXISTING ISSUE OR FILE A NEW ONE AT https://aka.ms/msbuild/unhandled.
1>MSBUILD : error : System.OutOfMemoryException: Array dimensions exceeded supported range.
1>MSBUILD : error : at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
1>MSBUILD : error : at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
1>MSBUILD : error : at Microsoft.Build.Tasks.StateFileBase.DeserializeCacheT
1>MSBUILD : error : at Microsoft.Build.Tasks.ResolveAssemblyReference.ReadStateFile(FileExists fileExists)
1>MSBUILD : error : at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute(FileExists fileExists, DirectoryExists directoryExists, GetDirectories getDirectories, GetAssemblyName getAssemblyName, GetAssemblyMetadata getAssemblyMetadata, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, GetLastWriteTime getLastWriteTime, GetAssemblyRuntimeVersion getRuntimeVersion, OpenBaseKey openBaseKey, GetAssemblyPathInGac getAssemblyPathInGac, IsWinMDFile isWinMDFile, ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader)
1>MSBUILD : error : at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute()
1>MSBUILD : error : at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>MSBUILD : error : at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>MSBUILD : error : --- End of stack trace from previous location where exception was thrown ---
1>MSBUILD : error : at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
1>MSBUILD : error : at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>MSBUILD : error : at Microsoft.Build.BackEnd.TaskBuilder.<InitializeAndExecuteTask>d__24.MoveNext()
1>MSBUILD : error : --- End of stack trace from previous location where exception was thrown ---
1>MSBUILD : error : at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
1>MSBUILD : error : at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>MSBUILD : error : at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteBucket>d__19.MoveNext()
1>MSBUILD : error : --- End of stack trace from previous location where exception was thrown ---
1>MSBUILD : error : at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
1>MSBUILD : error : at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteTask>d__18.MoveNext()
1>MSBUILD : error : --- End of stack trace from previous location where exception was thrown ---
1>MSBUILD : error : at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
1>MSBUILD : error : at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>MSBUILD : error : at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteTask>d__13.MoveNext()
1>MSBUILD : error : --- End of stack trace from previous location where exception was thrown ---
1>MSBUILD : error : at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
1>MSBUILD : error : at Microsoft.Build.BackEnd.TargetEntry.<ProcessBucket>d__51.MoveNext()
1>MSBUILD : error : --- End of stack trace from previous location where exception was thrown ---
1>MSBUILD : error : at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
1>MSBUILD : error : at Microsoft.Build.BackEnd.TargetEntry.<ExecuteTarget>d__44.MoveNext()
1>MSBUILD : error : --- End of stack trace from previous location where exception was thrown ---
1>MSBUILD : error : at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
1>MSBUILD : error : at Microsoft.Build.BackEnd.TargetBuilder.<ProcessTargetStack>d__23.MoveNext()
1>MSBUILD : error : --- End of stack trace from previous location where exception was thrown ---
1>MSBUILD : error : at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
1>MSBUILD : error : at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>MSBUILD : error : at Microsoft.Build.BackEnd.TargetBuilder.<BuildTargets>d__10.MoveNext()
1>MSBUILD : error : --- End of stack trace from previous location where exception was thrown ---
1>MSBUILD : error : at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
1>MSBUILD : error : at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>MSBUILD : error : at Microsoft.Build.BackEnd.RequestBuilder.<BuildProject>d__68.MoveNext()
1>MSBUILD : error : --- End of stack trace from previous location where exception was thrown ---
1>MSBUILD : error : at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
1>MSBUILD : error : at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>MSBUILD : error : at Microsoft.Build.BackEnd.RequestBuilder.<BuildAndReport>d__59.MoveNext()
1>Done building project "HOHAdminWin.vbproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
-
Anna Xiu-MSFT 27,891 Reputation points Microsoft Vendor
2023-11-13T13:40:44.5866667+00:00