300 references to Platform
Microsoft.CodeAnalysis (27)
Compilation\Compilation.cs (10)
2189Platform platform = compilationOptions.Platform; 2194platform = Platform.AnyCpu; 2263case Platform.Arm64: 2267case Platform.Arm: 2271case Platform.X64: 2275case Platform.Itanium: 2279case Platform.X86: 2283case Platform.AnyCpu: 2284case Platform.AnyCpu32BitPreferred: 2294corFlags: 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; 1800private static Platform ParsePlatform(string value, IList<Diagnostic> diagnostics) 1805return Platform.X86; 1807return Platform.X64; 1809return Platform.Itanium; 1811return Platform.AnyCpu; 1813return Platform.AnyCpu32BitPreferred; 1815return Platform.Arm; 1817return 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)
91case Platform.Arm: 93case Platform.X64: 95case Platform.Arm64: 97case Platform.Itanium: 109return DeclaringCompilation.Options.Platform == Platform.X86;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (17)
CommandLineTests.cs (17)
4523Assert.Equal(Platform.X64, parsedArgs.CompilationOptions.Platform); 4527Assert.Equal(Platform.X86, parsedArgs.CompilationOptions.Platform); 4532Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); 4536Assert.Equal(Platform.Itanium, parsedArgs.CompilationOptions.Platform); 4540Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); 4544Assert.Equal(Platform.AnyCpu32BitPreferred, parsedArgs.CompilationOptions.Platform); 4548Assert.Equal(Platform.Arm, parsedArgs.CompilationOptions.Platform); 4554Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); //anycpu is default 4560Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); //anycpu is default 11708var csc32 = CreateCompilationWithMscorlib46(csc32src, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86), assemblyName: "csc32"); 12428var list = new List<Tuple<string, Platform>>() 12430Tuple.Create("x86", Platform.X86), 12431Tuple.Create("x64", Platform.X64), 12432Tuple.Create("itanium", Platform.Itanium), 12433Tuple.Create("anycpu", Platform.AnyCpu), 12434Tuple.Create("anycpu32bitpreferred",Platform.AnyCpu32BitPreferred), 12435Tuple.Create("arm", Platform.Arm)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (85)
Emit\CompilationEmitTests.cs (51)
2034WithPlatform(Platform.Arm64). 3485var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.AnyCpu)); 3489compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86)); 3493compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64)); 3499compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.AnyCpu32BitPreferred)); 3505compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.Arm)); 3523options: TestOptions.DebugDll.WithPlatform(Platform.X86)); 3557options: TestOptions.DebugDll.WithPlatform(Platform.X64)); 3607options: TestOptions.DebugDll.WithPlatform(Platform.Arm)); 3647options: TestOptions.ReleaseExe.WithPlatform(Platform.AnyCpu)); 3688var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64)); 3771compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86)); 3776compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86)); 3781compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86)); 3785compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64)); 3790compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64)); 3795compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithPlatform(Platform.X64)); 4673var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch"); 4687parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)); 4693parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)); 4699parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)); 4705parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)); 4711parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.X86)); 4719parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.X86)); 4727parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.X86)); 4735parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.X86)); 4758var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch"); 4771parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)); 4779parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.X86)); 4787parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)); 4803var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.X86), assemblyName: "PlatformMismatch"); 4818parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4826parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4834parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)); 4842parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)); 4859var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.X86), assemblyName: "PlatformMismatch"); 4873parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4890var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu), assemblyName: "PlatformMismatch"); 4905parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4911parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4917parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)); 4923parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)); 4938var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu), assemblyName: "PlatformMismatch"); 4952parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4967var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch"); 4982parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4988parseOptions: parseOptions, options: TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)); 4994parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)); 5000parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)); 5015var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.ReleaseModule.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch"); 5030parseOptions: 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)
2212VerifyEmitWithNoResources(comp, Platform.AnyCpu); 2213VerifyEmitWithNoResources(comp, Platform.AnyCpu32BitPreferred); 2214VerifyEmitWithNoResources(comp, Platform.Arm); // broken before fix 2215VerifyEmitWithNoResources(comp, Platform.Itanium); // broken before fix 2216VerifyEmitWithNoResources(comp, Platform.X64); // broken before fix 2217VerifyEmitWithNoResources(comp, Platform.X86); 2220private void VerifyEmitWithNoResources(CSharpCompilation comp, Platform platform) 2423options: 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.LanguageServer.Protocol.UnitTests (1)
Diagnostics\PullDiagnosticTests.cs (1)
1794projectInfo = projectInfo.WithCompilationOptions(projectInfo.CompilationOptions!.WithPlatform(Platform.X64));
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)
141Dim platform As Platform = Platform.AnyCpu 2147Private Shared Function ParsePlatform(name As String, value As String, errors As List(Of Diagnostic)) As Platform 2153Return Platform.X86 2155Return Platform.X64 2157Return Platform.Itanium 2159Return Platform.AnyCpu 2161Return Platform.AnyCpu32BitPreferred 2163Return Platform.Arm 2165Return Platform.Arm64 2171Return 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)
2085compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.X86)) 2089compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.X64)) 2095compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.AnyCpu32BitPreferred)) 2114Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(Platform.AnyCpu)) 2139compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.AnyCpu)) 2175Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(Platform.Arm)) 2200compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.AnyCpu)) 2236Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(Platform.X64)) 2256compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.X64)) 2344compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseExe.WithPlatform(Platform.X86)) 2348compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseExe.WithPlatform(Platform.X64)) 2352compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseDll.WithPlatform(Platform.X64)) 3860Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 3877TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)) 3883TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)) 3889TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)) 3895TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)) 3901TestOptions.ReleaseDll.WithPlatform(Platform.X86)) 3910TestOptions.ReleaseDll.WithPlatform(Platform.X86)) 3919TestOptions.ReleaseModule.WithPlatform(Platform.X86)) 3928TestOptions.ReleaseModule.WithPlatform(Platform.X86)) 3952Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 3968TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)) 3977TestOptions.ReleaseDll.WithPlatform(Platform.X86)) 3986TestOptions.ReleaseModule.WithPlatform(Platform.X86)) 4003Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.X86)) 4020TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4029TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4038TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4047TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4065Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.X86)) 4081TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4099Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)) 4116TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4124TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4132TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4140TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4157Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)) 4173TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4190Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4207TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4215TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4223TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4231TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4248Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4264TestOptions.ReleaseDll.WithPlatform(Platform.Itanium))
Emit\DeterministicTests.vb (11)
19Private Function GetBytesEmitted(source As String, platform As Platform, debug As Boolean) As ImmutableArray(Of Byte) 61Dim result1 = GetBytesEmitted(source, platform:=Platform.AnyCpu32BitPreferred, debug:=False) 62Dim result2 = GetBytesEmitted(source, platform:=Platform.AnyCpu32BitPreferred, debug:=False) 65Dim result3 = GetBytesEmitted(source, platform:=Platform.X64, debug:=False) 66Dim result4 = GetBytesEmitted(source, platform:=Platform.X64, debug:=False) 69Dim result5 = GetBytesEmitted(source, platform:=Platform.Arm64, debug:=False) 70Dim result6 = GetBytesEmitted(source, platform:=Platform.Arm64, debug:=False) 83Dim result1 = GetBytesEmitted(source, platform:=Platform.AnyCpu32BitPreferred, debug:=True) 84Dim result2 = GetBytesEmitted(source, platform:=Platform.AnyCpu32BitPreferred, debug:=True) 87Dim result3 = GetBytesEmitted(source, platform:=Platform.X64, debug:=True) 88Dim result4 = GetBytesEmitted(source, platform:=Platform.X64, debug:=True)
Emit\EmitMetadata.vb (7)
964VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_AnyCpu"), Platform.AnyCpu) 965VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_AnyCpu32BitPreferred"), Platform.AnyCpu32BitPreferred) 966VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_Arm"), Platform.Arm) ' broken before fix 967VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_Itanium"), Platform.Itanium) ' broken before fix 968VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_X64"), Platform.X64) ' broken before fix 969VerifyEmitWithNoResources(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_X86"), Platform.X86) 972Private 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)
492Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 507Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 521Assert.Equal(Platform.AnyCpu32BitPreferred, compilation.Options.Platform); 536Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 551Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 616Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 631Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 645Assert.Equal(Platform.AnyCpu32BitPreferred, compilation.Options.Platform); 660Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 675Assert.Equal(Platform.AnyCpu, compilation.Options.Platform);
Microsoft.VisualStudio.LanguageServices (7)
Interactive\VsResetInteractive.cs (7)
167private static InteractiveHostPlatform? GetInteractiveHostPlatform(string targetFrameworkMoniker, Platform platform) 177case Platform.Arm: 178case Platform.AnyCpu32BitPreferred: 179case Platform.X86: 182case Platform.Itanium: 183case Platform.X64: 184case Platform.Arm64:
Microsoft.VisualStudio.LanguageServices.CSharp (2)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (2)
126if (!Enum.TryParse(GetStringOption(CompilerOptions.OPTID_PLATFORM, ""), ignoreCase: true, result: out Platform platform)) 128platform = Platform.AnyCpu;
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
ProjectSystemShim\VisualBasicProject.OptionsProcessor.vb (2)
59Dim platform As Platform 61platform = Platform.AnyCpu