469 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 (43)
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
IntegrationTests.cs (6)
80TempFile file = currentDirectory.CreateFile(pair.Key); 619var slnFile = testDir.CreateFile("Console;!@(goo)'^(Application1.sln").WriteAllText( 648var appProjFile = appDir.CreateFile(@"Cons.ole;!@(goo)'^(Application1.csproj").WriteAllText( 698var appProgramFile = appDir.CreateFile("Program.cs").WriteAllText( 716var libraryProjFile = libraryDir.CreateFile("Class;!@(goo)'^(Library1.csproj").WriteAllText( 772var libraryClassFile = libraryDir.CreateFile("Class1.cs").WriteAllText(
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)
62var sourceFileA = dir.CreateFile("A.cs").WriteAllBytes(sourceBytesA1); 63var sourceFileB = dir.CreateFile("B.cs").WriteAllBytes(sourceBytesB1); 64var sourceFileC = dir.CreateFile("C.cs").WriteAllBytes(sourceBytesC1); 65var sourceFileD = dir.CreateFile("dummy").WriteAllBytes(sourceBytesD1); 66var sourceFileE = dir.CreateFile("E.cs").WriteAllBytes(sourceBytesE1); 387var sourceFilePath = dir.CreateFile(sourceFileName).WriteAllText(source, Encoding.UTF8).Path; 564var sourceFile = dir.CreateFile("a.cs").WriteAllText(source1, Encoding.UTF8); 615var sourceFile = dir.CreateFile("a.cs").WriteAllText(source1, Encoding.UTF8); 758var sourceFile = dir.CreateFile("a.cs"); 911var sourceFile = dir.CreateFile("test.cs").WriteAllText(source1, encoding); 1136var sourceFile = dir.CreateFile("a.cs"); 1237var sourceFile = dir.CreateFile("a.cs").WriteAllText(source1, Encoding.UTF8); 1280var sourceFile = dir.CreateFile("a.cs").WriteAllText(source1, Encoding.UTF8); 1341var 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 (2)
AssemblyLoadTestFixture.cs (1)
541var tempFile = directory.CreateFile($"{assemblyName}.dll");
Platform\Desktop\TestHelpers.cs (1)
93return dir.CreateFile(assemblyName + ".dll").WriteAllBytes(analyzerCompilation.EmitToArray());
Microsoft.CodeAnalysis.UnitTests (60)
AnalyzerAssemblyLoaderTests.cs (25)
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; 603var alternatePath = tempDir.CreateDirectory("a").CreateFile("Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler.dll").CopyContentFrom(externalAccessRazorPath).Path; 638var alternatePath = dir.CreateFile("Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler.dll").CopyContentFrom(externalAccessRazorPath).Path; 639var deltaFile = dir.CreateFile("Delta.dll").CopyContentFrom(testFixture.Delta1).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\AnalyzerFileReferenceAppDomainTests.cs (1)
105var analyzerFile = dir.CreateFile("MyAnalyzer.dll").WriteAllBytes(analyzerCompilation.EmitToArray());
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 (167)
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 (162)
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) 2359Dim file1 = dir.CreateFile("a.vb") 2360Dim file2 = dir.CreateFile("b.vb") 2361Dim file3 = dir.CreateFile("c.txt") 2362Dim file4 = dir.CreateDirectory("d1").CreateFile("d.txt") 2363Dim file5 = dir.CreateDirectory("d2").CreateFile("e.vb") 2406Dim file1 = folder.CreateFile("a.cs") 2407Dim file2 = folder.CreateFile("b.vb") 2408Dim file3 = folder.CreateFile("c.cpp") 2409Dim file4 = folder.CreateDirectory("A").CreateFile("A_d.txt") 2410Dim file5 = folder.CreateDirectory("B").CreateFile("B_e.vb") 2411Dim file6 = folder.CreateDirectory("C").CreateFile("B_f.cs") 2600Dim file = dir.CreateFile("a.vb") 2617Dim file = dir.CreateFile("a.vb") 2635Dim file = dir.CreateFile("a.vb") 2657Dim file = dir.CreateFile("a.vb") 2691Dim file = dir.CreateFile("a.vb") 2738Dim file = dir.CreateFile("a.vb") 2790Dim file = dir.CreateFile("a.vb") 2820Dim file = dir.CreateFile("a.ruleset") 3182Dim src = dir.CreateFile("a.vb") 3189Dim sl = dir.CreateFile("sl.json") 3215Dim src = dir.CreateFile("a.vb") 3222Dim sl = dir.CreateFile("sl.json") 3359Dim src = dir.CreateFile("embed.vb") 3360Dim src2 = dir.CreateFile("embed2.vb") 3361Dim txt = dir.CreateFile("embed.xyz") 3618Dim file = dir.CreateFile("a.vb") 3646Dim src = dir.CreateFile("a.vb").WriteAllText(source.Value) 4098Dim src = dir.CreateFile("src.vb") 4126Dim src = dir.CreateFile("a.vb") 4134Dim xml = dir.CreateFile("a.xml") 4177Dim src = dir.CreateFile("a.vb") 4186Dim xml = dir.CreateFile("a.xml") 4257Dim src = dir.CreateFile("a.vb") 4276Dim src = dir.CreateFile("a.vb") 4295Dim src = dir.CreateFile("a.vb") 4314Dim src = dir.CreateFile("a.vb") 4333Dim src = dir.CreateFile("a.vb") 4352Dim src = dir.CreateFile("a.vb") 5049Dim filePath = tempFolder.CreateFile("temp.dll").Path 5105Dim src = dir.CreateFile("src.vb") 5153Dim newVbCore = dir.CreateFile("Microsoft.VisualBasic.dll") 5172Dim src = dir.CreateFile("src.vb") 5218Dim src = dir.CreateFile("src.vb") 5244Dim sysRuntime = dir.CreateFile("System.Runtime.dll") 5263Dim msCorLib = dir.CreateFile("mscorlib.dll") 5286Dim src = dir.CreateFile("src.vb") 5309Dim msCorLib = subFolder2.CreateFile("mscorlib.dll") 5331Dim src = dir.CreateFile("src.vb") 5373Dim file = Temp.CreateDirectory().CreateFile("vb.rsp") 5762Dim file1 = dir.CreateFile(inputName1) 5765Dim file2 = dir.CreateFile(inputName2) 5905Dim file1 = dir.CreateFile(fileName) 5957Dim file = dir.CreateFile(fileName) 6010Dim file = dir.CreateFile(fileName) 6047Dim file = dir.CreateFile(fileName) 6097Dim file = dir.CreateFile(fileName) 6141Dim file = dir.CreateFile(fileName) 6189Dim file = dir.CreateFile(fileName) 6235Dim file = dir.CreateFile(fileName) 6277Dim file = dir.CreateFile(fileName) 6312Dim file = dir.CreateFile(fileName) 6344Dim file = dir.CreateFile(fileName) 6378Dim file = dir.CreateFile(fileName) 6412Dim file = dir.CreateFile(fileName) 6444Dim file = dir.CreateFile(fileName) 6468Dim file = dir.CreateFile(fileName) 6490Dim file = dir.CreateFile("a.vb") 6805Dim sourceFile = dir.CreateFile("Test.cs").WriteAllText(source.Value) 6842manifestFile = dir.CreateFile("Test.config").WriteAllText(explicitManifest.ToString()) 6887Dim source As String = folder.CreateFile("src.vb").WriteAllText("").Path 6888Dim ref As String = folder.CreateFile("ref.dll").WriteAllText("").Path 7511Dim src = dir.CreateFile("src.vb") 7615Dim file = dir.CreateFile("a.vb").WriteAllText(source) 7671Dim file = dir.CreateFile("a.vb") 7735Dim file = dir.CreateFile("a.vb") 7801baseDir.CreateFile("web1.config") 7802baseDir.CreateFile("web2.config") 7803baseDir.CreateFile("web3.config") 7992Dim file = dir.CreateFile("a.vb") 8025Dim file = dir.CreateFile("a.vb") 8290Dim file = dir.CreateFile(name) 8312Dim file = dir.CreateFile("a.vb") 8530Dim file = dir.CreateFile("a.vb") 8606Dim file = dir.CreateFile("a.vb") 8661Dim src = dir.CreateFile("a.vb") 8716Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8736Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8757Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8778Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8799Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8820Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8841Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8863Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8884Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8907Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 8930Dim ruleSetFile = dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 9098Dim source = dir.CreateFile("a.vb").WriteAllText(<text> 9103Dim additionalFile = dir.CreateFile("AdditionalFile.txt").WriteAllText(<text> 9108Dim nonCompilerInputFile = dir.CreateFile("DummyFile.txt").WriteAllText(<text> 9152Dim file = dir.CreateFile(fileName) 9347Dim src = dir.CreateFile("a.vb") 9423Dim src = dir.CreateFile("a.vb") 9461Dim src = dir.CreateFile("a.vb") 9567Dim sourceFile = dir.CreateFile(fileName) 9729workingDir.CreateFile("a.vb") 9779Dim file = dir.CreateFile("a.vb") 9823Dim file = dir.CreateFile("a.vb") 9868Dim file = dir.CreateFile("a.vb") 9893Dim file = dir.CreateFile("a.vb") 9959Dim file = dir.CreateFile("a.vb") 9997Dim file = dir.CreateFile("temp.vb") 10044Dim file = dir.CreateFile("temp.vb") 10051Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(" 10096Dim file = dir.CreateFile("temp.vb") 10145Dim file = dir.CreateFile("temp.vb") 10182Dim src = dir.CreateFile("test.vb").WriteAllText(" 10220Dim src = dir.CreateFile("test.cs").WriteAllText(" 10285Dim src = dir.CreateFile("test.vb").WriteAllText(" 10295analyzerConfig = dir.CreateFile(".globalconfig").WriteAllText($" 10299analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText($" 10332Dim src = dir.CreateFile("temp.vb").WriteAllText(" 10339Dim globalConfig = dir.CreateFile(".globalconfig").WriteAllText(" 10343Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(" 10365Dim src = dir.CreateFile("temp.vb").WriteAllText(" 10374Dim globalConfig = dir.CreateFile(".globalconfig").WriteAllText($" 10387dir.CreateFile("Rules.ruleset").WriteAllText(ruleSetSource) 10398Dim src = dir.CreateFile("temp.vb").WriteAllText(" 10405Dim globalConfig = dir.CreateFile(".globalconfig").WriteAllText(" 10420Dim srcFile = srcDirectory.CreateFile("a.vb") 10424Dim additionalFile = srcDirectory.CreateFile("b.txt") 10500Dim src = dir.CreateFile("temp.vb").WriteAllText(source) 10504Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText($" 10531Dim src = directory.CreateFile("test.vb").WriteAllText(" 10562Dim src = dir.CreateFile("test.vb").WriteAllText(" 10587Dim src = dir.CreateFile("test.vb").WriteAllText(" 10609Dim src = dir.CreateFile("test.vb").WriteAllText(" 10636Dim src = dir.CreateFile("temp.vb").WriteAllText(" 10699Dim src = dir.CreateFile("temp.vb").WriteAllText(" 10727Dim src = dir.CreateFile("test.vb").WriteAllText(" 10749Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(" 10772Dim src = dir.CreateFile("test.vb").WriteAllText(" 10794Dim analyzerConfig = dir.CreateFile(".editorconfig").WriteAllText(" 10815Dim src = dir.CreateFile("test.vb").WriteAllText(" 10837Dim 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;