I've a pactnet test in my C# project. This is the configuration it currently has:
var pactConfig = new PactConfig
{
SpecificationVersion = "2.0.0",
PactDir = @"..........pacts",
LogDir = @".pact_logs"
};
I don't like that PactDir
and LogDir
are hardcoded and I believe it's possible to add these as a linked reference in my .csproj
file and reference them in some way.
I think I need something like this in .csproj
(the like is 3 levels up):
<ItemGroup>
<Folder Include="....pacts" />
</ItemGroup>
Is that correct and even if it is, how do I reference it in my pactConfig
?
question from:
https://stackoverflow.com/questions/65923499/reference-linked-directories-instead-of-hard-coding-them-in-my-c-sharp-project 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…