299 references to Platform
Microsoft.CodeAnalysis (27)
Compilation\Compilation.cs (10)
2205Platform platform = compilationOptions.Platform; 2210platform = Platform.AnyCpu; 2279case Platform.Arm64: 2283case Platform.Arm: 2287case Platform.X64: 2291case Platform.Itanium: 2295case Platform.X86: 2299case Platform.AnyCpu: 2300case Platform.AnyCpu32BitPreferred: 2310corFlags: GetCorHeaderFlags(machine, HasStrongName, prefers32Bit: platform == Platform.AnyCpu32BitPreferred),
Compilation\CompilationOptions.cs (4)
132public Platform Platform { get; protected set; } 280Platform platform, 438public CompilationOptions WithPlatform(Platform platform) 531protected abstract CompilationOptions CommonWithPlatform(Platform platform);
Compilation\Platform.cs (9)
47internal static bool IsValid(this Platform value) 49return value >= Platform.AnyCpu && value <= Platform.Arm64; 52internal static bool Requires64Bit(this Platform value) 54return value == Platform.X64 || value == Platform.Itanium || value == Platform.Arm64; 57internal static bool Requires32Bit(this Platform value) 59return value == Platform.X86;
Compilation\SubsystemVersion.cs (2)
154internal static SubsystemVersion Default(OutputKind outputKind, Platform platform) 156if (platform == Platform.Arm)
Emit\EmitOptions.cs (1)
55/// If the value is 0 the file alignment is determined based upon the value of <see cref="Platform"/>.
PEWriter\MetadataWriter.PortablePdb.cs (1)
923var platform = module.CommonCompilation.Options.Platform;
Microsoft.CodeAnalysis.CSharp (27)
CommandLine\CSharpCommandLineParser.cs (11)
94Platform platform = Platform.AnyCpu; 1798private static Platform ParsePlatform(string value, IList<Diagnostic> diagnostics) 1803return Platform.X86; 1805return Platform.X64; 1807return Platform.Itanium; 1809return Platform.AnyCpu; 1811return Platform.AnyCpu32BitPreferred; 1813return Platform.Arm; 1815return Platform.Arm64; 1820return Platform.AnyCpu;
CSharpCompilationOptions.cs (11)
62Platform platform = Platform.AnyCpu, 112Platform platform, 157Platform platform, 199Platform platform, 423public new CSharpCompilationOptions WithPlatform(Platform platform) 629protected override CompilationOptions CommonWithPlatform(Platform platform) => WithPlatform(platform); 715if (Platform == Platform.AnyCpu32BitPreferred && OutputKind.IsValid() && !(OutputKind == OutputKind.ConsoleApplication || OutputKind == OutputKind.WindowsApplication || OutputKind == OutputKind.WindowsRuntimeApplication)) 828Platform platform, 867Platform platform, 911Platform platform,
Symbols\Source\SourceModuleSymbol.cs (5)
92case Platform.Arm: 94case Platform.X64: 96case Platform.Arm64: 98case Platform.Itanium: 110return DeclaringCompilation.Options.Platform == Platform.X86;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (17)
CommandLineTests.cs (17)
4513Assert.Equal(Platform.X64, parsedArgs.CompilationOptions.Platform); 4517Assert.Equal(Platform.X86, parsedArgs.CompilationOptions.Platform); 4522Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); 4526Assert.Equal(Platform.Itanium, parsedArgs.CompilationOptions.Platform); 4530Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); 4534Assert.Equal(Platform.AnyCpu32BitPreferred, parsedArgs.CompilationOptions.Platform); 4538Assert.Equal(Platform.Arm, parsedArgs.CompilationOptions.Platform); 4544Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); //anycpu is default 4550Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); //anycpu is default 11734var csc32 = CreateCompilationWithMscorlib46(csc32src, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86), assemblyName: "csc32"); 12455var list = new List<Tuple<string, Platform>>() 12457Tuple.Create("x86", Platform.X86), 12458Tuple.Create("x64", Platform.X64), 12459Tuple.Create("itanium", Platform.Itanium), 12460Tuple.Create("anycpu", Platform.AnyCpu), 12461Tuple.Create("anycpu32bitpreferred",Platform.AnyCpu32BitPreferred), 12462Tuple.Create("arm", Platform.Arm)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (85)
Emit\CompilationEmitTests.cs (51)
2035WithPlatform(Platform.Arm64). 3486var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.AnyCpu)); 3490compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86)); 3494compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64)); 3500compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.AnyCpu32BitPreferred)); 3506compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.Arm)); 3524options: TestOptions.DebugDll.WithPlatform(Platform.X86)); 3558options: TestOptions.DebugDll.WithPlatform(Platform.X64)); 3608options: TestOptions.DebugDll.WithPlatform(Platform.Arm)); 3648options: TestOptions.ReleaseExe.WithPlatform(Platform.AnyCpu)); 3689var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64)); 3772compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86)); 3777compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86)); 3782compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86)); 3786compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64)); 3791compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64)); 3796compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64)); 4679var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch"); 4693parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)); 4699parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)); 4705parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)); 4711parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)); 4717parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.X86)); 4725parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.X86)); 4733parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.X86)); 4741parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.X86)); 4764var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch"); 4777parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)); 4785parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.X86)); 4793parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)); 4809var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.X86), assemblyName: "PlatformMismatch"); 4824parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4832parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4840parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)); 4848parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)); 4865var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.X86), assemblyName: "PlatformMismatch"); 4879parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4896var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu), assemblyName: "PlatformMismatch"); 4911parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4917parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4923parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)); 4929parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)); 4944var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu), assemblyName: "PlatformMismatch"); 4958parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4973var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch"); 4988parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4994parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 5000parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)); 5006parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)); 5021var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch"); 5036parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium));
Emit\DeterministicTests.cs (26)
29private Guid CompiledGuid(string source, string assemblyName, bool debug, Platform platform = Platform.AnyCpu) 34private Guid CompiledGuid(string source, string assemblyName, CSharpCompilationOptions options, EmitOptions emitOptions = null, Platform platform = Platform.AnyCpu) 51private (ImmutableArray<byte> pe, ImmutableArray<byte> pdb) EmitDeterministic(string source, Platform platform, DebugInformationFormat pdbFormat, bool optimize) 131var mvid1 = CompiledGuid(source, "X1", false, Platform.X86); 132var mvid2 = CompiledGuid(source, "X1", false, Platform.X86); 135var mvid3 = CompiledGuid(source, "X1", false, Platform.X64); 136var mvid4 = CompiledGuid(source, "X1", false, Platform.X64); 139var mvid5 = CompiledGuid(source, "X1", false, Platform.Arm64); 140var mvid6 = CompiledGuid(source, "X1", false, Platform.Arm64); 152var result1 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.X64, DebugInformationFormat.Embedded, optimize: false); 153var result2 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.Arm64, DebugInformationFormat.Embedded, optimize: false); 218var result1 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.AnyCpu32BitPreferred, pdbFormat, optimize: true); 219var result2 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.AnyCpu32BitPreferred, pdbFormat, optimize: true); 223var result3 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.X64, pdbFormat, optimize: true); 224var result4 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.X64, pdbFormat, optimize: true); 228var result5 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.Arm64, pdbFormat, optimize: true); 229var result6 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.Arm64, pdbFormat, optimize: true); 245var result1 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.AnyCpu32BitPreferred, pdbFormat, optimize: false); 246var result2 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.AnyCpu32BitPreferred, pdbFormat, optimize: false); 250var result3 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.X64, pdbFormat, optimize: false); 251var result4 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.X64, pdbFormat, optimize: false); 255var result5 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.Arm64, pdbFormat, optimize: false); 256var result6 = EmitDeterministic(CompareAllBytesEmitted_Source, Platform.Arm64, pdbFormat, optimize: false); 477.WithPlatform(Platform.AnyCpu)
Emit\EmitMetadataTests.cs (8)
2213VerifyEmitWithNoResources(comp, Platform.AnyCpu); 2214VerifyEmitWithNoResources(comp, Platform.AnyCpu32BitPreferred); 2215VerifyEmitWithNoResources(comp, Platform.Arm); // broken before fix 2216VerifyEmitWithNoResources(comp, Platform.Itanium); // broken before fix 2217VerifyEmitWithNoResources(comp, Platform.X64); // broken before fix 2218VerifyEmitWithNoResources(comp, Platform.X86); 2221private void VerifyEmitWithNoResources(CSharpCompilation comp, Platform platform) 2424options: TestOptions.DebugExe.WithPlatform(Platform.X64).WithDeterministic(true),
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
320platform: Platform.AnyCpu,
Microsoft.CodeAnalysis.CSharp.Scripting (1)
CSharpScriptCompiler.cs (1)
64platform: Platform.AnyCpu,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (10)
Compilation\CSharpCompilationOptionsTests.cs (10)
83TestHiddenProperty((old, value) => old.WithPlatform(value), opt => opt.Platform, Platform.Itanium); 121TestProperty((old, value) => old.WithPlatform(value), opt => opt.Platform, Platform.Itanium); 184new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithPlatform((Platform)Int32.MaxValue).VerifyErrors( 188new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithPlatform((Platform)Int32.MinValue).VerifyErrors( 334new CSharpCompilationOptions(OutputKind.ConsoleApplication, platform: (Platform)Int32.MinValue).VerifyErrors( 345new CSharpCompilationOptions(OutputKind.ConsoleApplication, platform: Platform.AnyCpu32BitPreferred).VerifyErrors(); 347new CSharpCompilationOptions(OutputKind.WindowsRuntimeApplication, platform: Platform.AnyCpu32BitPreferred).VerifyErrors(); 349new CSharpCompilationOptions(OutputKind.WindowsRuntimeMetadata, platform: Platform.AnyCpu32BitPreferred).VerifyErrors( 352new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, platform: Platform.AnyCpu32BitPreferred).VerifyErrors( 396Platform platform = 0;
Microsoft.CodeAnalysis.Rebuild (4)
CompilationFactory.cs (4)
208protected static Platform GetPlatform(string? platform) 210? Platform.AnyCpu 211: (Platform)Enum.Parse(typeof(Platform), platform);
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
OptionRoundTripTests.cs (4)
33public static readonly object[][] Platforms = ((Platform[])Enum.GetValues(typeof(Platform))).Select(p => new[] { (object)p }).ToArray(); 37public void Platform_RoundTrip(Platform platform) 49public void Platform_RoundTrip_VB(Platform platform)
Microsoft.CodeAnalysis.VisualBasic (27)
CommandLine\VisualBasicCommandLineParser.vb (11)
142Dim platform As Platform = Platform.AnyCpu 2145Private Shared Function ParsePlatform(name As String, value As String, errors As List(Of Diagnostic)) As Platform 2151Return Platform.X86 2153Return Platform.X64 2155Return Platform.Itanium 2157Return Platform.AnyCpu 2159Return Platform.AnyCpu32BitPreferred 2161Return Platform.Arm 2163Return Platform.Arm64 2169Return Platform.AnyCpu
Symbols\Source\SourceModuleSymbol.vb (5)
107Case Platform.Arm64 109Case Platform.Arm 111Case Platform.X64 113Case Platform.Itanium 123Return DeclaringCompilation.Options.Platform = Platform.X86
VisualBasicCompilationOptions.vb (11)
87Optional platform As Platform = Platform.AnyCpu, 164platform As Platform, 233platform As Platform, 787Public Shadows Function WithPlatform(value As Platform) As VisualBasicCompilationOptions 987Protected Overrides Function CommonWithPlatform(platform As Platform) As CompilationOptions 1066If Platform = Platform.AnyCpu32BitPreferred AndAlso OutputKind.IsValid() AndAlso 1163platform As Platform, 1228platform As Platform, 1294Optional platform As Platform = Platform.AnyCpu,
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (65)
Emit\CompilationEmitTests.vb (46)
2086compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.X86)) 2090compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.X64)) 2096compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.AnyCpu32BitPreferred)) 2115Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(Platform.AnyCpu)) 2140compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.AnyCpu)) 2176Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(Platform.Arm)) 2201compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.AnyCpu)) 2237Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(Platform.X64)) 2257compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.X64)) 2345compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseExe.WithPlatform(Platform.X86)) 2349compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseExe.WithPlatform(Platform.X64)) 2353compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseDll.WithPlatform(Platform.X64)) 3861Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 3878TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)) 3884TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)) 3890TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)) 3896TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)) 3902TestOptions.ReleaseDll.WithPlatform(Platform.X86)) 3911TestOptions.ReleaseDll.WithPlatform(Platform.X86)) 3920TestOptions.ReleaseModule.WithPlatform(Platform.X86)) 3929TestOptions.ReleaseModule.WithPlatform(Platform.X86)) 3953Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 3969TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)) 3978TestOptions.ReleaseDll.WithPlatform(Platform.X86)) 3987TestOptions.ReleaseModule.WithPlatform(Platform.X86)) 4004Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.X86)) 4021TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4030TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4039TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4048TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4066Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.X86)) 4082TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4100Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)) 4117TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4125TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4133TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4141TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4158Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)) 4174TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4191Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4208TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4216TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4224TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4232TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4249Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4265TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
Emit\DeterministicTests.vb (11)
17Private Function GetBytesEmitted(source As String, platform As Platform, debug As Boolean) As ImmutableArray(Of Byte) 59Dim result1 = GetBytesEmitted(source, platform:=Platform.AnyCpu32BitPreferred, debug:=False) 60Dim result2 = GetBytesEmitted(source, platform:=Platform.AnyCpu32BitPreferred, debug:=False) 63Dim result3 = GetBytesEmitted(source, platform:=Platform.X64, debug:=False) 64Dim result4 = GetBytesEmitted(source, platform:=Platform.X64, debug:=False) 67Dim result5 = GetBytesEmitted(source, platform:=Platform.Arm64, debug:=False) 68Dim result6 = GetBytesEmitted(source, platform:=Platform.Arm64, debug:=False) 81Dim result1 = GetBytesEmitted(source, platform:=Platform.AnyCpu32BitPreferred, debug:=True) 82Dim result2 = GetBytesEmitted(source, platform:=Platform.AnyCpu32BitPreferred, debug:=True) 85Dim result3 = GetBytesEmitted(source, platform:=Platform.X64, debug:=True) 86Dim result4 = GetBytesEmitted(source, platform:=Platform.X64, debug:=True)
Emit\EmitMetadata.vb (7)
967VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_AnyCpu"), Platform.AnyCpu) 968VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_AnyCpu32BitPreferred"), Platform.AnyCpu32BitPreferred) 969VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_Arm"), Platform.Arm) ' broken before fix 970VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_Itanium"), Platform.Itanium) ' broken before fix 971VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_X64"), Platform.X64) ' broken before fix 972VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_X86"), Platform.X86) 975Private Sub VerifyEmitWithNoResources(comp As VisualBasicCompilation, platform As Platform)
PDB\VisualBasicDeterministicBuildCompilationTests.vb (1)
208platform:=Platform.AnyCpu,
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
CompilationExtensions.vb (1)
116platform:=Platform.AnyCpu, ' Platform should match PEModule.Machine, in this case I386.
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (6)
Compilation\VisualBasicCompilationOptionsTests.vb (6)
37TestHiddenProperty(Function(old, value) old.WithPlatform(value), Function(opt) opt.Platform, Platform.X64) 112TestProperty(Function(old, value) old.WithPlatform(value), Function(opt) opt.Platform, Platform.X64) 194AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(CType(Int32.MaxValue, Platform)).Errors, 199AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(CType(Int32.MinValue, Platform)).Errors, 297AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, platform:=CType(Int32.MaxValue, Platform)).Errors, 302AssertTheseDiagnostics(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, platform:=CType(Int32.MinValue, Platform)).Errors,
Microsoft.CodeAnalysis.Workspaces (3)
Serialization\AbstractOptionsSerializationService.cs (3)
89Platform platform, 124var platform = (Platform)reader.ReadInt32();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (10)
VisualStudioMSBuildWorkspaceTests.cs (10)
500Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 515Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 529Assert.Equal(Platform.AnyCpu32BitPreferred, compilation.Options.Platform); 544Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 559Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 624Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 639Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 653Assert.Equal(Platform.AnyCpu32BitPreferred, compilation.Options.Platform); 668Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 683Assert.Equal(Platform.AnyCpu, compilation.Options.Platform);
Microsoft.VisualStudio.LanguageServices (7)
Interactive\VsResetInteractive.cs (7)
166private static InteractiveHostPlatform? GetInteractiveHostPlatform(string targetFrameworkMoniker, Platform platform) 176case Platform.Arm: 177case Platform.AnyCpu32BitPreferred: 178case Platform.X86: 181case Platform.Itanium: 182case Platform.X64: 183case Platform.Arm64:
Microsoft.VisualStudio.LanguageServices.CSharp (2)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (2)
127if (!Enum.TryParse(GetStringOption(CompilerOptions.OPTID_PLATFORM, ""), ignoreCase: true, result: out Platform platform)) 129platform = Platform.AnyCpu;
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
ProjectSystemShim\VisualBasicProject.OptionsProcessor.vb (2)
59Dim platform As Platform 61platform = Platform.AnyCpu