460 references to CreateFile
InteractiveHost.UnitTests (17)
AbstractInteractiveHostTests.cs (1)
196var file = dir.CreateFile(fileName);
InteractiveHostCoreInitTests.cs (1)
58srcDir.CreateFile("goo.csx").WriteAllText("ReferencePaths.Add(@\"" + dllDir + "\");");
InteractiveHostDesktopInitTests.cs (1)
31srcDir.CreateFile("goo.csx").WriteAllText("ReferencePaths.Add(@\"" + dllDir + "\");");
InteractiveHostDesktopTests.cs (14)
458var file1 = dir1.CreateFile("c.dll").WriteAllBytes(TestResources.General.C1); 461var file2 = dir2.CreateFile("c.dll").WriteAllBytes(TestResources.General.C2); 504var file = dir.CreateFile("c.dll").WriteAllBytes(c1.EmitToArray()); 544var file1 = dir1.CreateFile("c.dll").WriteAllBytes(c1.EmitToArray()); 548var file2 = dir2.CreateFile("c.dll").WriteAllBytes(c2.EmitToArray()); 579var file1 = dir1.CreateFile("c.dll").WriteAllBytes(c1.EmitToArray()); 583var file2 = dir2.CreateFile("c.dll").WriteAllBytes(c2.EmitToArray()); 691var initFile = initDirectory.CreateFile("init.csx"); 703var rspFile = rspDirectory.CreateFile("init.rsp"); 735var initFile = initDirectory.CreateFile("init.csx"); 741var rspFile = rspDirectory.CreateFile("init.rsp"); 910var dll = dir.CreateFile("MultiModule.dll").WriteAllBytes(TestResources.SymbolsTests.MultiModule.MultiModuleDll); 911dir.CreateFile("mod2.netmodule").WriteAllBytes(TestResources.SymbolsTests.MultiModule.mod2); 912dir.CreateFile("mod3.netmodule").WriteAllBytes(TestResources.SymbolsTests.MultiModule.mod3);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (37)
CopyRefAssemblyTests.cs (6)
46var file = dir.CreateFile("example.dll"); 64var file = dir.CreateFile("example.dll"); 84var source = dir.CreateFile("example.dll"); 86var dest = dir.CreateFile("dest.dll"); 111var source = dir.CreateFile("mvid1.dll"); 115var dest = dir.CreateFile("mvid2.dll");
DotNetSdkTests.cs (25)
26var libFile = sourcePackageDir.CreateFile("lib.cs").WriteAllText("class Lib { public void M() { } }"); 316ProjectDir.CreateFile("Project2.csproj").WriteAllText($@" 410var srcFile = ProjectDir.CreateFile("lib1.cs").WriteAllText("class C { }"); 412var srcFile2 = subdir.CreateFile("lib2.cs").WriteAllText("class D { }"); 413var editorConfigFile2 = subdir.CreateFile(".editorconfig").WriteAllText(@"[*.cs] 440var srcFile = ProjectDir.CreateFile("lib1.cs").WriteAllText("class C { }"); 442var srcFile2 = subdir.CreateFile("lib2.cs").WriteAllText("class D { }"); 443var editorConfigFile2 = subdir.CreateFile(".editorconfig").WriteAllText(@"[*.cs] 468var srcFile = ProjectDir.CreateFile("lib1.cs").WriteAllText("class C { }"); 469var globalConfigFile = ProjectDir.CreateFile(".globalconfig").WriteAllText(@"is_global = true 472var srcFile2 = subdir.CreateFile("lib2.cs").WriteAllText("class D { }"); 473var globalConfigFile2 = subdir.CreateFile(".globalconfig").WriteAllText(@"is_global = true 502var srcFile = ProjectDir.CreateFile("lib1.cs").WriteAllText("class C { }"); 503var globalConfigFile = ProjectDir.CreateFile(".globalconfig").WriteAllText(@"is_global = true 506var srcFile2 = subdir.CreateFile("lib2.cs").WriteAllText("class D { }"); 507var globalConfigFile2 = subdir.CreateFile(".globalconfig").WriteAllText(@"is_global = true 535var srcFile = ProjectDir.CreateFile("lib1.cs").WriteAllText("class C { }"); 536var globalConfigFile = ProjectDir.CreateFile(".globalconfig").WriteAllText(@"is_global = true 539var srcFile2 = subdir.CreateFile("lib2.cs").WriteAllText("class D { }"); 540var globalConfigFile2 = subdir.CreateFile(".globalconfig").WriteAllText(@"is_global = true 599var srcFile = ProjectDir.CreateFile("lib1.cs").WriteAllText("class C { }"); 600var globalConfigFile = ProjectDir.CreateFile(".globalconfig").WriteAllText(@"is_global = true 603var globalConfigFile2 = subdir.CreateFile(".globalconfig").WriteAllText(@"is_global = true 629var srcFile = ProjectDir.CreateFile("lib1.cs").WriteAllText("class C { }"); 630var globalConfigFile = ProjectDir.CreateFile("mycustom.config").WriteAllText(@"is_global = true
TargetTests.cs (1)
818_ = intermediatePathDir.CreateFile(msbuildProjectFileName + ".BuildWithSkipAnalyzers");
TestUtilities\DotNetSdkTestBase.cs (5)
166Project = ProjectDir.CreateFile(ProjectFileName).WriteAllText(s_projectSource); 167ProjectDir.CreateFile("TestClass.cs").WriteAllText(s_classSource); 170ProjectDir.CreateFile("Directory.Build.props").WriteAllText("<Project/>"); 171ProjectDir.CreateFile("Directory.Build.targets").WriteAllText("<Project/>"); 172ProjectDir.CreateFile(".editorconfig").WriteAllText("root = true");
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (43)
CommandLineIVTTests.cs (4)
26var source2 = dir.CreateFile("B.cs").WriteAllText(""" 103var source2 = dir.CreateFile("B.cs").WriteAllText(""" 181var source2 = dir.CreateFile("B.cs").WriteAllText(""" 264var source2 = dir.CreateFile("B.cs").WriteAllText("""
CommandLineTests.cs (35)
138var src = dir.CreateFile("temp.cs").WriteAllText(@" 163var src = dir.CreateFile("temp.cs").WriteAllText("class C {}"); 187var src = dir.CreateFile("test.cs").WriteAllText(@" 192var analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(@" 217var src = dir.CreateFile("Class1.cs").WriteAllText(""" 229var editorconfig = dir.CreateFile(".editorconfig").WriteAllText(""" 273var src = dir.CreateFile("test.cs").WriteAllText(@" 278var additionalFile = dir.CreateFile("file.txt"); 279var analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(@" 332var src = dir.CreateFile("test.cs").WriteAllText(@" 337var analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(@" 364var src = dir.CreateFile("test.cs").WriteAllText(@" 373var analyzerConfig1 = dir.CreateFile("analyzerconfig1").WriteAllText(configText); 374var analyzerConfig2 = dir.CreateFile("analyzerconfig2").WriteAllText(configText); 398var src = dir.CreateFile("sjis.cs").WriteAllBytes(TestResources.General.ShiftJisSource); 418var src = dir.CreateFile("sjis.cs").WriteAllBytes(TestResources.General.ShiftJisSource); 579var file = dir.CreateFile("a.cs"); 741var f = folder.CreateFile(file); 1224var file1 = dir.CreateFile("a.cs"); 1225var file2 = dir.CreateFile("b.cs"); 1226var file3 = dir.CreateFile("c.txt"); 1227var file4 = dir.CreateDirectory("d1").CreateFile("d.txt"); 1228var file5 = dir.CreateDirectory("d2").CreateFile("e.cs"); 2243var src = dir.CreateFile("a.cs"); 2246var sl = dir.CreateFile("sl.json"); 2275var src = dir.CreateFile("a.cs"); 2278var sl = dir.CreateFile("sl.json"); 2303var src = dir.CreateFile("a.cs"); 2306var sl = dir.CreateFile("sl.json"); 2429var src = dir.CreateFile("embed.cs"); 2430var src2 = dir.CreateFile("embed2.cs"); 2431var txt = dir.CreateFile("embed.xyz"); 9287TempFile tempFile = tempDir.CreateFile("a.cs").WriteAllText(@"public class A { }"); 9308tempDir.CreateFile("a.csx"); 11620var src = dir.CreateFile("a.cs").WriteAllText(source);
SarifV2ErrorLoggerTests.cs (4)
525var sourceFile1 = sourceDir.CreateFile("source1.cs").WriteAllText(source1).Path; 526var sourceFile2 = sourceDir.CreateFile("source2.cs").WriteAllText(source2).Path; 527var editorconfigFile = sourceDir.CreateFile(".editorconfig").WriteAllText(editorconfigText).Path; 678var sourceFile = errorLogDir.CreateFile("myfile.cs").WriteAllText(source);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Attributes\AttributeTests_Security.cs (2)
1478var tempFile = tempDir.CreateFile("pset.xml"); 1569var tempFile = tempDir.CreateFile("pset.xml");
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (32)
InteractiveSessionReferencesTests.cs (32)
625var file1 = dir1.CreateFile(lib1Name + ".dll").WriteAllBytes(lib1Image); 626var fileBase1 = dir1.CreateFile(libBaseName + ".dll").WriteAllBytes(libBaseImage); 629var file2 = dir2.CreateFile(lib2Name + ".dll").WriteAllBytes(lib2Image); 630var fileBase2 = dir2.CreateFile(libBaseName + ".dll").WriteAllBytes(libBaseImage); 683var file1 = dir1.CreateFile(lib1Name + ".dll").WriteAllBytes(lib1Image); 684var fileBase1 = dir1.CreateFile(libBaseName + ".dll").WriteAllBytes(libBaseImage); 687var file2 = dir2.CreateFile(lib2Name + ".dll").WriteAllBytes(lib2Image); 688var fileBase2 = dir2.CreateFile(libBaseName + ".dll").WriteAllBytes(libBaseImage); 749var file1 = dir1.CreateFile(lib1Name + ".dll").WriteAllBytes(lib1Image); 750var fileBase1 = dir1.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase1Image); 753var file2 = dir2.CreateFile(lib2Name + ".dll").WriteAllBytes(lib2Image); 754var fileBase2 = dir2.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase2Image); 817var file1 = dir1.CreateFile(lib1Name + ".dll").WriteAllBytes(lib1Image); 818var fileBase1 = dir1.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase1Image); 821var file2 = dir2.CreateFile(lib2Name + ".dll").WriteAllBytes(lib2Image); 822var fileBase2 = dir2.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase2Image); 885var file1 = dir1.CreateFile(lib1Name + ".dll").WriteAllBytes(lib1Image); 886var fileBase1 = dir1.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase1Image); 889var file2 = dir2.CreateFile(lib2Name + ".dll").WriteAllBytes(lib2Image); 890var fileBase2 = dir2.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase2Image); 953var file1 = dir1.CreateFile(lib1Name + ".dll").WriteAllBytes(lib1Image); 954var fileBase1 = dir1.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase1Image); 957var file2 = dir2.CreateFile(lib2Name + ".dll").WriteAllBytes(lib2Image); 958var fileBase2 = dir2.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase2Image); 1021var file1 = dir1.CreateFile(lib1Name + ".dll").WriteAllBytes(lib1Image); 1022var fileBase1 = dir1.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase1Image); 1025var file2 = dir2.CreateFile(lib2Name + ".dll").WriteAllBytes(lib2Image); 1026var fileBase2 = dir2.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase2Image); 1089var file1 = dir1.CreateFile(lib1Name + ".dll").WriteAllBytes(lib1Image); 1090var fileBase1 = dir1.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase1Image); 1093var file2 = dir2.CreateFile(lib2Name + ".dll").WriteAllBytes(lib2Image); 1094var fileBase2 = dir2.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase2Image);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (28)
CommandLineRunnerTests.cs (15)
381var script = dir.CreateFile("--").WriteAllText("foreach (var arg in Args) Print(arg);"); 487var script = directory.CreateFile(scriptName).WriteAllText("Print(3);"); 535dir1.CreateFile("1.csx").WriteAllText(@"Print(1);"); 538dir2.CreateFile("2.csx").WriteAllText(@"Print(2);"); 541dir3.CreateFile("3.csx").WriteAllText(@"Print(3);"); 569dir1.CreateFile("1.dll").WriteAllBytes(CreateCSharpCompilationWithCorlib("public class C1 {}", "1").EmitToArray()); 572dir2.CreateFile("2.dll").WriteAllBytes(CreateCSharpCompilationWithCorlib("public class C2 {}", "2").EmitToArray()); 575dir3.CreateFile("3.dll").WriteAllBytes(CreateCSharpCompilationWithCorlib("public class C3 {}", "3").EmitToArray()); 578dir4.CreateFile("4.dll").WriteAllBytes(CreateCSharpCompilationWithCorlib("public class C4 {}", "4").EmitToArray()); 596var main = dir.CreateFile("a.csx").WriteAllText("int X = 1;"); 632var main = dir.CreateFile("C.dll").WriteAllBytes(TestResources.General.C1); 828var file1 = dir1.CreateFile(lib1Name + ".dll").WriteAllBytes(lib1Image); 829var fileBase1 = dir1.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase1Image); 832var file2 = dir2.CreateFile(lib2Name + ".dll").WriteAllBytes(lib2Image); 833var fileBase2 = dir2.CreateFile(libBaseName + ".dll").WriteAllBytes(libBase2Image);
InteractiveSessionReferencesTests.cs (6)
39var libFile = dir.CreateFile("lib.dll").WriteAllBytes(libImage); 87var libDFile = dir2.CreateFile("libD.dll").WriteAllBytes(libDImage); 91var libAFile = dir1.CreateFile("libA.dll").WriteAllBytes(libAImage); 94var libBFile = dir2.CreateFile("libB.dll").WriteAllBytes(libBImage); 132var libBFile = dir.CreateFile("libB1.dll").WriteAllBytes(libBImage); 136var libAFile = dir.CreateFile("libA.dll").WriteAllBytes(libAImage);
InteractiveSessionTests.cs (7)
1290var fileMain = dir.CreateFile(mainName + ".dll").WriteAllBytes(mainImage); 1292dir.CreateFile(libName + ".exe").WriteAllBytes(exeImage); 1293dir.CreateFile(libName + ".winmd").WriteAllBytes(winmdImage); 1320var fileMain = dir.CreateFile(mainName + ".dll").WriteAllBytes(mainImage); 1322dir.CreateFile(libName + ".exe").WriteAllBytes(exeImage); 1323dir.CreateFile(libName + ".dll").WriteAllBytes(dllImage); 1324dir.CreateFile(libName + ".winmd").WriteAllBytes(winmdImage);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (14)
Compilation\ReferenceManagerTests.cs (3)
924string p1 = dir.CreateFile("netModule1.netmodule").WriteAllBytes(TestResources.SymbolsTests.netModule.netModule1).Path; 1038var exe1 = dir1.CreateFile("CS1704.dll").WriteAllBytes(peImage); 1041var exe2 = dir2.CreateFile("CS1704.dll").WriteAllBytes(peImage);
DocumentationComments\DocumentationCommentCompilerTests.cs (4)
3646var dir1XmlFile = dir1.CreateFile("test.xml").WriteAllText(xml1); 3649var dir2XmlFile = dir2.CreateFile("test.xml").WriteAllText(xml2); 3652var dir3XmlFile = dir3.CreateFile("test.xml").WriteAllText(xml3); 7601var xmlFile = dir.CreateFile("---.xml").WriteAllText(@"<summary attrib="""" attrib=""""/>");
Symbols\Metadata\PE\TypeForwarders.cs (7)
1560folderA.CreateFile("asm2.dll").WriteAllBytes(bitsA); 1561var asmB = folderA.CreateFile("test.exe").WriteAllBytes(bitsB); 1565folderB.CreateFile("asm0.netmodule").WriteAllBytes(bits0); 1566var asm1 = folderB.CreateFile("asm1.dll").WriteAllBytes(bits1); 1567var asm2 = folderB.CreateFile("asm2.dll").WriteAllBytes(bits2); 1568var asmB2 = folderB.CreateFile("test.exe").WriteAllBytes(bitsB); 1773var asm2 = folder.CreateFile("asm2.dll");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
EditAndContinue\EditAndContinueLanguageServiceTests.cs (1)
238var sourceFile = dir.CreateFile("test.cs").WriteAllText(source1, Encoding.UTF8);
Emit\CompilationOutputFilesTests.cs (2)
37var dllFile = dir.CreateFile("a.dll").WriteAllBytes(peImage); 38var pdbFile = dir.CreateFile("a.pdb").WriteAllBytes(pdbStream.ToArray());
Microsoft.CodeAnalysis.Features.UnitTests (16)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (14)
63var sourceFileA = dir.CreateFile("A.cs").WriteAllBytes(sourceBytesA1); 64var sourceFileB = dir.CreateFile("B.cs").WriteAllBytes(sourceBytesB1); 65var sourceFileC = dir.CreateFile("C.cs").WriteAllBytes(sourceBytesC1); 66var sourceFileD = dir.CreateFile("dummy").WriteAllBytes(sourceBytesD1); 67var sourceFileE = dir.CreateFile("E.cs").WriteAllBytes(sourceBytesE1); 388var sourceFilePath = dir.CreateFile(sourceFileName).WriteAllText(source, Encoding.UTF8).Path; 565var sourceFile = dir.CreateFile("a.cs").WriteAllText(source1, Encoding.UTF8); 616var sourceFile = dir.CreateFile("a.cs").WriteAllText(source1, Encoding.UTF8); 759var sourceFile = dir.CreateFile("a.cs"); 912var sourceFile = dir.CreateFile("test.cs").WriteAllText(source1, encoding); 1137var sourceFile = dir.CreateFile("a.cs"); 1238var sourceFile = dir.CreateFile("a.cs").WriteAllText(source1, Encoding.UTF8); 1281var sourceFile = dir.CreateFile("a.cs").WriteAllText(source1, Encoding.UTF8); 1342var sourceFile = dir.CreateFile("a.cs").WriteAllText(source1, Encoding.UTF8);
EditAndContinue\UnitTestingHotReloadServiceTests.cs (1)
32var sourceFileA = dir.CreateFile("A.cs").WriteAllText(source1, Encoding.UTF8);
EditAndContinue\WatchHotReloadServiceTests.cs (1)
43var sourceFileA = dir.CreateFile("A.cs").WriteAllText(source1, Encoding.UTF8);
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (11)
MetadataShadowCopyProviderTests.cs (11)
85var dll = dir.CreateFile("a.dll").WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSClasses01); 86var doc = dir.CreateFile("a.xml").WriteAllText("<hello>"); 140string path0 = dir.CreateFile("MultiModule.dll").WriteAllBytes(TestResources.SymbolsTests.MultiModule.MultiModuleDll).Path; 141string path1 = dir.CreateFile("mod2.netmodule").WriteAllBytes(TestResources.SymbolsTests.MultiModule.mod2).Path; 142string path2 = dir.CreateFile("mod3.netmodule").WriteAllBytes(TestResources.SymbolsTests.MultiModule.mod3).Path; 197var dll = dir.CreateFile("a.dll").WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSClasses01); 198var doc = dir.CreateFile("a.xml").WriteAllText("<hello>"); 210var dll2 = dir2.CreateFile("a2.dll").WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSClasses01); 224var dll = dir.CreateFile("a.dll").WriteAllBytes(TestResources.MetadataTests.InterfaceAndClass.CSClasses01); 225var docInvariant = dir.CreateFile("a.xml").WriteAllText("Invariant"); 226var docGreek = dir.CreateDirectory(elGR.Name).CreateFile("a.xml").WriteAllText("Greek");
Microsoft.CodeAnalysis.Scripting.UnitTests (2)
RuntimeMetadataReferenceResolverTests.cs (2)
26var assembly1 = directory.CreateFile("_1.dll"); 27var assembly2 = directory.CreateFile("_2.dll");
Microsoft.CodeAnalysis.Test.Utilities (1)
AssemblyLoadTestFixture.cs (1)
541var tempFile = directory.CreateFile($"{assemblyName}.dll");
Microsoft.CodeAnalysis.UnitTests (56)
AnalyzerAssemblyLoaderTests.cs (22)
343var delta1Copy = tempDir.CreateDirectory("a").CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta1).Path; 566var deltaFile = tempDir.CreateDirectory("a").CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta1).Path; 567var gammaFile = tempDir.CreateDirectory("b").CreateFile("Gamma.dll").CopyContentFrom(testFixture.Gamma).Path; 678var deltaFile1 = tempDir.CreateDirectory("a").CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta1).Path; 680var gammaFile = tempSubDir.CreateFile("Gamma.dll").CopyContentFrom(testFixture.Gamma).Path; 681var deltaFile2 = tempSubDir.CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta1).Path; 731var deltaFile = tempDir.CreateDirectory("a").CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta1).Path; 732var gammaFile = tempDir.CreateDirectory("b").CreateFile("Gamma.dll").CopyContentFrom(testFixture.Gamma).Path; 1051var epsilonFile = tempDir1.CreateFile("Epsilon.dll").CopyContentFrom(testFixture.Epsilon).Path; 1052var delta1File = tempDir1.CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta1).Path; 1053var delta2File = tempDir2.CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta2).Path; 1325var assemblyFilePath = dir.CreateFile(assemblyName + ".dll").WriteAllBytes(array).Path; 1491var deltaCopy = tempDir.CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta1).Path; 1516var deltaCopy = tempDir.CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta1).Path; 1551var delta1File = tempDir1.CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta1).Path; 1552var delta2File = tempDir2.CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta2).Path; 1553var gammaFile = tempDir3.CreateFile("Gamma.dll").CopyContentFrom(testFixture.Gamma).Path; 1606var tempFile = tempDir.CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta1); 1641var analyzerPath = tempDir.CreateFile("AnalyzerWithLoc.dll").CopyContentFrom(testFixture.AnalyzerWithLoc).Path; 1642var analyzerResourcesPath = tempDir.CreateDirectory("en-GB").CreateFile("AnalyzerWithLoc.resources.dll").CopyContentFrom(testFixture.AnalyzerWithLocResourceEnGB).Path; 1664var analyzerPath = tempDir.CreateFile("AnalyzerWithLoc.dll").CopyContentFrom(testFixture.AnalyzerWithLoc).Path; 1665var analyzerResourcesPath = tempDir.CreateDirectory("es").CreateFile("AnalyzerWithLoc.resources.dll").CopyContentFrom(testFixture.AnalyzerWithLocResourceEnGB).Path;
Analyzers\AnalyzerFileReferenceTests.cs (6)
199var textFile = directory.CreateFile("Goo.txt").WriteAllText("I am the very model of a modern major general.").Path; 231var textFile = directory.CreateFile("Goo.txt").WriteAllText("I am the very model of a modern major general.").Path; 310TempFile corlib = directory.CreateFile("mscorlib.dll"); 313TempFile source = directory.CreateFile("in.cs"); 339TempFile corlib = directory.CreateFile("mscorlib.dll"); 342TempFile source = directory.CreateFile("in.cs");
AssemblyUtilitiesTests.cs (12)
46var assemblyFile = directory.CreateFile("FakeAssembly.dll").Path; 58var assemblyFile = directory.CreateFile("FakeAssembly.dll").Path; 59var satelliteFile = directory.CreateFile("FakeAssembly.resources.dll").Path; 71var assemblyFile = directory.CreateFile("FakeAssembly.dll").Path; 72var satelliteFile = directory.CreateDirectory("de").CreateFile("FakeAssembly.resources.dll").Path; 84var assemblyFile = directory.CreateFile("FakeAssembly.dll").Path; 85var satelliteFile = directory.CreateDirectory("de").CreateDirectory("FakeAssembly.resources").CreateFile("FakeAssembly.resources.dll").Path; 97var assemblyFile = directory.CreateFile("FakeAssembly.dll").Path; 98var satelliteFileDE = directory.CreateDirectory("de").CreateFile("FakeAssembly.resources.dll").Path; 99var satelliteFileFR = directory.CreateDirectory("fr").CreateFile("FakeAssembly.resources.dll").Path; 111var assemblyFile = directory.CreateFile("FakeAssembly.dll").Path; 112var satelliteFile = directory.CreateDirectory("de").CreateDirectory("OtherAssembly.resources").CreateFile("FakeAssembly.resources.dll").Path;
CommonCommandLineParserTests.cs (11)
34var file = dir.CreateFile("a.ruleset"); 39var newFile = dir.CreateFile("file" + i + ".ruleset"); 471var file = dir.CreateFile("a.ruleset"); 980var file = dir.CreateFile("a.ruleset"); 982var newFile = dir.CreateFile("file1.ruleset"); 1011var file = dir.CreateFile("a.ruleset"); 1045var file = dir.CreateFile("a.ruleset"); 1048var include = dir.CreateFile("file1.ruleset"); 1094var file = dir.CreateFile("a.ruleset"); 1097var include1 = dir.CreateFile("file1.ruleset"); 1100var include2 = dir.CreateFile("file2.ruleset");
FileSystem\RelativePathResolverTests.cs (2)
167var f1 = dir1.CreateFile("f.dll").Path; 168var f2 = dir2.CreateFile("f.dll").Path;
MetadataReferences\AssemblyMetadataTests.cs (3)
59var mm = dir.CreateFile("MultiModule.dll").WriteAllBytes(TestResources.SymbolsTests.MultiModule.MultiModuleDll).Path; 60dir.CreateFile("mod2.netmodule").WriteAllBytes(TestResources.SymbolsTests.MultiModule.mod2); 61dir.CreateFile("mod3.netmodule").WriteAllBytes(TestResources.SymbolsTests.MultiModule.mod3);
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (169)
CommandLineIVTTests.vb (5)
25Dim source2 = dir.CreateFile("B.vb").WriteAllText(" 123Dim source2 = dir.CreateFile("B.vb").WriteAllText(" 224Dim source2 = dir.CreateFile("B.vb").WriteAllText(" 334Dim source2 = dir.CreateFile("B.vb").WriteAllText(" 453Dim source3 = dir.CreateFile("C.vb").WriteAllText("
CommandLineTests.vb (164)
67Dim src = dir.CreateFile("test.vb").WriteAllText(" 73Dim additionalFile = dir.CreateFile("file.txt") 74Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(" 97Dim src = dir.CreateFile("test.vb").WriteAllText(" 103Dim additionalFile = dir.CreateFile("file.txt") 104Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(" 163Dim src = dir.CreateFile("test.vb").WriteAllText(" 169Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(" 196Dim src = dir.CreateFile("test.cs").WriteAllText(" 206Dim analyzerConfig1 = dir.CreateFile("analyzerconfig1").WriteAllText(configText) 207Dim analyzerConfig2 = dir.CreateFile("analyzerconfig2").WriteAllText(configText) 230Dim src = dir.CreateFile("temp.vb").WriteAllText(" 253Dim src = dir.CreateFile("temp.cs").WriteAllText(" 348Dim file = dir.CreateDirectory("Test Path (123)").CreateFile("hellovb.vb").WriteAllText( 384Dim file = dir.CreateFile(fileName) 403Dim file = dir.CreateFile(fileName) 422Dim file = dir.CreateFile(fileName) 2358Dim file1 = dir.CreateFile("a.vb") 2359Dim file2 = dir.CreateFile("b.vb") 2360Dim file3 = dir.CreateFile("c.txt") 2361Dim file4 = dir.CreateDirectory("d1").CreateFile("d.txt") 2362Dim file5 = dir.CreateDirectory("d2").CreateFile("e.vb") 2405Dim file1 = folder.CreateFile("a.cs") 2406Dim file2 = folder.CreateFile("b.vb") 2407Dim file3 = folder.CreateFile("c.cpp") 2408Dim file4 = folder.CreateDirectory("A").CreateFile("A_d.txt") 2409Dim file5 = folder.CreateDirectory("B").CreateFile("B_e.vb") 2410Dim file6 = folder.CreateDirectory("C").CreateFile("B_f.cs") 2599Dim file = dir.CreateFile("a.vb") 2616Dim file = dir.CreateFile("a.vb") 2634Dim file = dir.CreateFile("a.vb") 2656Dim file = dir.CreateFile("a.vb") 2690Dim file = dir.CreateFile("a.vb") 2737Dim file = dir.CreateFile("a.vb") 2789Dim file = dir.CreateFile("a.vb") 2819Dim file = dir.CreateFile("a.ruleset") 3181Dim src = dir.CreateFile("a.vb") 3188Dim sl = dir.CreateFile("sl.json") 3214Dim src = dir.CreateFile("a.vb") 3221Dim sl = dir.CreateFile("sl.json") 3358Dim src = dir.CreateFile("embed.vb") 3359Dim src2 = dir.CreateFile("embed2.vb") 3360Dim txt = dir.CreateFile("embed.xyz") 3617Dim file = dir.CreateFile("a.vb") 3645Dim src = dir.CreateFile("a.vb").WriteAllText(source.Value) 4097Dim src = dir.CreateFile("src.vb") 4125Dim src = dir.CreateFile("a.vb") 4133Dim xml = dir.CreateFile("a.xml") 4176Dim src = dir.CreateFile("a.vb") 4185Dim xml = dir.CreateFile("a.xml") 4256Dim src = dir.CreateFile("a.vb") 4275Dim src = dir.CreateFile("a.vb") 4294Dim src = dir.CreateFile("a.vb") 4313Dim src = dir.CreateFile("a.vb") 4332Dim src = dir.CreateFile("a.vb") 4351Dim src = dir.CreateFile("a.vb") 5048Dim filePath = tempFolder.CreateFile("temp.dll").Path 5104Dim src = dir.CreateFile("src.vb") 5152Dim newVbCore = dir.CreateFile("Microsoft.VisualBasic.dll") 5171Dim src = dir.CreateFile("src.vb") 5217Dim src = dir.CreateFile("src.vb") 5243Dim sysRuntime = dir.CreateFile("System.Runtime.dll") 5262Dim msCorLib = dir.CreateFile("mscorlib.dll") 5285Dim src = dir.CreateFile("src.vb") 5308Dim msCorLib = subFolder2.CreateFile("mscorlib.dll") 5330Dim src = dir.CreateFile("src.vb") 5372Dim file = Temp.CreateDirectory().CreateFile("vb.rsp") 5761Dim file1 = dir.CreateFile(inputName1) 5764Dim file2 = dir.CreateFile(inputName2) 5904Dim file1 = dir.CreateFile(fileName) 5956Dim file = dir.CreateFile(fileName) 6009Dim file = dir.CreateFile(fileName) 6046Dim file = dir.CreateFile(fileName) 6096Dim file = dir.CreateFile(fileName) 6140Dim file = dir.CreateFile(fileName) 6188Dim file = dir.CreateFile(fileName) 6234Dim file = dir.CreateFile(fileName) 6276Dim file = dir.CreateFile(fileName) 6311Dim file = dir.CreateFile(fileName) 6343Dim file = dir.CreateFile(fileName) 6377Dim file = dir.CreateFile(fileName) 6411Dim file = dir.CreateFile(fileName) 6443Dim file = dir.CreateFile(fileName) 6467Dim file = dir.CreateFile(fileName) 6489Dim file = dir.CreateFile("a.vb") 6804Dim sourceFile = dir.CreateFile("Test.cs").WriteAllText(source.Value) 6841manifestFile = dir.CreateFile("Test.config").WriteAllText(explicitManifest.ToString()) 6886Dim source As String = folder.CreateFile("src.vb").WriteAllText("").Path 6887Dim ref As String = folder.CreateFile("ref.dll").WriteAllText("").Path 7510Dim src = dir.CreateFile("src.vb") 7614Dim file = dir.CreateFile("a.vb").WriteAllText(source) 7670Dim file = dir.CreateFile("a.vb") 7734Dim file = dir.CreateFile("a.vb") 7800baseDir.CreateFile("web1.config") 7801baseDir.CreateFile("web2.config") 7802baseDir.CreateFile("web3.config") 7991Dim file = dir.CreateFile("a.vb") 8024Dim file = dir.CreateFile("a.vb") 8289Dim file = dir.CreateFile(name) 8311Dim file = dir.CreateFile("a.vb") 8529Dim file = dir.CreateFile("a.vb") 8605Dim file = dir.CreateFile("a.vb") 8660Dim src = dir.CreateFile("a.vb") 8715Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8735Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8756Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8777Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8798Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8819Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8840Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8862Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8883Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8906Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8929Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 9097Dim source = dir.CreateFile("a.vb").WriteAllText(<text> 9102Dim additionalFile = dir.CreateFile("AdditionalFile.txt").WriteAllText(<text> 9107Dim nonCompilerInputFile = dir.CreateFile("DummyFile.txt").WriteAllText(<text> 9151Dim file = dir.CreateFile(fileName) 9346Dim src = dir.CreateFile("a.vb") 9422Dim src = dir.CreateFile("a.vb") 9460Dim src = dir.CreateFile("a.vb") 9566Dim sourceFile = dir.CreateFile(fileName) 9728workingDir.CreateFile("a.vb") 9778Dim file = dir.CreateFile("a.vb") 9822Dim file = dir.CreateFile("a.vb") 9867Dim file = dir.CreateFile("a.vb") 9892Dim file = dir.CreateFile("a.vb") 9958Dim file = dir.CreateFile("a.vb") 9996Dim file = dir.CreateFile("temp.vb") 10043Dim file = dir.CreateFile("temp.vb") 10050Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(" 10095Dim file = dir.CreateFile("temp.vb") 10144Dim file = dir.CreateFile("temp.vb") 10181Dim src = dir.CreateFile("test.vb").WriteAllText(" 10219Dim src = dir.CreateFile("test.cs").WriteAllText(" 10284Dim src = dir.CreateFile("test.vb").WriteAllText(" 10294analyzerConfig = dir.CreateFile(".globalconfig").WriteAllText($" 10298analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText($" 10331Dim src = dir.CreateFile("temp.vb").WriteAllText(" 10338Dim globalConfig = dir.CreateFile(".globalconfig").WriteAllText(" 10342Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(" 10364Dim src = dir.CreateFile("temp.vb").WriteAllText(" 10373Dim globalConfig = dir.CreateFile(".globalconfig").WriteAllText($" 10386dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 10397Dim src = dir.CreateFile("temp.vb").WriteAllText(" 10404Dim globalConfig = dir.CreateFile(".globalconfig").WriteAllText(" 10419Dim srcFile = srcDirectory.CreateFile("a.vb") 10423Dim additionalFile = srcDirectory.CreateFile("b.txt") 10499Dim src = dir.CreateFile("temp.vb").WriteAllText(source) 10503Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText($" 10530Dim src = directory.CreateFile("test.vb").WriteAllText(" 10561Dim src = dir.CreateFile("test.vb").WriteAllText(" 10586Dim src = dir.CreateFile("test.vb").WriteAllText(" 10608Dim src = dir.CreateFile("test.vb").WriteAllText(" 10635Dim src = dir.CreateFile("temp.vb").WriteAllText(" 10698Dim src = dir.CreateFile("temp.vb").WriteAllText(" 10726Dim src = dir.CreateFile("test.vb").WriteAllText(" 10748Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(" 10771Dim src = dir.CreateFile("test.vb").WriteAllText(" 10793Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(" 10814Dim src = dir.CreateFile("test.vb").WriteAllText(" 10836Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(" 10860Dim src = dir.CreateFile("test.vb").WriteAllText(" 10884Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText("
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
WorkspaceTestBase.cs (1)
54var file = dir.CreateFile(fileName);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
CommandLineProject\CommandLineProjectWorkspaceTests.cs (1)
23var tempFile = tempDirectory.CreateFile("CSharpClass.cs");
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (3)
ProjectSystemShim\VisualStudioCompilationOutputFilesTests.cs (3)
33var dllFile = dir.CreateFile("lib.dll"); 34var pdbFile = (pdbFormat == DebugInformationFormat.Embedded) ? null : dir.CreateFile("lib.pdb"); 83var dllFile = dir.CreateFile("lib.dll");
Roslyn.VisualStudio.Next.UnitTests (4)
Remote\SnapshotSerializationTests.cs (3)
482var file1 = dir.CreateFile("analyzer1.dll").CopyContentFrom(_testFixture.FaultyAnalyzer); 483var file2 = dir.CreateFile("analyzer2.dll").CopyContentFrom(_testFixture.FaultyAnalyzer); 567var tempCorlibXml = tempDir.CreateFile(Path.ChangeExtension(tempCorlib.Path, "xml"));
Services\ServiceHubServicesTests.cs (1)
347var file = tempRoot.CreateDirectory().CreateFile("p1.dll");
VBCSCompiler.UnitTests (20)
AnalyzerConsistencyCheckerTests.cs (2)
71var file = directory.CreateFile($"{assemblyName}.dll"); 201var dllFile = directory.CreateFile("System.Core.dll");
CompilerServerTests.cs (18)
114TempFile file = currentDirectory.CreateFile(pair.Key); 223var srcFile = tempDir.CreateFile("test.cs").WriteAllText(source).Path; 341var srcFile = _tempDirectory.CreateFile("test.cs").WriteAllText("♕").Path; 363var srcFile = _tempDirectory.CreateFile("test.vb").WriteAllText("♕").Path; 387var srcFile = _tempDirectory.CreateFile("test.vb").WriteAllText("♕").Path; 1148var srcFile = _tempDirectory.CreateFile("test.cs").WriteAllText("♕").Path; 1170var srcFile = _tempDirectory.CreateFile("test.vb").WriteAllText(@"♕").Path; 1171var tempOut = _tempDirectory.CreateFile("output.txt"); 1197var srcFile = _tempDirectory.CreateFile("test.cs").WriteAllText("♕").Path; 1219var srcFile = _tempDirectory.CreateFile("test.vb").WriteAllText(@"♕").Path; 1246_tempDirectory.CreateFile("mscorlib20.dll").WriteAllBytes(Net20.Resources.mscorlib); 1247_tempDirectory.CreateFile("mscorlib40.dll").WriteAllBytes(Net40.Resources.mscorlib); 1304var srcFile = _tempDirectory.CreateFile("test.cs").WriteAllText("♕").Path; 1305var rspFile = _tempDirectory.CreateFile("temp.rsp").WriteAllText( 1328var srcFile = _tempDirectory.CreateFile("test.cs").WriteAllText("♕").Path; 1329var rspFile = _tempDirectory.CreateFile("temp.rsp").WriteAllText( 1394var srcFile = _tempDirectory.CreateFile("test.cs").WriteAllText("").Path; 1428var srcFile = _tempDirectory.CreateFile("test.vb").WriteAllText("").Path;