How to get 'Build output path' And 'Resources Folder'

Mansour_Dalir 2,016 Reputation points
2023-07-20T05:51:33.8233333+00:00

hi

vs2019

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,778 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jiachen Li-MSFT 33,446 Reputation points Microsoft Vendor
    2023-07-20T06:29:49.0566667+00:00

    Hi @Mansour_Dalir ,

    By default, the Build output path is the directory of the current assembly, assuming that the resource files are located in the subdirectory "Resources" of the current assembly.

            Dim assemblyPath As String = Assembly.GetExecutingAssembly().Location
    
            Dim assemblyDirectory As String = Path.GetDirectoryName(assemblyPath)
    
            Dim buildOutputPath As String = assemblyDirectory
    
            Dim resourcesDirectory As String = Path.Combine(assemblyDirectory, "Resources")
    

    Best Regards.

    Jiachen Li


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.