I am trying to change the output path for build per user. I want to redirect output to Ram Disk. After many attempts i finished with something like that:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputPath>R:\VisualStudioBuilds\MyProjectName\bin\$(Configuration)\</OutputPath>
</PropertyGroup>
</Project>
But the project name is hardcoded! To change this situation i have tried another solution:
<OutputPath>R:\VisualStudioBuilds\$(ProjectName)\bin\$(Configuration)\</OutputPath>
And this doesn't work. In the end the build path is R:\VisualStudioBuilds\bin\Debug
. I have also tried out another variables like ProjectDir
, RootNameSpace
and other but still no success.
What should I do to make it work? Remember, any modification should be in .csproj.user not to team-shared .csproj.
The default output directory is :
So by default, output binaries will be created in:
Configuration can be something like "Debug" or "Release".
Depending on your project settings, these directories can vary. You can see/change those settings in :
Sorry for this delayed reply, but hope this can give you some helps.
To accomplish this issue, you can use property
$(AssemblyName)
instead of$(ProjectName)
, so the settings in the.csproj.user
looks like:That should be works for you.
Hope this helps.