I am trying to use MSBuild to build a Windows 8.1 Phone and a Windows 8.1 Desktop app. The project contains a Shared Folder for common code and a folder each for the Phone and the Desktop App. My Computer is running Windows 10 preview with Visual Studio 2015. When I try to build the app with the commandline via MSBuild:
>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild AppName.sln /p:VisualStudioVersion=14.0
I get errors because Windows is trying to create folders with a wrong path:
Creating directory "bin\Debug\C:\Users\Username\Documents\Visual Studio 2015\Projects\....".
Does anyone know how I can fix this?
change the <OutputPath></OutputPath>
You can find explanation about the tag in Visual Studio Templates
So, for example, the C# Console Application template is located in
\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplates\CSharp\Windows\1033\ConsoleApplication\consoleapplication.csproj
The csproj is an XML file that you can edit at your will. The build output directory is define like this (for each configuration):
...
<OutputPath>bin\Debug\</OutputPath>
...
<OutputPath>bin\Release\</OutputPath>
...
If you change this file, it will change all your future new C# Console Application projects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With