247 references to InvalidOperationException
Aspire.Azure.Messaging.EventHubs (1)
EventProcessorClientComponent.cs (1)
120throw new InvalidOperationException(
Aspire.Dashboard (4)
Otlp\Storage\TelemetryRepository.cs (1)
764throw new InvalidOperationException($"Multiple traces found with trace id '{traceId}'.", ex);
ResourceService\Partials.cs (1)
57throw new InvalidOperationException($@"Error converting resource ""{Name}"" to {nameof(ResourceViewModel)}.", ex);
src\Shared\IConfigurationExtensions.cs (2)
81throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 118throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex);
Aspire.Dashboard.Tests (1)
TelemetryRepositoryTests\TraceTests.cs (1)
922throw new InvalidOperationException($"Error adding trace number {i}.", ex);
Aspire.EndToEnd.Tests (1)
tests\Shared\WorkloadTesting\BuildEnvironment.cs (1)
248throw new InvalidOperationException($"Error deleting '{TestRootPath}'.", ex);
Aspire.Hosting (3)
DistributedApplicationOptions.cs (1)
110throw new InvalidOperationException($"Failed to load AppHost assembly '{AssemblyName}' specified in {nameof(DistributedApplicationOptions)}.", ex);
src\Shared\IConfigurationExtensions.cs (2)
81throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex); 118throw new InvalidOperationException($"Error parsing URIs from configuration value '{key}'.", ex);
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQLoggingTests.cs (1)
167throw new InvalidOperationException(exceptionMessage, innerException);
Aspire.RabbitMQ.Client.v7.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (1)
167throw new InvalidOperationException(exceptionMessage, innerException);
Aspire.Workload.Tests (1)
tests\Shared\WorkloadTesting\BuildEnvironment.cs (1)
248throw new InvalidOperationException($"Error deleting '{TestRootPath}'.", ex);
DesignSurfaceExt (6)
DesignSurfaceExt.cs (4)
157throw new InvalidOperationException($"{Name}::CreateRootComponent() - Exception: (see Inner Exception)", ex); 193throw new InvalidOperationException($"{Name}::CreateControl() - Exception: (see Inner Exception)", ex); 228throw new InvalidOperationException($"{Name}::{nameof(CreateComponent)} - Exception: (see Inner Exception)", ex); 372throw new InvalidOperationException($"{Name}::DoAction() - Exception: error in performing the action: {command}(see Inner Exception)", ex);
TabOrderHooker.cs (2)
40throw new InvalidOperationException($"{Name}::HookTabOrder() - Exception: (see Inner Exception)", ex); 61throw new InvalidOperationException($"{Name}::DisposeTabOrder() - Exception: (see Inner Exception)", ex);
dotnet-svcutil-lib (40)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Compilation.cs (3)
114throw new InvalidOperationException(string.Format(ResXml.XmlSerializerExpired, assembly.FullName, /*assembly.CodeBase*/ null), missingMethod); 191throw new InvalidOperationException(ResXml.XmlNoPartialTrust, e); 225throw new InvalidOperationException(ResXml.XmlNoPartialTrust, e);
FrameworkFork\Microsoft.Xml\Xml\Serialization\Models.cs (1)
195throw new InvalidOperationException(string.Format(ResXml.XmlSerializerUnsupportedMember, member.DeclaringType.FullName + "." + member.Name, type.FullName), typeDesc.Exception);
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (1)
174return new InvalidOperationException(string.Format(ResXml.XmlReflectionError, context), e);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (3)
370return new InvalidOperationException(string.Format(ResXml.XmlReflectionError, context), e); 375return new InvalidOperationException(string.Format(ResXml.XmlTypeReflectionError, context), e); 380return new InvalidOperationException(string.Format(model.IsProperty ? ResXml.XmlPropertyReflectionError : ResXml.XmlFieldReflectionError, model.Name), e);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemas.cs (2)
802throw new InvalidOperationException(GetSchemaItem(source, null, message), exception); 818throw new InvalidOperationException(string.Format(ResXml.XmlSchemaSyntaxErrorDetails, ns, message, exception.LineNumber, exception.LinePosition), exception);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializer.cs (3)
398throw new InvalidOperationException(ResXml.XmlGenError, e); 494throw new InvalidOperationException(string.Format(ResXml.XmlSerializeErrorDetails, lineInfo.LineNumber.ToString(), lineInfo.LinePosition.ToString()), e); 498throw new InvalidOperationException(ResXml.XmlSerializeError, e);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (1)
224throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.ClientWebSocketFactory_CreateWebSocketFailed, _connectionFactory.GetType().Name), e));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FaultConverter.cs (1)
46Exception error = new InvalidOperationException(text, exception);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
1167throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (9)
636throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 757throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 804throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 816throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 833throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 964throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 978throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1017throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 1067throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExporter.cs (1)
147return new InvalidOperationException(errorMessage, e);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataImporter.cs (1)
142return new InvalidOperationException(errorMessage, e);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (4)
487throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 492throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 501throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException( 506throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (2)
1205return new InvalidOperationException(errorMessage, e); 1223return new InvalidOperationException(errorMessage, e);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (3)
1897return new InvalidOperationException(errorMessage, e); 1911return new InvalidOperationException(errorMessage, e); 1917: base(message, innerException)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ChannelDispatcher.cs (2)
491return new InvalidOperationException(string.Format(SRServiceModel.SFxChannelDispatcherUnableToOpen1, _listener.Uri), e); 495return new InvalidOperationException(string.Format(SRServiceModel.SFxChannelDispatcherUnableToOpen2, _listener.Uri, endpointContractNames), e);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (1)
423throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationFormatter.cs (1)
167throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxMessageContractRequiresDefaultConstructor, messageContractType.FullName), mme));
Infrastructure.Common (2)
CertificateManager.cs (2)
122throw new InvalidOperationException(exceptionString.ToString(), inner); 157throw new InvalidOperationException($"Error while attempting to install cert with thumbprint '{certificate.Thumbprint}' into OSX custom keychain.", inner);
InteropTests (2)
InteropTests.cs (2)
96throw new InvalidOperationException(errorMessage, ex); 125throw new InvalidOperationException(errorMessage, ex);
Microsoft.Analyzers.Local.Tests (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.AspNetCore.AsyncState (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
OpenIdConnectHandler.cs (2)
148throw new InvalidOperationException("An error was returned from the RemoteSignOut event.", remoteSignOutContext.Result.Failure); 345throw new InvalidOperationException("An error was returned from the SignedOutCallbackRedirect event.", signOut.Result.Failure);
Microsoft.AspNetCore.Components (1)
Reflection\ComponentProperties.cs (1)
171throw new InvalidOperationException(
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
203throw new InvalidOperationException(
Microsoft.AspNetCore.Components.Web (3)
Forms\InputExtensions.cs (1)
48throw new InvalidOperationException($"{input.GetType()} does not support the type '{typeof(TValue)}'.", ex);
WebEventData\WebEventData.cs (2)
29throw new InvalidOperationException("Error parsing the event descriptor", e); 83throw new InvalidOperationException($"There was an error parsing the event arguments. EventId: '{eventHandlerId}'.", e);
Microsoft.AspNetCore.Components.WebAssembly (1)
Prerendering\WebAssemblyComponentParameterDeserializer.cs (1)
69throw new InvalidOperationException($"Could not parse the parameter value for parameter '{definition.Name}' of type '{definition.TypeName}' and assembly '{definition.Assembly}'.", e);
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (1)
src\Shared\AsyncEnumerableExtensions.cs (1)
32throw new InvalidOperationException($"Results ended with final value of {value}. Expected value of {expectedValue}.", ex);
Microsoft.AspNetCore.Connections.Abstractions (1)
Exceptions\AddressInUseException.cs (1)
26public AddressInUseException(string message, Exception inner) : base(message, inner)
Microsoft.AspNetCore.DataProtection (2)
Error.cs (1)
103return new InvalidOperationException(Resources.KeyRingProvider_RefreshFailedOnOtherThread, inner);
TypeExtensions.cs (1)
40throw new InvalidOperationException($"Unable to load type '{typeName}'. If the app is published with trimming then this type may have been trimmed. Ensure the type's assembly is excluded from trimming.", ex);
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
217edi = ExceptionDispatchInfo.Capture(new InvalidOperationException($"The exception handler configured on {nameof(ExceptionHandlerOptions)} produced a 404 status response. " +
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
MigrationsEndPointMiddleware.cs (1)
90throw new InvalidOperationException(message, ex);
Microsoft.AspNetCore.Grpc.JsonTranscoding (5)
Internal\Binding\JsonTranscodingProviderServiceBinder.cs (1)
225throw new InvalidOperationException($"Error binding {method.Name} on {typeof(TService).Name} to HTTP API.", ex);
Internal\Binding\JsonTranscodingServiceMethodProvider.cs (1)
81throw new InvalidOperationException($"Error binding gRPC service '{typeof(TService).Name}'.", ex);
Internal\JsonRequestHelpers.cs (2)
83throw new InvalidOperationException($"Unable to read the request as JSON because the request content type charset '{charset}' is not a known encoding.", ex); 114throw new InvalidOperationException($"Error when parsing the '{StatusDetailsTrailerName}' trailer.", ex);
src\Grpc\JsonTranscoding\src\Shared\HttpRoutePatternParser.cs (1)
57throw new InvalidOperationException($"Error parsing path template '{_input}'.", ex);
Microsoft.AspNetCore.Grpc.Swagger (1)
src\Grpc\JsonTranscoding\src\Shared\HttpRoutePatternParser.cs (1)
57throw new InvalidOperationException($"Error parsing path template '{_input}'.", ex);
Microsoft.AspNetCore.HeaderParsing (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.AspNetCore.Hosting (3)
GenericHost\GenericWebHostBuilder.cs (1)
156exceptions.Add(new InvalidOperationException($"Startup assembly {assemblyName} failed to execute. See the inner exception for more details.", ex));
Internal\ConfigureBuilder.cs (1)
46throw new InvalidOperationException(string.Format(
WebHostBuilder.cs (1)
249exceptions.Add(new InvalidOperationException($"Startup assembly {assemblyName} failed to execute. See the inner exception for more details.", ex));
Microsoft.AspNetCore.Hosting.FunctionalTests (3)
ShutdownTests.cs (2)
97throw new InvalidOperationException("Timeout while waiting for host process to output started message.", ex); 110throw new InvalidOperationException($"Timeout while waiting for host process to output completion message. The received output is: {output}", ex);
WebHostBuilderTests.cs (1)
59throw new InvalidOperationException("Timeout while waiting for output from host process.", ex);
Microsoft.AspNetCore.Hosting.Tests (1)
src\Shared\AsyncEnumerableExtensions.cs (1)
32throw new InvalidOperationException($"Results ended with final value of {value}. Expected value of {expectedValue}.", ex);
Microsoft.AspNetCore.Http.Connections.Client (1)
Internal\WebSocketsTransport.cs (1)
415throw new InvalidOperationException("Reconnect attempt failed.", innerException: ex);
Microsoft.AspNetCore.Http.Extensions (1)
HttpRequestJsonExtensions.cs (1)
342throw new InvalidOperationException($"Unable to read the request as JSON because the request content type charset '{charset}' is not a known encoding.", ex);
Microsoft.AspNetCore.Mvc.Core (2)
Filters\MiddlewareFilterConfigurationProvider.cs (1)
110throw new InvalidOperationException(
ModelBinding\Metadata\ModelAttributes.cs (1)
235throw new InvalidOperationException("Only one ModelMetadataType attribute is permitted per type.", e);
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
ExpressionHelper.cs (1)
225throw new InvalidOperationException(
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheTests.cs (1)
1028throw new InvalidOperationException($"Client {id} failed; payload '{s}', failure: {ex.Message}", ex);
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Certificates\CertificateConfigLoader.cs (1)
152return new InvalidOperationException($"Error getting private key from '{keyPath}'.", ex);
Internal\Http3\Http3FrameWriter.cs (1)
378throw new InvalidOperationException(ex.Message, ex); // Report the error to the user if this was the first write.
Internal\Infrastructure\HttpUtilities.cs (1)
173throw new InvalidOperationException(ex.Message, ex);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (1)
361throw new InvalidOperationException($"Error when checking header '{expectedValue.Key}'.", ex);
Microsoft.AspNetCore.Shared.Tests (1)
runtime\Http3\QPackDecoderTest.cs (1)
361throw new InvalidOperationException($"Error when checking header '{expectedValue.Key}'.", ex);
Microsoft.AspNetCore.SpaServices.Extensions (5)
AngularCli\AngularCliBuilder.cs (2)
74throw new InvalidOperationException( 81throw new InvalidOperationException(
AngularCli\AngularCliMiddleware.cs (1)
81throw new InvalidOperationException(
Npm\NodeScriptRunner.cs (1)
141throw new InvalidOperationException(message, ex);
ReactDevelopmentServer\ReactDevelopmentServerMiddleware.cs (1)
95throw new InvalidOperationException(
Microsoft.AspNetCore.TestHost (1)
HttpContextBuilder.cs (1)
200throw new InvalidOperationException("An error occurred when completing the request. Request delegate may have finished while there is a pending read of the request body.", ex);
Microsoft.AspNetCore.Testing (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Build.Framework (1)
ThrowHelper.cs (1)
165throw new InvalidOperationException(GetResourceString(resource), e);
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
179throw new InvalidOperationException($"Unable to load {assemblyName.Name}", ex);
src\Dependencies\Collections\Internal\ThrowHelper.cs (1)
179throw new InvalidOperationException(GetResourceString(resource), e);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Dependencies\Collections\Internal\ThrowHelper.cs (1)
179throw new InvalidOperationException(GetResourceString(resource), e);
Microsoft.CodeAnalysis.Collections.Package (1)
Internal\ThrowHelper.cs (1)
179throw new InvalidOperationException(GetResourceString(resource), e);
Microsoft.CodeAnalysis.Test.Utilities (1)
TempFiles\DisposableFile.cs (1)
44throw new InvalidOperationException(string.Format(@"
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
179throw new InvalidOperationException($"Unable to load {assemblyName.Name}", ex);
src\Dependencies\Collections\Internal\ThrowHelper.cs (1)
179throw new InvalidOperationException(GetResourceString(resource), e);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Dependencies\Collections\Internal\ThrowHelper.cs (1)
179throw new InvalidOperationException(GetResourceString(resource), e);
Microsoft.Extensions.AI (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Abstractions (2)
Contents\FunctionCallContent.cs (1)
89parsingException = new InvalidOperationException("Error parsing function call arguments.", ex);
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Abstractions.Tests (1)
Contents\FunctionCallContentTests..cs (1)
82var ex = new InvalidOperationException("hello", new NullReferenceException("bye"));
Microsoft.Extensions.AI.AzureAIInference (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Integration.Tests (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.Ollama (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AI.OpenAI (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AmbientMetadata.Application (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.AsyncState (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Caching.Hybrid (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Compliance.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Compliance.Redaction (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Compliance.Testing (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Configuration.Binder (7)
ConfigurationBinder.cs (7)
574throw new InvalidOperationException(SR.Format(SR.Error_FailedToActivate, type), ex); 754throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 793throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 849throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 920throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 961error = new InvalidOperationException(SR.Format(SR.Error_FailedBinding, path, type), ex); 974error = new InvalidOperationException(SR.Format(SR.Error_FailedBinding, path, type), ex);
Microsoft.Extensions.DependencyInjection (1)
ServiceProvider.cs (1)
203throw new InvalidOperationException($"Error while validating the service descriptor '{descriptor}': {e.Message}", e);
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Diagnostics.Probes (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Diagnostics.Testing (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Hosting.Testing (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Http (1)
DefaultTypedHttpClientFactory.cs (1)
46throw new InvalidOperationException(SR.Format(SR.TypedClient_NoHttpClientCtor, typeof(TClient).Name), iox);
Microsoft.Extensions.Http.Resilience (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Options.Contextual (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Resilience (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Telemetry (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.Telemetry.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Extensions.TimeProvider.Testing (1)
src\Shared\Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
Microsoft.Maui.Controls (1)
ListProxy.cs (1)
332 throw new InvalidOperationException("You must call UpdateNonNotifyingList() after updating a list that does not implement INotifyCollectionChanged", ioex);
Microsoft.Maui.Essentials (1)
Types\Shared\Exceptions.shared.cs (1)
105 : base(message, innerException)
Microsoft.ML.AutoML (2)
Sweepers\SmacSweeper.cs (1)
249throw new InvalidOperationException("SMAC sweeper localSearch threw exception", e);
Tuner\SmacTuner.cs (1)
254throw new InvalidOperationException("SMAC sweeper localSearch threw exception", e);
Microsoft.ML.Core (4)
Utilities\Contracts.cs (4)
268=> Process(new InvalidOperationException(msg, inner)); 270=> Process(new InvalidOperationException(msg, inner), ctx); 272=> Process(new InvalidOperationException(GetMsg(msg, args), inner)); 274=> Process(new InvalidOperationException(GetMsg(msg, args), inner), ctx);
Microsoft.ML.CpuMath (4)
src\Microsoft.ML.Core\Utilities\Contracts.cs (4)
268=> Process(new InvalidOperationException(msg, inner)); 270=> Process(new InvalidOperationException(msg, inner), ctx); 272=> Process(new InvalidOperationException(GetMsg(msg, args), inner)); 274=> Process(new InvalidOperationException(GetMsg(msg, args), inner), ctx);
Microsoft.ML.Tokenizers (1)
Model\TiktokenTokenizer.cs (1)
233throw new InvalidOperationException($"Failed to load from BPE vocab file stream: {ex.Message}", ex);
PresentationCore (11)
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
428throw new InvalidOperationException(SR.ByteRangeDownloaderErroredOut, _erroredOutException);
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_render.cs (7)
798return new System.InvalidOperationException(SR.Image_WrongState, exceptionForHR); 811return new System.InvalidOperationException(SR.WIC_NotInitialized, exceptionForHR); 823return new System.InvalidOperationException(SR.Image_CodecPresent, exceptionForHR); 829return new System.InvalidOperationException(SR.Image_NoPalette, exceptionForHR); 835return new System.InvalidOperationException(SR.Image_InternalError, exceptionForHR); 861return new System.InvalidOperationException(SR.Image_StreamWrite, exceptionForHR); 909return new System.InvalidOperationException(SR.Image_DisplayStateInvalid, exceptionForHR);
System\Windows\Markup\XmlLanguage.cs (2)
201throw new InvalidOperationException(SR.Format(SR.XmlLangGetCultureFailure, lowerCaseTag), e); 254throw new InvalidOperationException(SR.Format(SR.XmlLangGetSpecificCulture, _lowerCaseTag), e);
System\Windows\Media\textformatting\TextParagraphCache.cs (1)
77throw new InvalidOperationException(SR.Format(SR.CreateParaBreakingSessionFailure, lserr), callbackException);
PresentationFramework (5)
MS\Internal\AppModel\AppSecurityManager.cs (1)
137throw new InvalidOperationException(SR.FailToLaunchDefaultBrowser,
MS\Internal\Data\RBTree.cs (1)
126throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e);
System\Windows\Annotations\Storage\XmlStreamStore.cs (1)
576throw new InvalidOperationException(SR.CannotParseId, fe);
System\Windows\Controls\DataGrid.cs (1)
7116throw new InvalidOperationException(SR.DataGrid_ProbableInvalidSortDescription, invalidOperationException);
System\Windows\Controls\ItemContainerGenerator.cs (1)
1102throw new InvalidOperationException(SR.Generator_Inconsistent, exception);
Shared (1)
Throw\Throw.cs (1)
409=> throw new InvalidOperationException(message, innerException);
System.ComponentModel.Composition (3)
System\ComponentModel\Composition\CatalogReflectionContextAttribute.cs (1)
39throw new InvalidOperationException(SR.ReflectionContext_Type_Required, invalidCastException);
System\ComponentModel\Composition\Hosting\AtomicComposition.cs (2)
179throw new InvalidOperationException(SR.InvalidOperation_RevertAndCompleteActionsMustNotThrow, new AggregateException(exceptions)); 214throw new InvalidOperationException(SR.InvalidOperation_RevertAndCompleteActionsMustNotThrow, new AggregateException(exceptions));
System.Data.Odbc (1)
Common\System\Data\Common\AdapterUtil.Odbc.cs (1)
64InvalidOperationException e = new InvalidOperationException(error, inner);
System.Net.Http (1)
System\Net\Http\HttpContent.cs (1)
146throw new InvalidOperationException(SR.net_http_content_invalid_charset, e);
System.Net.Http.Json (1)
System\Net\Http\Json\JsonHelpers.cs (1)
50throw new InvalidOperationException(SR.CharSetInvalid, e);
System.Net.Ping (1)
System\Net\NetworkInformation\PingException.cs (1)
19base(message, innerException)
System.Net.Requests (1)
System\Net\WebException.cs (1)
45base(message, innerException)
System.Private.CoreLib (8)
src\libraries\System.Private.CoreLib\src\System\ObjectDisposedException.cs (1)
39: base(message ?? SR.ObjectDisposed_Generic, innerException)
src\libraries\System.Private.CoreLib\src\System\Resources\FileBasedResourceGroveler.cs (1)
103throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResMgrBadResSet_Type, _mediator.UserResourceSet.AssemblyQualifiedName), e);
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (1)
265throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResMgrBadResSet_Type, _mediator.UserResourceSet.AssemblyQualifiedName), e);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\SwitchExpressionException.cs (2)
22base(SR.Arg_SwitchExpressionException, innerException) 41: base(message ?? SR.Arg_SwitchExpressionException, innerException) { }
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (2)
75throw new InvalidOperationException(SR.AssemblyDependencyResolver_FailedToLoadHostpolicy, entryPointNotFoundException); 79throw new InvalidOperationException(SR.AssemblyDependencyResolver_FailedToLoadHostpolicy, dllNotFoundException);
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (1)
410throw new InvalidOperationException(GetResourceString(resource), e);
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\Json\XmlJsonReader.cs (1)
353throw new InvalidOperationException(SR.GenericCallbackException, e);
System.Private.Xml (13)
System\Xml\Serialization\Compilation.cs (3)
76throw new InvalidOperationException(ex.Message, ex); 629throw new InvalidOperationException(SR.XmlNoPartialTrust, e); 656throw new InvalidOperationException(SR.XmlNoPartialTrust, e);
System\Xml\Serialization\Models.cs (1)
210throw new InvalidOperationException(SR.Format(SR.XmlSerializerUnsupportedMember, $"{member.DeclaringType!.FullName}.{member.Name}", type.FullName), typeDesc.Exception);
System\Xml\Serialization\SoapReflectionImporter.cs (1)
139return new InvalidOperationException(SR.Format(SR.XmlReflectionError, context), e);
System\Xml\Serialization\XmlReflectionImporter.cs (3)
376return new InvalidOperationException(SR.Format(SR.XmlReflectionError, context), e); 381return new InvalidOperationException(SR.Format(SR.XmlTypeReflectionError, context), e); 386return new InvalidOperationException(SR.Format(model.IsProperty ? SR.XmlPropertyReflectionError : SR.XmlFieldReflectionError, model.Name), e);
System\Xml\Serialization\XmlSchemas.cs (2)
696throw new InvalidOperationException(GetSchemaItem(source, null, message), exception); 712throw new InvalidOperationException(SR.Format(SR.XmlSchemaSyntaxErrorDetails, ns, message, exception.LineNumber, exception.LinePosition), exception);
System\Xml\Serialization\XmlSerializer.cs (3)
417throw new InvalidOperationException(SR.XmlGenError, e); 520throw new InvalidOperationException(SR.Format(SR.XmlSerializeErrorDetails, lineInfo.LineNumber.ToString(CultureInfo.InvariantCulture), lineInfo.LinePosition.ToString(CultureInfo.InvariantCulture)), e); 524throw new InvalidOperationException(SR.XmlSerializeError, e);
System.Security.Cryptography.Cose (4)
System\Security\Cryptography\Cose\CoseHeaderValue.cs (4)
146throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 173throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 200throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 232throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex);
System.Text.Json (1)
System\Text\Json\ThrowHelper.cs (1)
587InvalidOperationException ex = new InvalidOperationException(message, innerException);
System.Threading.Channels (2)
System\Threading\Channels\ChannelClosedException.cs (2)
20base(SR.ChannelClosedException_DefaultMessage, innerException) { } 25public ChannelClosedException(string? message, Exception? innerException) : base(message ?? SR.ChannelClosedException_DefaultMessage, innerException) { }
System.Transactions.Local (2)
System\Transactions\TransactionException.cs (2)
49return new InvalidOperationException(messagewithTxId, innerException); 60return new InvalidOperationException(message, innerException);
System.Windows.Forms (6)
System\Windows\Forms\Accessibility\LabelEditNativeWindow.cs (1)
178throw new InvalidOperationException(SR.RichControlLresult, ex);
System\Windows\Forms\Control.cs (2)
9494throw new InvalidOperationException(SR.DragDropRegFailed, e); 11246throw new InvalidOperationException(SR.RichControlLresult, e);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildNativeWindow.cs (1)
153throw new InvalidOperationException(SR.RichControlLresult, e);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
184throw new InvalidOperationException(SR.DragDropRegFailed, e);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (1)
619throw new InvalidOperationException(string.Format(
System.Windows.Forms.Design (5)
System\ComponentModel\Design\DesignerHost.cs (1)
352e = new InvalidOperationException(string.Format(SR.DesignSurfaceFatalError, e), e);
System\ComponentModel\Design\DesignSurface.cs (1)
140throw new InvalidOperationException(ex.Message, ex);
System\Windows\Forms\Design\ControlDesigner.cs (1)
2489InvalidOperationException wrapper = new(
System\Windows\Forms\Design\DataGridViewDesigner.cs (2)
396throw new InvalidOperationException(SR.DataGridViewDataSourceNoLongerValid, ex); 573throw new InvalidOperationException(SR.DataGridViewDataSourceNoLongerValid, ex);
System.Windows.Forms.UI.IntegrationTests (1)
DesignBehaviorsTests.cs (1)
31throw new InvalidOperationException(e.Exception.Message, e.Exception);
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\E2ETesting\BrowserFixture.cs (1)
216throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive", innerException);
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\E2ETesting\BrowserFixture.cs (1)
216throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive", innerException);
Templates.Mvc.Tests (1)
src\Shared\E2ETesting\BrowserFixture.cs (1)
216throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive", innerException);
Templates.Tests (1)
src\Shared\E2ETesting\BrowserFixture.cs (1)
216throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive", innerException);
UIAutomationClientSideProviders (3)
MS\Internal\AutomationProxies\Accessible.cs (2)
534throw new InvalidOperationException(SR.OperationCannotBePerformed, e); 1130throw new InvalidOperationException(SR.OperationCannotBePerformed, e);
MS\Internal\AutomationProxies\MSAANativeProvider.cs (1)
1211throw new InvalidOperationException(SR.OperationCannotBePerformed, e);
UIAutomationTypes (1)
System\Windows\Automation\ElementNotEnabledException.cs (1)
47public ElementNotEnabledException(string message, Exception innerException) : base(message, innerException)
WindowsFormsIntegration (1)
System\Windows\Integration\PropertyMap.cs (1)
321throw new InvalidOperationException(SR.WFI_PropertyMapError, ex);