0

I'm trying to compile my solution developed with VS2019, but at the end of the process I get the following error: ASPNETCOMPILER (0,0): ASPRUNTIME error: Object reference not set as an instance of an object.

I tried to:

  • Remove all *.refresh files at bin folder.
  • Execute VS2019 as Administrator.
  • Installed and executed "Clear MEF Components Caché" plugin.
  • Changed "combination options".
  • Deleted old files at temp folder.

This is the prompt I face at VS2019

The log file displays the following code:

10/09/2020 15:08:22
System.AggregateException: One or more errors occurred. ---> System.Exception: Compilation error. Check the output window for more details.
   --- End of inner exception stack trace ---
   is System.Threading.Tasks.Task.ThrowIfExceptional (Boolean includeTaskCanceledExceptions)
   is System.Threading.Tasks.Task.Wait (Int32 millisecondsTimeout, CancellationToken cancellationToken)
   is Microsoft.WebTools.Publish.PublishService.VsWebProjectPublish. <> c__DisplayClass43_0. <PublishAsync> b__3 ()
   is System.Threading.Tasks.Task`1.InnerInvoke ()
   is System.Threading.Tasks.Task.Execute ()
--- End of stack trace from previous location where exception occurred ---
   is System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (task)
   is System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task Task)
   is Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel. <RunPublishTaskAsync> d__213.MoveNext ()
---> (Internal exception no. 0) System.Exception: Compilation error. Check the output window for more details. <---

System.Exception: Compilation error. Check the output window for more details.

===================

And the output window: enter image description here

But nothing of these options worked for me. CAn someone help me?

Jack J Jun
  • 5,633
  • 1
  • 9
  • 27
Pimager
  • 169
  • 1
  • 3
  • 12
  • You are getting a runtime error. It is possible that your compiler is running an application as part of the compiling which is getting a runtime error. You need to check the log files for the ASPNETCOMPILE to get more info. – jdweng Sep 10 '20 at 12:41
  • I edited my question by adding more info. – Pimager Sep 10 '20 at 13:16
  • Looks like you are trying to Publish the results of a query and there was no data in the query. The problem is before you try to publish. You need a valid query that returns data before you publish. – jdweng Sep 10 '20 at 13:24
  • In case you missed https://stackoverflow.com/questions/26838946/aspnetcompiler0-0-error-aspruntime-object-reference-not-set-to-an-instance-o#:~:text=then%20you%20need%20to%20make,This%20will%20fix%20this%20issue. – gkulshrestha Sep 10 '20 at 16:35
  • @gkulshrestha thanks, but I also stopped my antivirus, and still not working – Pimager Sep 14 '20 at 07:45
  • @jdweng Can you explain it better? I don't understand you. Each time I try to publish, this message appears on diferent moment, sometimes before and sometimes later. – Pimager Sep 14 '20 at 07:46
  • What object are you trying to publish? Is it empty or does it contain data? – jdweng Sep 14 '20 at 08:11
  • @jdweng I'm trying to publish my whole solution, that conains some webpages, libraries, and webservices. SOme days ago it works properly, but since 5 days I can't. – Pimager Sep 14 '20 at 08:15
  • Are you using a database? The connection to the database is not returning data. If data is from a httprequest it is possible a windows security update disable TLS 1.0/1.1. – jdweng Sep 14 '20 at 08:48
  • @jdweng I'm using MySql database, it is well connected. – Pimager Sep 14 '20 at 09:38
  • What does the log file indicate? The file give in the detail error message. – jdweng Sep 14 '20 at 09:43

0 Answers0