问题
The question is related to DotnetCore project IntermediateOutputPath leaves some files in the solution directory
In order to move away all temporary folders (build and output) from the solution directory, the following modification to the .csproj file has been made
<Project>
<PropertyGroup>
<BuildDIrectory>C:\Temp\Build\$(Configuration)</BuildDIrectory>
<BaseIntermediateOutputPath>$(BuildDIrectory)\obj\$(AssemblyName)\</BaseIntermediateOutputPath>
<OutputPath>$(BuildDIrectory)\out\$(AssemblyName)\</OutputPath>
<DocumentationFile> $(BuildDIrectory)\Documentation\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
The problem happens with a specific Nuget Package - it is lost. I.e. when it is added, Solution Explorer/Project/Dependencies/Packages blinks and then disappears. If I try to use in the code classes defined in the Nuget Package, they are not recognized. Changing the first line back to the default
<Project Sdk="Microsoft.NET.Sdk">
loads the package immediately.
来源:https://stackoverflow.com/questions/58502644/dotnetcore-project-with-changed-intermediateoutputpath-some-nuget-packages-are