Thanks for posting in Intel communities.
>>Some oneAPI DPC++ sample code projects compile within Visual Studio and some do not.
Could you please let us know the list of sample projects which are not compiling at your end?
From your screenshot, we can see that in your console application there are two mains(one from vector-add-buffers.cpp and another from vector-add-usm.cpp). So, please try to avoid giving more than one main or try using Cmake.
>>Is there some property that needs to be set within VS?
Please find the below link to set the properties for implementing DPC++ projects.
You can also use the Intel oneAPI command prompt to run the code.
Please refer to the below screenshot for more details:
If your issue still persists, Please let us know the Visual studio version and sub-version(Help-->About Microsoft Visual Studio) you are using.
Thanks and Regards,
We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks & Regards,