I am attempting to use Intel vTune to profile a .NET 6 Console application. I am following the example from the [Intel website](https://www.intel.com/content/www/us/en/develop/documentation/vtune-cookbook/top/configuration-recipes/profiling-a-net-core-application.html).
You can find the repo [here](https://github.com/matthewcrews/vTuneTestApp).
I have vTune 2022.2 installed and I running on Windows 10 Pro Version 21H2 Build 19044.1706
I updated the default `.csproj` file to have it build symbols in release mode:
I have vTune targeting the `dotnet.exe` executable as the target application and for the command line argument I give it is the location of the `vTuneTest.dll`.
I also added the directory where the PDBs are located in the Binary/Symbol Search.
When I run the "Performance Snapshot" profiling I get the following feedback in the Collection Log.
Cannot locate file "C:\source\vTuneTestApp\bin\Release\net6.0\vTuneTestApp.dll".
"C:\source\vTuneTestApp\bin\Release\net6.0\vTuneTestApp.dll" does not have code
of the expected architecture. Make sure to specify the correct path to the file
in the Binary/Symbol Search list of directories.
What am I doing wrong? I followed the example as closely as possible and it is failing.
Thank you for posting in Intel Communities.
We have observed the same from our side as well.
This are warning messages about system and VTune modules. You can ignore them if you are not interested in profiling system functions. Otherwise please see the "Debug Information for Windows* System Libraries" help topic in VTune help.
Cannot locate file "C:\source\vTuneTestApp\bin\Release\net6.0\vTuneTestApp.dll". "C:\source\vTuneTestApp\bin\Release\net6.0\vTuneTestApp.dll" does not have code of the expected architecture. Make sure to specify the correct path to the file in the Binary/Symbol Search list of directories
It occurs when the VTune can’t find the shared dll libraries. Those libraries are compiled without debug symbols.
All the data would be collected even if the VTune throws this warning.
You are free to ignore these warnings.
For more information please refer this link: https://www.intel.com/content/www/us/en/develop/documentation/vtune-help/top/troubleshooting/error-cannot-locate-debug-info.html
You can see that I added the path to the DLLs though. Shouldn't vTune be able to find them?
Also, I did compile them with debug symbols per my question. You can see that I have the compiler generate the PDBs by the settings in the .csproj file. Therefore, something appears to be wrong with vTune since the PDBs are generated and are in the output direction and the output directory was added to the Binary/Symbols path.
We were able to resolve the issue from our end. We tried without specifying the .dll file and also didn't add the directory where the PDBs are located in the Binary/Symbol Search .
Could you Please try not to specify .dll file in the input parameter. Also make sure to reset the search symbols.