33 references to File
dotnet.Tests (8)
CommandTests\Run\RunFileTests.cs (6)
1952new DirectoryInfo(testInstance.Path).File("msbuild.binlog").Should().Exist(); 2078packageDir.File("MyFileBasedTool.1.0.0.nupkg").Should().Exist(); 2121new DirectoryInfo(outputDir).File("MyFileBasedTool.1.0.0.nupkg").Should().Exist(); 2148var dllFile = artifactsDir.File("bin/debug/Program.dll"); 2815var nonGeneratedFile = codeFolder.File("CSharpCompilerCommand.cs"); 2822var codeFilePath = codeFolder.File("CSharpCompilerCommand.Generated.cs");
PackagedCommandTests.cs (2)
187SetGeneratedPackageName(appWithDepOnToolDir.File("AppWithDepOnTool.csproj"), 190SetGeneratedPackageName(toolWithRandPkgNameDir.File("ToolWithRandomPackageName.csproj"),
EndToEnd.Tests (1)
ProjectBuildTests.cs (1)
287Assert.True(directoryInfo.File($"{expectedItemName}.{languageExtensionMap[language]}") != null);
Microsoft.NET.Build.Tests (14)
COMReferenceTests.cs (5)
59var runCommand = new RunExeCommand(Log, outputDirectory.File("UseComReferences.exe").FullName); 120Assert.True(outputDirectory.File($"Interop.{vslangProj70ComRef}").Exists); 121Assert.True(outputDirectory.File($"Interop.{vslangProj80ComRef}").Exists); 129Assert.True(outputDirectory.File($"Interop.{vslangProj70ComRef}").Exists); 130Assert.True(outputDirectory.File($"Interop.{vslangProj80ComRef}").Exists);
GivenThatWeWantRuntimeConfigInBuiltProjectOutputGroup.cs (1)
36var runtimeConfigFile = outputDirectory.File("HelloWorld.runtimeconfig.json");
GivenThatWeWantToUseVB.cs (1)
90File.Delete(outputDirectory.File("VBRuntimeValues.txt").FullName);
GivenThatWeWantToVerifyNuGetReferenceCompat.cs (1)
210var referencedDll = buildCommand.GetOutputDirectory().File("net462_net472_pkg.dll").FullName;
GivenWeWantToRequireWindowsForDesktopApps.cs (3)
245outputDir.File("Microsoft.Windows.SDK.NET.dll").Exists.Should().BeTrue("The output has cswinrt dll"); 246outputDir.File("WinRT.Runtime.dll").Exists.Should().BeTrue("The output has cswinrt dll"); 247var runtimeconfigjson = File.ReadAllText(outputDir.File(ProjectName + ".runtimeconfig.json").FullName);
NonCopyLocalProjectReferenceTests.cs (1)
51using var stream = File.OpenRead(outputDirectory.File("MainProject.deps.json").FullName);
RoslynBuildTaskTests.cs (2)
139Run(buildCommand.GetOutputDirectory().File(testAsset.TestProject!.GetOutputFileName())); 149Run(buildCommand.GetOutputDirectory().File(testAsset.TestProject!.GetOutputFileName()));
Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests (1)
WasmAoTPublishIntegrationTest.cs (1)
80var webConfig = new BuildCommand(testInstance, "blazorwasm").GetOutputDirectory(configuration: "Release").File("web.config");
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (9)
BlazorMultitargetIntegrationTest.cs (8)
25serverDependencies.File("captured-references.txt").Should().NotContain("Microsoft.AspNetCore.Components.WebAssembly.dll"); 26serverDependencies.File("captured-references.txt").Should().Contain("Microsoft.AspNetCore.Components.Server.dll"); 28browserDependencies.File("captured-references.txt").Should().Contain("Microsoft.AspNetCore.Components.WebAssembly.dll"); 29browserDependencies.File("captured-references.txt").Should().NotContain("Microsoft.AspNetCore.Components.Server.dll"); 45serverDependencies.File("captured-references.txt").Should().NotContain("Microsoft.AspNetCore.Components.WebAssembly.dll"); 46serverDependencies.File("captured-references.txt").Should().Contain("Microsoft.AspNetCore.Components.Server.dll"); 48browserDependencies.File("captured-references.txt").Should().Contain("Microsoft.AspNetCore.Components.WebAssembly.dll"); 49browserDependencies.File("captured-references.txt").Should().NotContain("Microsoft.AspNetCore.Components.Server.dll");
WasmPublishIntegrationTest.cs (1)
269var webConfig = outputDirectory.File("web.config");