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?
NET projects are defined in the Microsoft. Common. CurrentVersion. targets file which can be found in the MSBuild bin directory.
The version of . NET Framework (4.5 and later) installed on a machine is listed in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full. If the Full subkey is missing, then . NET Framework 4.5 or above isn't installed.
Microsoft.CSharp.targets. Defines the steps in the standard build process for Visual C# projects. Imported by Visual C# project files (.csproj), which include the following statement: <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
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.
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