Reputation: 8246
I am using Visual Studio 2015 Update 3 where I am using NET Core, I have three class libraries. Here are my class libraries:
My Problem is when I am building my solution, it seems ClassLibrary1 couldn't find the dll of Redis since the dlls are placed in artifact folder in the solution's directory.
If I check the Build Output, it says that:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(262,5)
error : C:\Caching-1.0.0\src\ClassLibrary1\error CS0006:
Metadata file 'C:\Caching1.0.0\src\Microsoft.Extensions.Caching.Redis\bin\Debug\netstandard1.5\Microsoft.Extensions.Caching.Redis.dll'
could not be found
Line 262: of Microsoft.DotNet.Common.Targets
It seems the dlls are built and placed in the artifacts folder directory in the project solution. The File System Struture of the project is:
There is no any bin folder in the Cahing projects, how i can change that to make the bins generated in their corresponding projects?
Upvotes: 5
Views: 1447
Reputation: 8246
I checked the xproj file for Caching projects, it contains the build information, where it redirects the output to the artifact folder:
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\</OutputPath>
I changed both of them to point to its project folder directory
BaseIntermediateOutputPath -> .\obj\$(MSBuildProjectName)
OutputPath -> .\bin\
Then, the classLibrary1 can find the required referenced dlls now.
Upvotes: 5