314 references to Platform
Microsoft.CodeAnalysis (27)
Compilation\Compilation.cs (10)
2152Platform platform = compilationOptions.Platform; 2157platform = Platform.AnyCpu; 2226case Platform.Arm64: 2230case Platform.Arm: 2234case Platform.X64: 2238case Platform.Itanium: 2242case Platform.X86: 2246case Platform.AnyCpu: 2247case Platform.AnyCpu32BitPreferred: 2257corFlags: 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; 1784private static Platform ParsePlatform(string value, IList<Diagnostic> diagnostics) 1789return Platform.X86; 1791return Platform.X64; 1793return Platform.Itanium; 1795return Platform.AnyCpu; 1797return Platform.AnyCpu32BitPreferred; 1799return Platform.Arm; 1801return Platform.Arm64; 1804return 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)
4332Assert.Equal(Platform.X64, parsedArgs.CompilationOptions.Platform); 4336Assert.Equal(Platform.X86, parsedArgs.CompilationOptions.Platform); 4341Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); 4345Assert.Equal(Platform.Itanium, parsedArgs.CompilationOptions.Platform); 4349Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); 4353Assert.Equal(Platform.AnyCpu32BitPreferred, parsedArgs.CompilationOptions.Platform); 4357Assert.Equal(Platform.Arm, parsedArgs.CompilationOptions.Platform); 4363Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); //anycpu is default 4369Assert.Equal(Platform.AnyCpu, parsedArgs.CompilationOptions.Platform); //anycpu is default 11478var csc32 = CreateCompilationWithMscorlib46(csc32src, options: TestOptions.ReleaseExe.WithPlatform(Platform.X86), assemblyName: "csc32"); 12136var list = new List<Tuple<string, Platform>>() 12138Tuple.Create("x86", Platform.X86), 12139Tuple.Create("x64", Platform.X64), 12140Tuple.Create("itanium", Platform.Itanium), 12141Tuple.Create("anycpu", Platform.AnyCpu), 12142Tuple.Create("anycpu32bitpreferred",Platform.AnyCpu32BitPreferred), 12143Tuple.Create("arm", Platform.Arm)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (86)
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)
2211VerifyEmitWithNoResources(comp, Platform.AnyCpu); 2212VerifyEmitWithNoResources(comp, Platform.AnyCpu32BitPreferred); 2213VerifyEmitWithNoResources(comp, Platform.Arm); // broken before fix 2214VerifyEmitWithNoResources(comp, Platform.Itanium); // broken before fix 2215VerifyEmitWithNoResources(comp, Platform.X64); // broken before fix 2216VerifyEmitWithNoResources(comp, Platform.X86); 2219private void VerifyEmitWithNoResources(CSharpCompilation comp, Platform platform) 2422options: TestOptions.DebugExe.WithPlatform(Platform.X64).WithDeterministic(true),
PDB\CSharpDeterministicBuildCompilationTests.cs (1)
320platform: Platform.AnyCpu,
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (1)
CompilationExtensions.cs (1)
146platform: Platform.AnyCpu, // Platform should match PEModule.Machine, in this case I386.
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.CSharp.Workspaces (1)
Serialization\CSharpOptionsSerializationService.cs (1)
51out var delaySign, out var platform, out var generalDiagnosticOption, out var warningLevel, out var specificDiagnosticOptions,
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Diagnostics\PullDiagnosticTests.cs (1)
1507projectInfo = 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 (29)
CommandLine\VisualBasicCommandLineParser.vb (11)
141Dim platform As Platform = Platform.AnyCpu 2127Private Shared Function ParsePlatform(name As String, value As String, errors As List(Of Diagnostic)) As Platform 2133Return Platform.X86 2135Return Platform.X64 2137Return Platform.Itanium 2139Return Platform.AnyCpu 2141Return Platform.AnyCpu32BitPreferred 2143Return Platform.Arm 2145Return Platform.Arm64 2151Return Platform.AnyCpu
Symbols\Source\SourceModuleSymbol.vb (5)
105Case Platform.Arm64 107Case Platform.Arm 109Case Platform.X64 111Case Platform.Itanium 121Return DeclaringCompilation.Options.Platform = Platform.X86
VisualBasicCompilationOptions.vb (13)
55''' <param name="platform">An optional parameter to specify which platform version of common language runtime (CLR) can run compilation. <see cref="CodeAnalysis.Platform"/></param> 87Optional platform As Platform = Platform.AnyCpu, 164platform As Platform, 233platform As Platform, 785''' <param name="value">The platform setting. <see cref="Microsoft.CodeAnalysis.Platform"/></param> 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.CommandLine.UnitTests (9)
CommandLineTests.vb (9)
4735Assert.Equal(CodeAnalysis.Platform.X86, parsedArgs.CompilationOptions.Platform) 4739Assert.Equal(CodeAnalysis.Platform.X64, parsedArgs.CompilationOptions.Platform) 4743Assert.Equal(CodeAnalysis.Platform.Itanium, parsedArgs.CompilationOptions.Platform) 4747Assert.Equal(CodeAnalysis.Platform.AnyCpu, parsedArgs.CompilationOptions.Platform) 4751Assert.Equal(CodeAnalysis.Platform.AnyCpu32BitPreferred, parsedArgs.CompilationOptions.Platform) 4755Assert.Equal(CodeAnalysis.Platform.AnyCpu32BitPreferred, parsedArgs.CompilationOptions.Platform) 4759Assert.Equal(CodeAnalysis.Platform.Arm, parsedArgs.CompilationOptions.Platform) 4764Assert.Equal(CodeAnalysis.Platform.AnyCpu, parsedArgs.CompilationOptions.Platform) 4781Assert.Equal(CodeAnalysis.Platform.AnyCpu, parsedArgs.CompilationOptions.Platform)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (65)
Emit\CompilationEmitTests.vb (46)
2084compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.X86)) 2088compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.X64)) 2094compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.AnyCpu32BitPreferred)) 2113Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(Platform.AnyCpu)) 2138compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.AnyCpu)) 2174Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(Platform.Arm)) 2199compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.AnyCpu)) 2235Dim compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.DynamicallyLinkedLibrary).WithPlatform(Platform.X64)) 2255compilation = CreateCompilationWithMscorlib40(source, options:=New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithPlatform(Platform.X64)) 2343compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseExe.WithPlatform(Platform.X86)) 2347compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseExe.WithPlatform(Platform.X64)) 2351compilation = CreateCompilationWithMscorlib40(source, options:=TestOptions.ReleaseDll.WithPlatform(Platform.X64)) 3859Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 3876TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)) 3882TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)) 3888TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)) 3894TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)) 3900TestOptions.ReleaseDll.WithPlatform(Platform.X86)) 3909TestOptions.ReleaseDll.WithPlatform(Platform.X86)) 3918TestOptions.ReleaseModule.WithPlatform(Platform.X86)) 3927TestOptions.ReleaseModule.WithPlatform(Platform.X86)) 3951Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 3967TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)) 3976TestOptions.ReleaseDll.WithPlatform(Platform.X86)) 3985TestOptions.ReleaseModule.WithPlatform(Platform.X86)) 4002Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.X86)) 4019TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4028TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4037TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4046TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4064Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.X86)) 4080TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4098Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.AnyCpu)) 4115TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4123TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4131TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4139TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4156Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.AnyCpu)) 4172TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4189Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4206TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4214TestOptions.ReleaseDll.WithPlatform(Platform.Itanium)) 4222TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4230TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4247Dim refCompilation = CreateEmptyCompilationWithReferences(refSource, New MetadataReference() {}, TestOptions.ReleaseModule.WithPlatform(Platform.Itanium)) 4263TestOptions.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.ExpressionEvaluator.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.VisualBasic.Workspaces (1)
Serialization\VisualBasicOptionsSerializationService.vb (1)
69Dim platform As Platform
Microsoft.CodeAnalysis.Workspaces (2)
Serialization\AbstractOptionsSerializationService.cs (2)
89out Platform platform, 123platform = (Platform)reader.ReadInt32();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (10)
VisualStudioMSBuildWorkspaceTests.cs (10)
477Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 492Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 506Assert.Equal(Platform.AnyCpu32BitPreferred, compilation.Options.Platform); 521Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 536Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 601Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 616Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 630Assert.Equal(Platform.AnyCpu32BitPreferred, compilation.Options.Platform); 645Assert.Equal(Platform.AnyCpu, compilation.Options.Platform); 660Assert.Equal(Platform.AnyCpu, compilation.Options.Platform);
Microsoft.VisualStudio.LanguageServices (7)
Interactive\VsResetInteractive.cs (7)
168private static InteractiveHostPlatform? GetInteractiveHostPlatform(string targetFrameworkMoniker, Platform platform) 178case Platform.Arm: 179case Platform.AnyCpu32BitPreferred: 180case Platform.X86: 183case Platform.Itanium: 184case Platform.X64: 185case 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.Implementation (1)
ProjectSystem\CPS\TempPECompiler.cs (1)
70.WithPlatform(Platform.AnyCpu)
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
ProjectSystemShim\VisualBasicProject.OptionsProcessor.vb (2)
59Dim platform As Platform 61platform = Platform.AnyCpu