We recently upgraded to 10.4 and we noticed a new line of code in the startup.cs. Specifically we are getting an error with this line options.CustomDefaultSchemaIdSelector()
when we try to build the project with this line the project failed to build telling us its missing a reference. When we comment out the code the project builds successfully.
Cna we delete this line of code? if not what is the reference?
5 Answer(s)
-
0
Hi @npecadmin Can you please share the error you get?
-
0
Severity Code Description Project File Line Suppression State Error CS1061 'SwaggerGenOptions' does not contain a definition for 'CustomDefaultSchemaIdSelector' and no accessible extension method 'CustomDefaultSchemaIdSelector' accepting a first argument of type 'SwaggerGenOptions' could be found (are you missing a using directive or an assembly reference?) Glyde.Web.Host C:\Users\HP\Desktop\Glyde\aspnet-core\src\Glyde.Web.Host\Startup\Startup.cs 333 Active
-
0
Hi @npecadmin
This is an extension method definbed in SwaggerExtensions.cs under Web.Core project, could you include it to your project and try again ?
You can find its source code here; https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Core/Swagger/SwaggerExtensions.cs
Thanks,
-
0
the link is not exist give me a 404
-
0
You are not able to see it because it is in private repository. Check that https://support.aspnetzero.com/QA/Questions/9580/How-to-access-the-ASPNET-Zero-private-GitHub-repository