3 writes to OutputKind
Microsoft.CodeAnalysis (1)
Compilation\CompilationOptions.cs (1)
297this.OutputKind = outputKind;
Microsoft.CodeAnalysis.CSharp (1)
CSharpCompilationOptions.cs (1)
285return new CSharpCompilationOptions(this) { OutputKind = kind };
Microsoft.CodeAnalysis.VisualBasic (1)
VisualBasicCompilationOptions.vb (1)
484Return New VisualBasicCompilationOptions(Me) With {.OutputKind = kind}
162 references to OutputKind
Microsoft.Analyzers.Extra (1)
MakeExeTypesInternalAnalyzer.cs (1)
89if (compilationStartContext.Compilation.Options.OutputKind == OutputKind.ConsoleApplication)
Microsoft.CodeAnalysis (26)
CommandLine\CommonCompiler.cs (1)
1664using (Stream? manifestStream = OpenManifestStream(fileSystem, messageProvider, compilation.Options.OutputKind, arguments, diagnostics))
Compilation\Compilation.cs (14)
271if (options.OutputKind.IsValid() && options.OutputKind != OutputKind.DynamicallyLinkedLibrary) 403/// written to metadata is <see cref="AssemblyName"/> with an extension based upon <see cref="CompilationOptions.OutputKind"/>. 426(AssemblyName != null ? AssemblyName + Options.OutputKind.GetDefaultExtension() : UnspecifiedModuleAssemblyName); 1933if (this.Options.OutputKind.IsApplication()) 1949Win32ResourceConversions.AppendManifestToResourceStream(result, manifestContents, !this.Options.OutputKind.IsApplication()); 2131if (Options.OutputKind == OutputKind.NetModule && !(manifestResources != null && manifestResources.Any())) 2165if (Options.OutputKind != OutputKind.NetModule) 2205OutputKind outputKind = compilationOptions.OutputKind; 2319dllCharacteristics: GetDllCharacteristics(emitOptions.HighEntropyVirtualAddressSpace, compilationOptions.OutputKind == OutputKind.WindowsRuntimeApplication), 2442&& Options.OutputKind != OutputKind.NetModule 2457&& Options.OutputKind != OutputKind.NetModule 2875if (this.Options.OutputKind == OutputKind.NetModule) 3164if (Options.OutputKind == OutputKind.NetModule && manifestResources != null)
Compilation\CompilationOptions.cs (6)
34/// by appending a default extension for <see cref="OutputKind"/>. 342&& this.OutputKind.IsNetModule() == other.OutputKind.IsNetModule() 638this.OutputKind == other.OutputKind && 685Hash.Combine((int)this.OutputKind,
Compilation\DeterministicKeyBuilder.cs (1)
442writer.Write("outputKind", options.OutputKind);
MetadataReference\CompilationReference.cs (1)
39if (compilation.Options.OutputKind == OutputKind.NetModule)
NativePdbWriter\PdbWriter.cs (1)
85bool suppressNewCustomDebugInfo = compilationOptions.OutputKind == OutputKind.WindowsRuntimeMetadata;
ReferenceManager\CommonReferenceManager.Resolution.cs (1)
1033sourceCompilation?.Options.OutputKind == OutputKind.WindowsRuntimeMetadata &&
Symbols\ISymbolExtensions.cs (1)
107assembly is ISourceAssemblySymbol sourceAssembly && sourceAssembly.Compilation.Options.OutputKind.IsNetModule();
Microsoft.CodeAnalysis.CSharp (43)
CommandLine\CSharpCompiler.cs (1)
243Debug.Assert(Arguments.CompilationOptions.OutputKind.IsApplication());
Compilation\CSharpCompilation.cs (5)
1873if (!this.Options.OutputKind.IsApplication() && (this.ScriptClass is null)) 3367!this.Options.OutputKind.IsApplication(), 3424if (_options.OutputKind.IsNetModule()) 3434var kind = _options.OutputKind.IsValid() ? _options.OutputKind : OutputKind.DynamicallyLinkedLibrary;
Compiler\DocumentationCommentCompiler.cs (1)
186if (!_compilation.Options.OutputKind.IsNetModule())
Compiler\MethodCompiler.cs (1)
212if (moduleBeingBuiltOpt != null && entryPoint != null && compilation.Options.OutputKind.IsApplication())
CSharpCompilationOptions.cs (11)
232outputKind: other.OutputKind, 280if (kind == this.OutputKind) 669if (this.OutputKind.IsValid() && !this.OutputKind.IsApplication()) 690if (!OutputKind.IsValid()) 692builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(OutputKind), OutputKind.ToString())); 715if (Platform == Platform.AnyCpu32BitPreferred && OutputKind.IsValid() && !(OutputKind == OutputKind.ConsoleApplication || OutputKind == OutputKind.WindowsApplication || OutputKind == OutputKind.WindowsRuntimeApplication))
Emitter\EditAndContinue\EmitHelpers.cs (1)
97outputKind: compilation.Options.OutputKind,
Emitter\Model\PEModuleBuilder.cs (2)
645Debug.Assert(OutputKind.IsNetModule() == sourceAssembly.DeclaringCompilation.Options.OutputKind.IsNetModule()); 660if (!sourceAssembly.DeclaringCompilation.Options.OutputKind.IsNetModule())
Symbols\Compilation_WellKnownMembers.cs (1)
671if (Options.OutputKind == OutputKind.NetModule)
Symbols\Source\SourceAssemblySymbol.cs (18)
585if (StrongNameKeys.DiagnosticOpt != null && !_compilation.Options.OutputKind.IsNetModule()) 603if (_compilation.Options.OutputKind.IsNetModule()) 618if (DeclaringCompilation.Options.OutputKind != OutputKind.NetModule && 648if (!compilationOptions.OutputKind.IsNetModule()) 790if (_compilation.Options.OutputKind == OutputKind.NetModule) 813if (_compilation.Options.OutputKind == OutputKind.NetModule) 825!_compilation.Options.OutputKind.IsNetModule() && 837if (_compilation.Options.OutputKind == OutputKind.NetModule) 850if (_compilation.Options.OutputKind == OutputKind.NetModule) 862!_compilation.Options.OutputKind.IsNetModule() && 988if (_modules.Length > 1 && !_compilation.Options.OutputKind.IsNetModule()) 1364if (_compilation.Options.OutputKind.IsNetModule()) 1464if (_compilation.Options.OutputKind.IsNetModule()) 1943bool isBuildingNetModule = options.OutputKind.IsNetModule(); 2014if (_compilation.Options.OutputKind == OutputKind.NetModule) 2434if (_compilation.Options.OutputKind.IsApplication()) 2659internal override bool IsNetModule() => this._compilation.Options.OutputKind.IsNetModule(); 2865else if (!_compilation.Options.OutputKind.IsNetModule())
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
472(DeclaringCompilation.Options.OutputKind != OutputKind.NetModule &&
Symbols\SymbolExtensions.cs (1)
27return comp != null && comp.Options.OutputKind == OutputKind.WindowsRuntimeMetadata;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
21=> options.OutputKind is OutputKind.ConsoleApplication or OutputKind.WindowsApplication;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (14)
CommandLineTests.cs (14)
1314Assert.Equal(OutputKind.ConsoleApplication, parsedArgs.CompilationOptions.OutputKind); 1318Assert.Equal(OutputKind.NetModule, parsedArgs.CompilationOptions.OutputKind); 1322Assert.Equal(OutputKind.DynamicallyLinkedLibrary, parsedArgs.CompilationOptions.OutputKind); 1326Assert.Equal(OutputKind.WindowsApplication, parsedArgs.CompilationOptions.OutputKind); 1330Assert.Equal(OutputKind.WindowsRuntimeApplication, parsedArgs.CompilationOptions.OutputKind); 1334Assert.Equal(OutputKind.WindowsRuntimeMetadata, parsedArgs.CompilationOptions.OutputKind); 1338Assert.Equal(OutputKind.NetModule, parsedArgs.CompilationOptions.OutputKind); 1365Assert.Equal(OutputKind.ConsoleApplication, parsedArgs.CompilationOptions.OutputKind); 1373Assert.Equal(OutputKind.NetModule, parsedArgs.CompilationOptions.OutputKind); 1381Assert.Equal(OutputKind.DynamicallyLinkedLibrary, parsedArgs.CompilationOptions.OutputKind); 1389Assert.Equal(OutputKind.WindowsApplication, parsedArgs.CompilationOptions.OutputKind); 1397Assert.Equal(OutputKind.WindowsRuntimeApplication, parsedArgs.CompilationOptions.OutputKind); 1405Assert.Equal(OutputKind.WindowsRuntimeMetadata, parsedArgs.CompilationOptions.OutputKind); 1413Assert.Equal(OutputKind.NetModule, parsedArgs.CompilationOptions.OutputKind);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenTests.cs (1)
13278options.OutputKind,
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Semantics\ParamsCollectionTests.cs (2)
12815if (comp.Options.OutputKind == OutputKind.NetModule && memberName.StartsWith("<>")) 12839verify: comp.Options.OutputKind != OutputKind.NetModule ?
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
21=> options.OutputKind is OutputKind.ConsoleApplication or OutputKind.WindowsApplication;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\CSharpCompilationOptionsTests.cs (2)
73TestHiddenProperty((old, value) => old.WithOutputKind(value), opt => opt.OutputKind, OutputKind.DynamicallyLinkedLibrary); 109TestProperty((old, value) => old.WithOutputKind(value), opt => opt.OutputKind, OutputKind.DynamicallyLinkedLibrary);
Microsoft.CodeAnalysis.LanguageServer (1)
LanguageServer\Handler\DebugConfiguration\WorkspaceDebugConfigurationHandler.cs (1)
48var isExe = project.CompilationOptions?.OutputKind is OutputKind.ConsoleApplication or OutputKind.WindowsApplication;
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
RoundTripUtil.cs (1)
83var assemblyFileExtension = original.Options.OutputKind switch
Microsoft.CodeAnalysis.Test.Utilities (6)
CommonTestBase.cs (2)
92(compilation.Options.OutputKind == OutputKind.ConsoleApplication || compilation.Options.OutputKind == OutputKind.WindowsApplication),
Compilation\CompilationExtensions.cs (1)
130if (comp.Options.OutputKind == OutputKind.NetModule)
CompilationVerifier.cs (2)
66if (_compilation.Options.OutputKind.IsNetModule()) 659var targetReference = LoadTestEmittedExecutableForSymbolValidation(EmittedAssemblyData, _compilation.Options.OutputKind, display: _compilation.AssemblyName);
Platform\CoreClr\CoreCLRRuntimeEnvironment.cs (1)
59mainCompilation.Options.OutputKind,
Microsoft.CodeAnalysis.VisualBasic (32)
Binding\Binder_Statements.vb (1)
5322If Not Compilation.Options.OutputKind.IsApplication() Then
Compilation\ClsComplianceChecker.vb (2)
659Debug.Assert(symbol.Kind <> If(Me._compilation.Options.OutputKind = OutputKind.NetModule, SymbolKind.Assembly, SymbolKind.NetModule) OrElse 799Dim producingNetModule = Me._compilation.Options.OutputKind = OutputKind.NetModule
Compilation\DocumentationComments\DocumentationCommentCompiler.Namespace.vb (1)
36If Not Me._compilation.Options.OutputKind.IsNetModule() Then
Compilation\MethodCompiler.vb (1)
282If entryPoint IsNot Nothing AndAlso compilation.Options.OutputKind.IsApplication Then
Compilation\VisualBasicCompilation.vb (5)
1498If Not Me.Options.OutputKind.IsApplication() AndAlso ScriptClass Is Nothing Then 2335Not Me.Options.OutputKind.IsApplication(), 2417If Options.OutputKind.IsNetModule() Then 2426Dim kind = If(Options.OutputKind.IsValid(), Options.OutputKind, OutputKind.DynamicallyLinkedLibrary)
Emit\EditAndContinue\EmitHelpers.vb (1)
89compilation.Options.OutputKind,
Symbols\Attributes\AttributeData.vb (2)
554target.DeclaringCompilation.Options.OutputKind = OutputKind.NetModule) OrElse 591target.DeclaringCompilation.Options.OutputKind <> OutputKind.NetModule) Then
Symbols\Source\SourceAssemblySymbol.vb (9)
375If _compilation.Options.OutputKind.IsNetModule() Then 1071If Me.DeclaringCompilation.Options.OutputKind.IsApplication() Then 1264If DeclaringCompilation.Options.OutputKind <> OutputKind.NetModule AndAlso 1298If _compilation.Options.OutputKind = OutputKind.NetModule Then 1368If _modules.Length > 1 AndAlso Not _compilation.Options.OutputKind.IsNetModule() Then 1469If Not compilationOptions.OutputKind.IsNetModule() Then 1518Dim isBuildingNetModule As Boolean = options.OutputKind.IsNetModule() 1614If _compilation.Options.OutputKind = OutputKind.NetModule Then 1778If Not _compilation.Options.OutputKind.IsNetModule() Then
Symbols\SymbolExtensions.vb (1)
20Return comp IsNot Nothing And comp.Options.OutputKind = OutputKind.WindowsRuntimeMetadata
VisualBasicCompilationOptions.vb (9)
298outputKind:=other.OutputKind, 480If kind = Me.OutputKind Then 1030If Me.EmbedVbCoreRuntime AndAlso Me.OutputKind.IsNetModule() Then 1042If Not OutputKind.IsValid() Then 1043builder.Add(Diagnostic.Create(MessageProvider.Instance, ERRID.ERR_InvalidSwitchValue, NameOf(OutputKind), OutputKind.ToString())) 1066If Platform = Platform.AnyCpu32BitPreferred AndAlso OutputKind.IsValid() AndAlso 1067Not (OutputKind = OutputKind.ConsoleApplication OrElse OutputKind = OutputKind.WindowsApplication OrElse OutputKind = OutputKind.WindowsRuntimeApplication) Then
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (16)
CommandLineTests.vb (16)
1974Assert.Equal(OutputKind.DynamicallyLinkedLibrary, parsedArgs.CompilationOptions.OutputKind) 1978Assert.Equal(OutputKind.NetModule, parsedArgs.CompilationOptions.OutputKind) 2910Assert.Equal(OutputKind.ConsoleApplication, parsedArgs.CompilationOptions.OutputKind) 2914Assert.Equal(OutputKind.NetModule, parsedArgs.CompilationOptions.OutputKind) 2918Assert.Equal(OutputKind.DynamicallyLinkedLibrary, parsedArgs.CompilationOptions.OutputKind) 2922Assert.Equal(OutputKind.WindowsApplication, parsedArgs.CompilationOptions.OutputKind) 2926Assert.Equal(OutputKind.WindowsRuntimeMetadata, parsedArgs.CompilationOptions.OutputKind) 2930Assert.Equal(OutputKind.WindowsRuntimeApplication, parsedArgs.CompilationOptions.OutputKind) 2934Assert.Equal(OutputKind.NetModule, parsedArgs.CompilationOptions.OutputKind) 2956Assert.Equal(OutputKind.ConsoleApplication, parsedArgs.CompilationOptions.OutputKind) 2960Assert.Equal(OutputKind.NetModule, parsedArgs.CompilationOptions.OutputKind) 2964Assert.Equal(OutputKind.DynamicallyLinkedLibrary, parsedArgs.CompilationOptions.OutputKind) 2968Assert.Equal(OutputKind.WindowsApplication, parsedArgs.CompilationOptions.OutputKind) 2972Assert.Equal(OutputKind.WindowsRuntimeMetadata, parsedArgs.CompilationOptions.OutputKind) 2976Assert.Equal(OutputKind.WindowsRuntimeApplication, parsedArgs.CompilationOptions.OutputKind) 2980Assert.Equal(OutputKind.NetModule, parsedArgs.CompilationOptions.OutputKind)
Microsoft.CodeAnalysis.Workspaces (1)
Serialization\AbstractOptionsSerializationService.cs (1)
28writer.WriteInt32((int)options.OutputKind);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (8)
VisualStudioMSBuildWorkspaceTests.cs (8)
1511await AssertCSCompilationOptionsAsync(OutputKind.DynamicallyLinkedLibrary, options => options.OutputKind); 1518await AssertCSCompilationOptionsAsync(OutputKind.ConsoleApplication, options => options.OutputKind); 1525await AssertCSCompilationOptionsAsync(OutputKind.WindowsApplication, options => options.OutputKind); 1532await AssertCSCompilationOptionsAsync(OutputKind.NetModule, options => options.OutputKind); 1709await AssertVBCompilationOptionsAsync(OutputKind.DynamicallyLinkedLibrary, options => options.OutputKind); 1716await AssertVBCompilationOptionsAsync(OutputKind.ConsoleApplication, options => options.OutputKind); 1723await AssertVBCompilationOptionsAsync(OutputKind.WindowsApplication, options => options.OutputKind); 1730await AssertVBCompilationOptionsAsync(OutputKind.NetModule, options => options.OutputKind);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Workspaces\TestHostProject`1.cs (1)
311return CompilationOptions == null ? "" : Path.Combine(GetTestOutputDirectory(projectFilePath), subdir, AssemblyName + GetDefaultExtension(CompilationOptions.OutputKind));
Workspaces\TestWorkspace_XmlCreation.cs (2)
173if (options.OutputKind != OutputKind.DynamicallyLinkedLibrary) 175element.SetAttributeValue(OutputKindName, options.OutputKind);
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
CommandLineProject\CommandLineProjectWorkspaceTests.cs (2)
34Assert.Equal(OutputKind.DynamicallyLinkedLibrary, project.CompilationOptions.OutputKind); 62Assert.Equal(OutputKind.DynamicallyLinkedLibrary, project.CompilationOptions.OutputKind);
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ApplicationConfigurationGenerator.cs (1)
75=> compilation.Options.OutputKind);