NSwagStudio v12: An assembly specified in the application dependencies manifest (dotnet-nswag.deps.json) was not found

Created on 14 Dec 2018  路  7Comments  路  Source: RicoSuter/NSwag

I got an upgrade on NSwagStudio (from v11 to v12.0.7.0) and I can't generate CSharpClient anymore :

Error:
An assembly specified in the application dependencies manifest (dotnet-nswag.deps.json) was not found:
package: 'Microsoft.AspNetCore.Mvc.Formatters.Json', version: '1.0.3'
path: 'lib/netstandard1.6/Microsoft.AspNetCore.Mvc.Formatters.Json.dll'

Runtime: NetCore21

image

nswag file used :

"codeGenerators": {
"swaggerToCSharpClient": {
"clientBaseClass": "BaseUsersApiClient",
"configurationClass": "IHttpClientFactory",
"generateClientClasses": false,
"generateClientInterfaces": true,
"generateDtoTypes": true,
"injectHttpClient": false,
"disposeHttpClient": false,
"protectedMethods": [],
"generateExceptionClasses": true,
"exceptionClass": "UsersSwaggerException",
"wrapDtoExceptions": true,
"useHttpClientCreationMethod": true,
"httpClientType": "System.Net.Http.HttpClient",
"useHttpRequestMessageCreationMethod": false,
"useBaseUrl": true,
"generateBaseUrlProperty": true,
"generateSyncMethods": false,
"exposeJsonSerializerSettings": false,
"clientClassAccessModifier": "public",
"typeAccessModifier": "public",
"generateContractsOutput": false,
"contractsNamespace": null,
"contractsOutputFilePath": null,
"parameterDateTimeFormat": "s",
"generateUpdateJsonSerializerSettingsMethod": true,
"serializeTypeInformation": false,
"queryNullValue": "",
"className": "UsersApiClient",
"operationGenerationMode": "MultipleClientsFromOperationId",
"additionalNamespaceUsages": [],
"additionalContractNamespaceUsages": [],
"generateOptionalParameters": false,
"generateJsonMethods": true,
"enforceFlagEnums": false,
"parameterArrayType": "System.Collections.Generic.IEnumerable",
"parameterDictionaryType": "System.Collections.Generic.IDictionary",
"responseArrayType": "System.Collections.ObjectModel.ObservableCollection",
"responseDictionaryType": "System.Collections.Generic.Dictionary",
"wrapResponses": false,
"wrapResponseMethods": [],
"generateResponseClasses": true,
"responseClass": "SwaggerResponse",
"namespace": "Contracts.Models",
"requiredPropertiesMustBeDefined": true,
"dateType": "System.DateTime",
"jsonConverters": null,
"dateTimeType": "System.DateTime",
"timeType": "System.TimeSpan",
"timeSpanType": "System.TimeSpan",
"arrayType": "System.Collections.Generic.IEnumerable",
"arrayInstanceType": null,
"dictionaryType": "System.Collections.Generic.Dictionary",
"dictionaryInstanceType": null,
"arrayBaseType": "System.Collections.Generic.List",
"dictionaryBaseType": "System.Collections.Generic.Dictionary",
"classStyle": "Poco",
"generateDefaultValues": true,
"generateDataAnnotations": true,
"excludedTypeNames": [],
"handleReferences": false,
"generateImmutableArrayProperties": false,
"generateImmutableDictionaryProperties": false,
"jsonSerializerSettingsTransformationMethod": null,
"templateDirectory": null,
"typeNameGeneratorType": null,
"propertyNameGeneratorType": null,
"enumNameGeneratorType": null,
"serviceHost": null,
"serviceSchemes": null,
"output": "../UsersModels.cs"
}
}

Most helpful comment

I just got this issue : Reinstalling NSwagStudio worked for me.

All 7 comments

I just got this issue : Reinstalling NSwagStudio worked for me.

I confirm that clean install fixes the issue

Yes? Just wanted to publish a fix :-) crappy WIX installer...

I have got this error today after NSwagStudio update either. After clean install the error gone

Also had this issue, resolved by uninstalling and reinstalling without update.

Uninstalling and reinstalling nswagstudio worked for me.

I get this issue on OSX, anyone help, I installed npm install -g nswag

Was this page helpful?
0 / 5 - 0 ratings