Visual Studio Publishing throws System.AggregateException without details at main development-System - c#

Visual Studio Error at Publishing
Hello,
this is my first Question on this board, but i got plenty of good answers from here recently so i hope somebody could help with this specific problem:
I want to realize .net core Applications running on a Raspberry pi 4 and everything works pretty fine except that my Visual Studio throws a strange Error everytime i try to Publish the dotnetcoreapp3.1 as Self-contained linux-arm.
The Error says further there would be more information in the output log-file, but i checked it and it just said the same undetermined Error:
22.04.2020 22:44:33
System.AggregateException: One or more errors occurred. ---> System.Exception: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details.
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.Exception: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details. <---
System.Exception: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details.
===================
I tried to publish the project at another device with Visual Studio and it worked fine, after that i deinstalled visual studio and reinstalled it, after this not working i tried to repair with still no effect.
I hope somebody has an Idea how i can fix this ^^
Sincerely yours

Solved it by deleting an old unavailable nuget-path

Related

Debugger was found - this software cannot be executed under the Debugger

I am trying to debug a program I created in Visual Studio when I receive the error:
System.TypeInitializationException HResult=0x80131534 Message=The
type initializer for '' threw an exception.
Source=MaterialFileManagerSQLNet StackTrace: at
MaterialFileManagerSQLNet.frmMaterialManager.getAPILookupMaterial() in
D:\Ctes
Utilities\MaterialFileManagerSQLNet\MaterialFileManagerSQLNet\frmMaterialManager.cs:line
397 at
MaterialFileManagerSQLNet.frmMaterialManager.populateDatagrid(String
item) in D:\Ctes
Utilities\MaterialFileManagerSQLNet\MaterialFileManagerSQLNet\frmMaterialManager.cs:line
347 at MaterialFileManagerSQLNet.frmMaterialManager..ctor() in
D:\Ctes
Utilities\MaterialFileManagerSQLNet\MaterialFileManagerSQLNet\frmMaterialManager.cs:line
39 at MaterialFileManagerSQLNet.Program.Main() in D:\Ctes
Utilities\MaterialFileManagerSQLNet\MaterialFileManagerSQLNet\Program.cs:line
17
This exception was originally thrown at this call stack:
A.SBO.RG()
.()
Inner Exception 1: Exception: Debugger was found - this software
cannot be executed under the Debugger.
This is a C# WinForms program. It is adding and updating data to a sql server database hosted in a cloud.
it breaks here:
lsLookupMaterial = getAPILookupMaterial();
and resolves here:
private List<LookupMaterial> getAPILookupMaterial()
{
mGlobalSettings.saveSettings();
List<LookupMaterial> lsLookupMaterial = new List<LookupMaterial>();
if (mGlobalSettings.Server == E_Server.Local)....
I cannot even step into the function without the error occurring.
Has anyone encountered this? This feels like a project setting somewhere but I am unsure. I am already running under admin.
Turns out we have our own obfuscated code I was trying to step through. Got the latest signed code and all was well.

Visual Studio 2019 crash doing literally anything conntected to Windows Forms Designer Package (?)

I wanted to get VS Community 2019 after using 2017 for some time because i still had it.
Uninstalled VS2017 and installed VS2019
Now, i have done this today and tried reinstalling 2 times now.
My issue is: When i open VS2019 everything is normal. It is showing me all the options you have in the splashscreen, i can click on "Continue without code" without a problem. But if i try to open a .sln file, the Import Export Settings, create a new Project or open options the program crashes without a message, sometimes i get one. It is telling me:
The "Windows forms designer package" packe did not load correctly... (pointing me to an xml for logs)
I open the Activity Monitor Log and at place 643, ERROR:
CreateInstance failed for package [Windows Forms Designer
Package]Source: 'mscorlib' Description: Exception has been thrown by
the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. ---> System.TypeLoadException: Could
not load type 'System.Drawing.Design.ToolboxService' from assembly
'System.Drawing.Design, Version=4.0.0.0, Culture=neutral
And so on..
GUID: {7494682B-37A0-11D2-A273-00C04F8EF4FF}
HR: 80004005 - E_FAIL
Source: VisualStudio
I can't really figure out how to fix this, any tips or ideas are appreciated.
Thank you in advance, even if it doesn'T work. Trying is everything!
I updated windows until there were no more updates and rebooted my pc a couple of times, now it works.

System.AggregateException: Azure can't deploy website

So i have been deploying my website for some days now, suddenly i get a weird error when i try to deploy my website. I do use GIT, so maybe something went wrong there. These errors are kinda hard for me to understand. So i hope someone here can help me.
When i deploy the website, this is the error visual studio returns:
Web deployment task failed. (Web Deploy cannot modify the file 'PraktijkOpdracht.dll' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.)
And when i look into the temp file where the error get logged. I see this:
15-12-17 22:58:28
System.AggregateException: One or more errors occurred. ---> System.Exception: Publish failed due to build errors. Check the error list for more details.
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Web.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass40_0.b__2()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.ApplicationCapabilities.Publish.ViewModel.ProfileSelectorViewModel.d__108.MoveNext()
---> (Inner Exception #0) System.Exception: Publish failed due to build errors. Check the error list for more details.<---
The key to it is "it is locked by an external process." This kind of error usually can happen when the serviceplan is small dimensioned.
At that time more than one deployment is trying to succeed - before the other could finish.
Best practice to resolve could be :
extend the serviceplan
ensure to use deployment slots(make use of
parallel deploy stages)
I've experienced this before as well. I restarted my Web App and was then able to publish. This seemed to be a transient error for us.
I faced the same issue and got resolved after selected the checkbox in settings (I selected Publish to Folder)
Delete all existing files prior to publish
Precompile during publishing
Exclude files from the App_Data folder
Thanks
Minimize the path of publish folder with project name
Ex:
E:\ABC Project\bin\Release\PublishOutput
Then publish the project.
I've experienced the same in both publishing to Azure and local IIS path in my devenv
it was in Visual Studio publishing Settings > File Publish Options and uncheck Precompile during publishing checkbox
I know this was posted quite awhile ago, but I experienced this same issue and for me the problem was trying to publish my website to a folder that required administrative rights. Moving to a folder that didn't require administrative rights fixed this for me. Maybe running VS in administrator mode would also help, but I haven't tested that yet. Hopefully this helps someone at some point.
My case may be rare but FWIW I had this error/problem and it was due to a recent change to my network password. I was using VPN and Visual Studio was publishing to \server\c$... and until I disconnected from that c$ share and reconnected w/my new credentials I kept getting this VS publish error.
Same issue.
Cause was a middle application causing certificate to fail validation, in my case it was 'Fiddler'.
Troubleshooting: in VS web project -> Publish window -> click the edit pencil and then the Connection menu item on the left -> Click the Validate Connection button --->>> this will show a 'DO_NOT_TRUST_FiddlerRoot' error when the Fiddler application is in capturing mode (make sure to click "Reject" here); turn off capturing mode and click the Validate Connection to see this is the issue.
I have not looked into pulling the debug cert off VS and adding it to the Fiddler app but manual seems to work fine for the work I am doing.

MixERP database configuration error

I have cloned the project from github and followed instructions from the MixERP documentation. Built the project in visual studio successfully, installed PostgreSQL version 9.6.
When I ran the project it gave me error
relation config.mixerp not exist
We are using VS2015, PgAdmin4.
ERROR: 42P01: relation "config.mixerp" does not exist
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Npgsql.NpgsqlException: ERROR: 42P01: relation "config.mixerp" does not exist
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I was running the same version of VS and pgAdmin. I noticed that running the db scripts does not create any tables or views in the database. My suspicion is that mixerp is not completely compatible with PostgreSQL 9.6 as yet. Looking at the DbServer.config, PostgreSQL 9.4 was used during development.
A downgrade of PostgreSQL to v9.4 will resolve the issue you are experiencing. I suggest completely uninstalling PostgreSQL 9.6 and installing PostgreSQL 9.4 instead and thereafter follow the setup document again.

Stackoverflow exception in VS 2015 but not in VS2010 how?

There is a webservice project written in VS2010 few years ago and the problem is all code exactly same (same PC , Tested with vs2010 and 2015 with the same code) but in vs2015 it gives error on debug mode. Options > "Projects & Solutions" settings are all same. I took this error and definition of it;
An unhandled exception of type 'System.StackOverflowException' occurred in System.Runtime.Serialization.dll
System.StackOverflowException was unhandled Message: An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll
Anyone have idea about it , I'm really glad to attention. I could't share code because it's nearly 30.000 lines.
SOLVED
Add this to the appSettings in your web.config:
<add key="vs:EnableBrowserLink" value="false" />
After VS 2013, by default VS automatically enables Browser Link. The StackOverflowException occurs, but doesn't include any details of what happened. You can check this link for more information about the browser link feature in VS 2013: https://blogs.msdn.microsoft.com/webdev/2013/06/28/browser-link-feature-in-visual-studio-preview-2013/
You got this error, what you gonna do ....
Your project stops and not working, but that is usually not about your code.
Of course, that depends how you coding but if you didn’t write any infinite loop than its completely fine.
It’s about Visual Studio 2013, it tries to send long serialized data to browser because of “enable browser link” option.
You can fix this issue by two ways..
Add this in appSettings in your web.config
<add key="vs:EnableBrowserLink" value="false" />
Or
You can disable following option in tool menu

Categories

Resources