Reputation: 2583
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 "$(PROGRAMFILES)"!
How do I build in program files??
Upvotes: 10
Views: 16780
Reputation: 31
And if you just made a new environment variable, reload visual studio as well, else it will use 'C:\' instead of your variable content.
Upvotes: 3
Reputation: 437734
<OutputPath>
elements to <OutputPath>$(ProgramFiles)</OutputPath>
-- either all of them, or only those for the configurations that interest youUpvotes: 21
Reputation: 2651
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.
Upvotes: 0
Reputation: 971
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...
Upvotes: 1
Reputation: 2547
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.
Upvotes: 0