Output path for build in visual studio 2010

前端 未结 5 1160
予麋鹿
予麋鹿 2020-12-19 02:05

I need to output the project dll in program files. \"$(PROGRAMFILES)\\Microsoft...\" It is not building in program files, but in the project itself in a folder called \"$(P

相关标签:
5条回答
  • 2020-12-19 02:36

    And if you just made a new environment variable, reload visual studio as well, else it will use 'C:\' instead of your variable content.

    0 讨论(0)
  • 2020-12-19 02:42
    1. In Solution Explorer, right click your project, click "Unload Project"
    2. After the project unloads, right click on it again, click "Edit MYPROJECT.csproj"
    3. In the XML editor window that opens, change <OutputPath> elements to <OutputPath>$(ProgramFiles)</OutputPath> -- either all of them, or only those for the configurations that interest you
    4. Save and close
    5. Right click on project again, choose "Reload Project"
    6. Done!
    0 讨论(0)
  • 2020-12-19 02:47

    This sounds like a good case for a post-build event that copies the project output to the folder you want:

    copy $(TargetPath) $(PROGRAMFILES)\Microsoft...

    0 讨论(0)
  • 2020-12-19 02:52

    right click on project select properties. Select Build tab you have output section

    In output path give the specific path for you program file/microsoft. This should work. I Tested it.

    0 讨论(0)
  • 2020-12-19 03:00

    You need to open the csproj file in a text editor and manually enter your environment variables in the OutputPath section. Visual Studio escapes the '$', '(' and ')' when you try to do this from the IDE.

    0 讨论(0)
提交回复
热议问题