120 references to WithFile
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (120)
FileSet.cs (1)
72
return this.
WithFile
(fileName, newContent);
MSBuildWorkspaceTestBase.cs (1)
112
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.ForEmittedOutput));
NetCoreTests.cs (5)
402
.
WithFile
(@"Solution.sln", Resources.SolutionFiles.Issue30174_Solution)
403
.
WithFile
(@"InspectedLibrary\InspectedLibrary.csproj", Resources.ProjectFiles.CSharp.Issue30174_InspectedLibrary)
404
.
WithFile
(@"InspectedLibrary\InspectedClass.cs", Resources.SourceFiles.CSharp.Issue30174_InspectedClass)
405
.
WithFile
(@"ReferencedLibrary\ReferencedLibrary.csproj", Resources.ProjectFiles.CSharp.Issue30174_ReferencedLibrary)
406
.
WithFile
(@"ReferencedLibrary\SomeMetadataAttribute.cs", Resources.SourceFiles.CSharp.Issue30174_SomeMetadataAttribute);
VisualStudioMSBuildWorkspaceTests.cs (112)
271
? GetSimpleCSharpSolutionFiles().
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithChecksumAlgorithm)
272
: GetSimpleVisualBasicSolutionFiles().
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.WithChecksumAlgorithm);
450
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.ShouldUnsetParentConfigurationAndPlatform)
451
.
WithFile
(@"CSharpProject\ShouldUnsetParentConfigurationAndPlatformConditional.cs", Resources.SourceFiles.CSharp.CSharpClass));
468
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.ShouldUnsetParentConfigurationAndPlatform)
469
.
WithFile
(@"CSharpProject\ShouldUnsetParentConfigurationAndPlatformConditional.cs", Resources.SourceFiles.CSharp.CSharpClass));
486
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithoutPrefer32Bit));
500
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithoutPrefer32Bit)
515
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithPrefer32Bit));
529
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithPrefer32Bit)
544
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithPrefer32Bit)
582
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithoutCSharpTargetsImported));
596
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.WithoutVBTargetsImported));
610
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.WithoutPrefer32Bit));
624
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.WithoutPrefer32Bit)
639
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.WithPrefer32Bit));
653
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.WithPrefer32Bit)
668
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.WithPrefer32Bit)
682
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.WithPrefer32Bit)
722
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.WithPrefer32Bit)
736
.
WithFile
(@"VisualBasicProject_Circular_Top.vbproj", Resources.ProjectFiles.VisualBasic.Circular_Top)
737
.
WithFile
(@"VisualBasicProject_Circular_Target.vbproj", Resources.ProjectFiles.VisualBasic.Circular_Target));
750
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithXaml)
751
.
WithFile
(@"CSharpProject\App.xaml", Resources.SourceFiles.Xaml.App)
752
.
WithFile
(@"CSharpProject\App.xaml.cs", Resources.SourceFiles.CSharp.App)
753
.
WithFile
(@"CSharpProject\MainWindow.xaml", Resources.SourceFiles.Xaml.MainWindow)
754
.
WithFile
(@"CSharpProject\MainWindow.xaml.cs", Resources.SourceFiles.CSharp.MainWindow));
783
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.BadHintPath));
800
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.AssemblyNameIsPath));
818
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.AssemblyNameIsPath2));
836
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.DuplicateFile));
853
.
WithFile
(ProjFileName, Resources.ProjectFiles.CSharp.CSharpProject));
888
.
WithFile
(@"CSharpProject\CSharpProject.vbproj", Resources.ProjectFiles.CSharp.CSharpProject));
906
.
WithFile
(@"CSharpProject\CSharpProject.anyproj", Resources.ProjectFiles.CSharp.CSharpProject));
1001
.
WithFile
(@"TestSolution.sln", Resources.SolutionFiles.InvalidProjectPath));
1015
.
WithFile
(@"TestSolution.sln", Resources.SolutionFiles.SolutionFolder));
1029
.
WithFile
(@"TestSolution.sln", Resources.SolutionFiles.InvalidProjectPath));
1044
.
WithFile
(@"TestSolution.sln", Resources.SolutionFiles.NonExistentProject));
1059
.
WithFile
(@"TestSolution.sln", Resources.SolutionFiles.NonExistentProject));
1073
.
WithFile
(@"TestSolution.sln", Resources.SolutionFiles.CSharp_UnknownProjectExtension)
1074
.
WithFile
(@"CSharpProject\CSharpProject.noproj", Resources.ProjectFiles.CSharp.CSharpProject));
1087
.
WithFile
(@"TestSolution.sln", Resources.SolutionFiles.CSharp_UnknownProjectTypeGuid));
1100
.
WithFile
(@"TestSolution.sln", Resources.SolutionFiles.CSharp_UnknownProjectTypeGuidAndUnknownExtension)
1101
.
WithFile
(@"CSharpProject\CSharpProject.noproj", Resources.ProjectFiles.CSharp.CSharpProject));
1118
.
WithFile
(@"TestSolution.sln", Resources.SolutionFiles.CSharp_UnknownProjectTypeGuidAndUnknownExtension)
1119
.
WithFile
(NoProjFileName, Resources.ProjectFiles.CSharp.CSharpProject));
1218
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.InvalidProjectReference));
1235
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.InvalidProjectReference));
1247
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.NonExistentProjectReference));
1264
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.NonExistentProjectReference));
1279
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.UnknownProjectExtension)
1280
.
WithFile
(@"CSharpProject\CSharpProject.noproj", Resources.ProjectFiles.CSharp.CSharpProject));
1297
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.UnknownProjectExtension)
1298
.
WithFile
(@"CSharpProject\CSharpProject.noproj", Resources.ProjectFiles.CSharp.CSharpProject));
1313
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.UnknownProjectExtension)
1314
.
WithFile
(@"CSharpProject\CSharpProject.noproj", Resources.ProjectFiles.CSharp.CSharpProject)
1315
.
WithFile
(@"CSharpProject\bin\Debug\CSharpProject.dll", Resources.Dlls.CSharpProject));
1336
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.UnknownProjectExtension)
1337
.
WithFile
(@"CSharpProject\CSharpProject.noproj", Resources.ProjectFiles.CSharp.CSharpProject)
1338
.
WithFile
(@"CSharpProject\bin\Debug\CSharpProject.dll", Resources.Dlls.CSharpProject));
1358
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.UnknownProjectExtension)
1359
.
WithFile
(@"CSharpProject\CSharpProject.noproj", Resources.Dlls.CSharpProject)); // use metadata file as stand-in for bad project file
1382
.
WithFile
(@"CSharpProject\bin\Debug\CSharpProject.dll", Resources.Dlls.CSharpProject));
1425
.
WithFile
(@"CSharpProject\bin\Debug\CSharpProject.dll", Resources.Dlls.CSharpProject));
1701
.
WithFile
(@"VisualBasicProject\VisualBasicProject.vbproj", Resources.ProjectFiles.VisualBasic.Embed));
1890
.
WithFile
(@"VisualBasicProject\VisualBasicClass.vb", Resources.SourceFiles.VisualBasic.VisualBasicClass_WithConditionalAttributes)
1914
.
WithFile
(@"VisualBasicProject\VisualBasicClass.vb", Resources.SourceFiles.VisualBasic.VisualBasicClass_WithConditionalAttributes));
1937
.
WithFile
(@"CSharpProject\CSharpClass.cs", Resources.SourceFiles.CSharp.CSharpClass_WithConditionalAttributes)
1961
.
WithFile
(@"CSharpProject\CSharpClass.cs", Resources.SourceFiles.CSharp.CSharpClass_WithConditionalAttributes));
1984
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithLink)
1985
.
WithFile
(@"OtherStuff\Foo.cs", Resources.SourceFiles.CSharp.OtherStuff_Foo));
2926
.
WithFile
(@"Analyzers\MyAnalyzer.dll", Resources.Dlls.EmptyLibrary));
2986
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.BadLink));
3000
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.BadElement));
3017
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.BadTasks));
3034
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.BadTasks));
3052
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.MSBuildExecutionError));
3067
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.MSBuildEvaluationErrorWithExpressionInputs));
3084
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.MSBuildEvaluationErrorWithSyntax));
3101
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.Wildcards));
3146
.
WithFile
(@"TestVB2.sln", Resources.SolutionFiles.Issue29122_Solution)
3147
.
WithFile
(@"Proj1\ClassLibrary1.vbproj", Resources.ProjectFiles.VisualBasic.Issue29122_ClassLibrary1)
3148
.
WithFile
(@"Proj1\Class1.vb", Resources.SourceFiles.VisualBasic.VisualBasicClass)
3149
.
WithFile
(@"Proj1\My Project\Application.Designer.vb", Resources.SourceFiles.VisualBasic.Application_Designer)
3150
.
WithFile
(@"Proj1\My Project\Application.myapp", Resources.SourceFiles.VisualBasic.Application)
3151
.
WithFile
(@"Proj1\My Project\AssemblyInfo.vb", Resources.SourceFiles.VisualBasic.AssemblyInfo)
3152
.
WithFile
(@"Proj1\My Project\Resources.Designer.vb", Resources.SourceFiles.VisualBasic.Resources_Designer)
3153
.
WithFile
(@"Proj1\My Project\Resources.resx", Resources.SourceFiles.VisualBasic.Resources)
3154
.
WithFile
(@"Proj1\My Project\Settings.Designer.vb", Resources.SourceFiles.VisualBasic.Settings_Designer)
3155
.
WithFile
(@"Proj1\My Project\Settings.settings", Resources.SourceFiles.VisualBasic.Settings)
3156
.
WithFile
(@"Proj2\ClassLibrary2.vbproj", Resources.ProjectFiles.VisualBasic.Issue29122_ClassLibrary2)
3157
.
WithFile
(@"Proj2\Class1.vb", Resources.SourceFiles.VisualBasic.VisualBasicClass)
3158
.
WithFile
(@"Proj2\My Project\Application.Designer.vb", Resources.SourceFiles.VisualBasic.Application_Designer)
3159
.
WithFile
(@"Proj2\My Project\Application.myapp", Resources.SourceFiles.VisualBasic.Application)
3160
.
WithFile
(@"Proj2\My Project\AssemblyInfo.vb", Resources.SourceFiles.VisualBasic.AssemblyInfo)
3161
.
WithFile
(@"Proj2\My Project\Resources.Designer.vb", Resources.SourceFiles.VisualBasic.Resources_Designer)
3162
.
WithFile
(@"Proj2\My Project\Resources.resx", Resources.SourceFiles.VisualBasic.Resources)
3163
.
WithFile
(@"Proj2\My Project\Settings.Designer.vb", Resources.SourceFiles.VisualBasic.Settings_Designer)
3164
.
WithFile
(@"Proj2\My Project\Settings.settings", Resources.SourceFiles.VisualBasic.Settings));
3184
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.MallformedAdditionalFilePath)
3185
.
WithFile
(@"CSharpProject\ValidAdditionalFile.txt", Resources.SourceFiles.Text.ValidAdditionalFile);
3230
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithDiscoverEditorConfigFiles)
3231
.
WithFile
(".editorconfig", "root = true");
3254
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithDiscoverEditorConfigFiles)
3256
.
WithFile
(".editorconfig", "root = true");
3271
.
WithFile
(@"CSharpSolutionFilter.slnf", Resources.SolutionFilters.CSharp));
3285
.
WithFile
(@"InvalidSolutionFilter.slnf", Resources.SolutionFilters.Invalid));
3323
.
WithFile
(@"dir1\dir2\dir3\MyClass.cs", Resources.SourceFiles.CSharp.CSharpClass));
3335
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithLink)
3336
.
WithFile
(@"OtherStuff\Foo.cs", Resources.SourceFiles.CSharp.OtherStuff_Foo));
3348
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithClassNotInProjectFolder)
3349
.
WithFile
(@"MyDir\MyClass.cs", Resources.SourceFiles.CSharp.CSharpClass));
WorkspaceTestBase.cs (1)
70
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.AllOptions)