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));
2925
.
WithFile
(@"Analyzers\MyAnalyzer.dll", Resources.Dlls.EmptyLibrary));
2985
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.BadLink));
2999
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.BadElement));
3016
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.BadTasks));
3033
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.BadTasks));
3051
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.MSBuildExecutionError));
3066
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.MSBuildEvaluationErrorWithExpressionInputs));
3083
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.MSBuildEvaluationErrorWithSyntax));
3100
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.Wildcards));
3145
.
WithFile
(@"TestVB2.sln", Resources.SolutionFiles.Issue29122_Solution)
3146
.
WithFile
(@"Proj1\ClassLibrary1.vbproj", Resources.ProjectFiles.VisualBasic.Issue29122_ClassLibrary1)
3147
.
WithFile
(@"Proj1\Class1.vb", Resources.SourceFiles.VisualBasic.VisualBasicClass)
3148
.
WithFile
(@"Proj1\My Project\Application.Designer.vb", Resources.SourceFiles.VisualBasic.Application_Designer)
3149
.
WithFile
(@"Proj1\My Project\Application.myapp", Resources.SourceFiles.VisualBasic.Application)
3150
.
WithFile
(@"Proj1\My Project\AssemblyInfo.vb", Resources.SourceFiles.VisualBasic.AssemblyInfo)
3151
.
WithFile
(@"Proj1\My Project\Resources.Designer.vb", Resources.SourceFiles.VisualBasic.Resources_Designer)
3152
.
WithFile
(@"Proj1\My Project\Resources.resx", Resources.SourceFiles.VisualBasic.Resources)
3153
.
WithFile
(@"Proj1\My Project\Settings.Designer.vb", Resources.SourceFiles.VisualBasic.Settings_Designer)
3154
.
WithFile
(@"Proj1\My Project\Settings.settings", Resources.SourceFiles.VisualBasic.Settings)
3155
.
WithFile
(@"Proj2\ClassLibrary2.vbproj", Resources.ProjectFiles.VisualBasic.Issue29122_ClassLibrary2)
3156
.
WithFile
(@"Proj2\Class1.vb", Resources.SourceFiles.VisualBasic.VisualBasicClass)
3157
.
WithFile
(@"Proj2\My Project\Application.Designer.vb", Resources.SourceFiles.VisualBasic.Application_Designer)
3158
.
WithFile
(@"Proj2\My Project\Application.myapp", Resources.SourceFiles.VisualBasic.Application)
3159
.
WithFile
(@"Proj2\My Project\AssemblyInfo.vb", Resources.SourceFiles.VisualBasic.AssemblyInfo)
3160
.
WithFile
(@"Proj2\My Project\Resources.Designer.vb", Resources.SourceFiles.VisualBasic.Resources_Designer)
3161
.
WithFile
(@"Proj2\My Project\Resources.resx", Resources.SourceFiles.VisualBasic.Resources)
3162
.
WithFile
(@"Proj2\My Project\Settings.Designer.vb", Resources.SourceFiles.VisualBasic.Settings_Designer)
3163
.
WithFile
(@"Proj2\My Project\Settings.settings", Resources.SourceFiles.VisualBasic.Settings));
3183
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.MallformedAdditionalFilePath)
3184
.
WithFile
(@"CSharpProject\ValidAdditionalFile.txt", Resources.SourceFiles.Text.ValidAdditionalFile);
3229
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithDiscoverEditorConfigFiles)
3230
.
WithFile
(".editorconfig", "root = true");
3253
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithDiscoverEditorConfigFiles)
3255
.
WithFile
(".editorconfig", "root = true");
3270
.
WithFile
(@"CSharpSolutionFilter.slnf", Resources.SolutionFilters.CSharp));
3284
.
WithFile
(@"InvalidSolutionFilter.slnf", Resources.SolutionFilters.Invalid));
3322
.
WithFile
(@"dir1\dir2\dir3\MyClass.cs", Resources.SourceFiles.CSharp.CSharpClass));
3334
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithLink)
3335
.
WithFile
(@"OtherStuff\Foo.cs", Resources.SourceFiles.CSharp.OtherStuff_Foo));
3347
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.WithClassNotInProjectFolder)
3348
.
WithFile
(@"MyDir\MyClass.cs", Resources.SourceFiles.CSharp.CSharpClass));
WorkspaceTestBase.cs (1)
70
.
WithFile
(@"CSharpProject\CSharpProject.csproj", Resources.ProjectFiles.CSharp.AllOptions)