@@ -51,7 +51,7 @@ public TestProject([CallerMemberName] string name = null)
51
51
public List < TestPackageReference > PackageReferences { get ; } = new List < TestPackageReference > ( ) ;
52
52
53
53
public List < TestPackageReference > DotNetCliToolReferences { get ; } = new List < TestPackageReference > ( ) ;
54
-
54
+
55
55
public List < CopyFilesTarget > CopyFilesTargets { get ; } = new List < CopyFilesTarget > ( ) ;
56
56
57
57
public Dictionary < string , string > SourceFiles { get ; } = new Dictionary < string , string > ( ) ;
@@ -60,7 +60,7 @@ public TestProject([CallerMemberName] string name = null)
60
60
61
61
public Dictionary < string , string > AdditionalProperties { get ; } = new Dictionary < string , string > ( ) ;
62
62
63
- public List < KeyValuePair < string , Dictionary < string , string > > > AdditionalItems { get ; } = new ( ) ;
63
+ public List < KeyValuePair < string , Dictionary < string , string > > > AdditionalItems { get ; } = new ( ) ;
64
64
65
65
public List < Action < XDocument > > ProjectChanges { get ; } = new List < Action < XDocument > > ( ) ;
66
66
@@ -299,7 +299,7 @@ internal void Create(TestAsset targetTestAsset, string testProjectsSourceFolder,
299
299
new XAttribute ( "Include" , frameworkReference ) ) ) ;
300
300
}
301
301
}
302
-
302
+
303
303
if ( this . CopyFilesTargets . Any ( ) )
304
304
{
305
305
foreach ( var copyFilesTarget in CopyFilesTargets )
@@ -420,7 +420,7 @@ public class {safeThisName}Class
420
420
{ propertiesElements }
421
421
</ItemGroup>
422
422
<WriteLinesToFile
423
- File=`{ targetFolder } \PropertyValues.txt`
423
+ File=`$(BaseIntermediateOutputPath)\$(Configuration)\$(TargetFramework) \PropertyValues.txt`
424
424
Lines=`@(LinesToWrite)`
425
425
Overwrite=`true`
426
426
Encoding=`Unicode`
@@ -443,7 +443,7 @@ public class {safeThisName}Class
443
443
444
444
public void AddItem ( string itemName , string attributeName , string attributeValue )
445
445
{
446
- AddItem ( itemName , new Dictionary < string , string > ( ) { { attributeName , attributeValue } } ) ;
446
+ AddItem ( itemName , new Dictionary < string , string > ( ) { { attributeName , attributeValue } } ) ;
447
447
}
448
448
449
449
public void AddItem ( string itemName , Dictionary < string , string > attributes )
@@ -456,11 +456,13 @@ public void RecordProperties(params string[] propertyNames)
456
456
PropertiesToRecord . AddRange ( propertyNames ) ;
457
457
}
458
458
459
- public Dictionary < string , string > GetPropertyValues ( string testRoot , [ CallerMemberNameAttribute ] string testFolderName = "" )
459
+ public Dictionary < string , string > GetPropertyValues ( string testRoot , string configuration = "Debug" , string targetFramework = null )
460
460
{
461
461
var propertyValues = new Dictionary < string , string > ( ) ;
462
462
463
- foreach ( var line in File . ReadAllLines ( Path . Combine ( testRoot , testFolderName , "PropertyValues.txt" ) ) )
463
+ string intermediateOutputPath = Path . Combine ( testRoot , Name , "obj" , configuration , targetFramework ?? TargetFrameworks ) ;
464
+
465
+ foreach ( var line in File . ReadAllLines ( Path . Combine ( intermediateOutputPath , "PropertyValues.txt" ) ) )
464
466
{
465
467
int colonIndex = line . IndexOf ( ':' ) ;
466
468
if ( colonIndex > 0 )
0 commit comments