@@ -907,7 +907,7 @@ public void DllInSourceFiles_WillBeAddedAsReference()
907907 XmlDocument scriptProject = XMLUtilities . FromText ( csprojFileContents ) ;
908908 XMLUtilities . AssertCompileItemsMatchExactly ( scriptProject , new [ ] { "file.cs" } ) ;
909909 XMLUtilities . AssertNonCompileItemsMatchExactly ( scriptProject , new string [ 0 ] ) ;
910- Assert . IsTrue ( csprojFileContents . MatchesRegex ( $ "<Reference Include=\" reference\" >\\ W*<HintPath>{ referenceDll } \\ W*</HintPath>\\ W*</Reference>") ) ;
910+ Assert . IsTrue ( csprojFileContents . MatchesRegex ( $ "<Reference Include=\" reference\" >\\ W*<HintPath>{ referenceDll } \\ W*</HintPath>\\ W*<Private>False</Private> \\ W*< /Reference>") ) ;
911911 }
912912
913913 [ Test ]
@@ -922,7 +922,7 @@ public void Containing_PathWithSpaces_IsParsedCorrectly()
922922 synchronizer . Sync ( ) ;
923923
924924 var csprojFileContents = m_Builder . ReadProjectFile ( m_Builder . Assembly ) ;
925- Assert . IsTrue ( csprojFileContents . MatchesRegex ( $ "<Reference Include=\" Goodbye\" >\\ W*<HintPath>{ Regex . Escape ( fullPathReferences [ 0 ] . ReplaceDirectorySeparators ( ) ) } \\ W*</HintPath>\\ W*</Reference>") ) ;
925+ Assert . IsTrue ( csprojFileContents . MatchesRegex ( $ "<Reference Include=\" Goodbye\" >\\ W*<HintPath>{ Regex . Escape ( fullPathReferences [ 0 ] . ReplaceDirectorySeparators ( ) ) } \\ W*</HintPath>\\ W*<Private>False</Private> \\ W*< /Reference>") ) ;
926926 }
927927
928928 [ Test ]
@@ -951,8 +951,8 @@ public void Multiple_AreAdded()
951951
952952 var csprojFileContents = m_Builder . ReadProjectFile ( m_Builder . Assembly ) ;
953953
954- Assert . IsTrue ( csprojFileContents . MatchesRegex ( "<Reference Include=\" Hello\" >\\ W*<HintPath>Hello.dll</HintPath>\\ W*</Reference>" ) ) ;
955- Assert . IsTrue ( csprojFileContents . MatchesRegex ( "<Reference Include=\" MyPlugin\" >\\ W*<HintPath>MyPlugin.dll</HintPath>\\ W*</Reference>" ) ) ;
954+ Assert . IsTrue ( csprojFileContents . MatchesRegex ( "<Reference Include=\" Hello\" >\\ W*<HintPath>Hello.dll</HintPath>\\ W*<Private>False</Private> \\ W*< /Reference>" ) ) ;
955+ Assert . IsTrue ( csprojFileContents . MatchesRegex ( "<Reference Include=\" MyPlugin\" >\\ W*<HintPath>MyPlugin.dll</HintPath>\\ W*<Private>False</Private> \\ W*< /Reference>" ) ) ;
956956 }
957957
958958 [ Test ]
@@ -989,8 +989,8 @@ public void AssemblyReferenceFromInternalizedPackage_IsAddedAsReference()
989989 var csprojFileContents = m_Builder . ReadProjectFile ( m_Builder . Assembly ) ;
990990 Assert . That ( csprojFileContents , Does . Not . Match ( $@ "<ProjectReference Include=""{ assemblyReferences [ 0 ] . name } \.csproj"">[\S\s]*?</ProjectReference>") ) ;
991991 Assert . That ( csprojFileContents , Does . Not . Match ( $@ "<ProjectReference Include=""{ assemblyReferences [ 1 ] . name } \.csproj"">[\S\s]*?</ProjectReference>") ) ;
992- Assert . That ( csprojFileContents , Does . Match ( $ "<Reference Include=\" { assemblyReferences [ 0 ] . name } \" >\\ W*<HintPath>{ Regex . Escape ( assemblyReferences [ 0 ] . outputPath . ReplaceDirectorySeparators ( ) ) } </HintPath>\\ W*</Reference>") ) ;
993- Assert . That ( csprojFileContents , Does . Match ( $ "<Reference Include=\" { assemblyReferences [ 1 ] . name } \" >\\ W*<HintPath>{ Regex . Escape ( assemblyReferences [ 1 ] . outputPath . ReplaceDirectorySeparators ( ) ) } </HintPath>\\ W*</Reference>") ) ;
992+ Assert . That ( csprojFileContents , Does . Match ( $ "<Reference Include=\" { assemblyReferences [ 0 ] . name } \" >\\ W*<HintPath>{ Regex . Escape ( assemblyReferences [ 0 ] . outputPath . ReplaceDirectorySeparators ( ) ) } </HintPath>\\ W*<Private>False</Private> \\ W*< /Reference>") ) ;
993+ Assert . That ( csprojFileContents , Does . Match ( $ "<Reference Include=\" { assemblyReferences [ 1 ] . name } \" >\\ W*<HintPath>{ Regex . Escape ( assemblyReferences [ 1 ] . outputPath . ReplaceDirectorySeparators ( ) ) } </HintPath>\\ W*<Private>False</Private> \\ W*< /Reference>") ) ;
994994 }
995995
996996 [ Test ]
@@ -1006,8 +1006,8 @@ public void CompiledAssemblyReference_IsAdded()
10061006 synchronizer . Sync ( ) ;
10071007
10081008 var csprojFileContents = m_Builder . ReadProjectFile ( m_Builder . Assembly ) ;
1009- Assert . IsTrue ( csprojFileContents . MatchesRegex ( $ "<Reference Include=\" Hello\" >\\ W*<HintPath>{ Regex . Escape ( compiledAssemblyReferences [ 0 ] ) } </HintPath>\\ W*</Reference>") ) ;
1010- Assert . IsTrue ( csprojFileContents . MatchesRegex ( $ "<Reference Include=\" MyPlugin\" >\\ W*<HintPath>{ Regex . Escape ( compiledAssemblyReferences [ 1 ] ) } </HintPath>\\ W*</Reference>") ) ;
1009+ Assert . IsTrue ( csprojFileContents . MatchesRegex ( $ "<Reference Include=\" Hello\" >\\ W*<HintPath>{ Regex . Escape ( compiledAssemblyReferences [ 0 ] ) } </HintPath>\\ W*<Private>False</Private> \\ W*< /Reference>") ) ;
1010+ Assert . IsTrue ( csprojFileContents . MatchesRegex ( $ "<Reference Include=\" MyPlugin\" >\\ W*<HintPath>{ Regex . Escape ( compiledAssemblyReferences [ 1 ] ) } </HintPath>\\ W*<Private>False</Private> \\ W*< /Reference>") ) ;
10111011 }
10121012
10131013 [ Test ]
@@ -1019,7 +1019,7 @@ public void ProjectReference_FromLibraryReferences_IsAdded()
10191019 synchronizer . Sync ( ) ;
10201020
10211021 var csprojFileContents = m_Builder . ReadProjectFile ( m_Builder . Assembly ) ;
1022- Assert . IsFalse ( csprojFileContents . MatchesRegex ( $ "<Reference Include=\" { projectAssembly . name } \" >\\ W*<HintPath>{ Regex . Escape ( projectAssembly . outputPath . ReplaceDirectorySeparators ( ) ) } </HintPath>\\ W*</Reference>") ) ;
1022+ Assert . IsFalse ( csprojFileContents . MatchesRegex ( $ "<Reference Include=\" { projectAssembly . name } \" >\\ W*<HintPath>{ Regex . Escape ( projectAssembly . outputPath . ReplaceDirectorySeparators ( ) ) } </HintPath>\\ W*<Private>False</Private> \\ W*< /Reference>") ) ;
10231023 }
10241024
10251025 [ Test ]
0 commit comments