1

My program thrown an exception that I don't understand and VS2019 show me this message:

Exception thrown while setting fields [IdPerm] in table [userperm] with value [893]. Check the logs for details'

I'm trying to find the log file but I can't do it. I read the following articles:

1- What is the default location for MSBuild logs?

2- Visual Studio log file

3- VS2010: minimal build log in output and detailed log in log file

so I added to my .csproj these instructions

<Target Name="AfterBuild">
    <Exec Command="notepad.exe $(IntDir)\$(MSBuildProjectName).log" />
</Target>

but then when I execute on the command prompt notepad.exe $(IntDir)\$(MSBuildProjectName).log I have another error: Cannot find the path specified

Matteo
  • 316
  • 1
  • 7
  • 21
  • I don't understand, if it is your program that throws the exception, why are you looking for the Visual Studio log file? – Steve Sep 15 '21 at 13:14
  • @Steve because, as I wrote, VS shows me a message that says 'Check the logs for details' – Matteo Sep 15 '21 at 13:17
  • Is it really VS which tells you that, or your program? Where is that message shown exactly? Does your program have a logfile? – stijn Sep 15 '21 at 14:33
  • “Cannot find the path specified“ indicates there is no $(MSBuildProjectName).log file generated. I think the message “Check the logs for details” that VS shown doesn’t mean MSBuild logs. Please check if the logs are shown in one displayed/prompt window/dialog of Visual Studio and share more information with us. – Tianyu Sep 17 '21 at 08:18

0 Answers0