You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I personally dislike having the bin and obj folder in the project directory, especially in solutions with multiple projects in them. Because of that, I have always since the beginning of time modified the BaseOutputPath and BaseIntermediateOutputPath properties in my csproj files like this:
When running just MSBuild MySolution.sln this works fine, and if I just build a single project in my solution, well either I set the SolutionDir property manually, or simply face the fact that SolutionDir is empty. All this works fine when running MSBuild from the developer command line and runs fine from building in Visual Studio.
However, neither the dotnet restore, dotnet build or even dotnet msbuild commands work with this setup. The restore command still creates the obj files in the project directory (instead of the solution directory) and the build command fails, because dependencies are not resolved correctly.
Dotnet Environment:
> dotnet --info
.NET Command Line Tools (1.0.1)
Product Information:
Version: 1.0.1
Commit SHA-1 hash: 005db40cd1
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.1
Closing this one as we have workarounds and we have a bug in msbuild tracking potentially improving it. Re-activate if there is something that we need to do in the SDK.
From @couven92 on March 18, 2017 12:32
I personally dislike having the
bin
andobj
folder in the project directory, especially in solutions with multiple projects in them. Because of that, I have always since the beginning of time modified theBaseOutputPath
andBaseIntermediateOutputPath
properties in my csproj files like this:When running just
MSBuild MySolution.sln
this works fine, and if I just build a single project in my solution, well either I set theSolutionDir
property manually, or simply face the fact thatSolutionDir
is empty. All this works fine when runningMSBuild
from the developer command line and runs fine from building in Visual Studio.However, neither the
dotnet restore
,dotnet build
or evendotnet msbuild
commands work with this setup. The restore command still creates theobj
files in the project directory (instead of the solution directory) and the build command fails, because dependencies are not resolved correctly.Dotnet Environment:
Copied from original issue: dotnet/project-system#1789
The text was updated successfully, but these errors were encountered: