小编Pav*_*van的帖子

VS 2019 中的 CreatePkgDef 异常

我正在尝试在 VS 2019 中为我的 Roslyn 分析器创建一个 Visual Studio 扩展。当我将该选项设置Generate .pkgdef File为 true 时,我收到以下异常:

CreatePkgDef : error : ArgumentException: No Visual Studio registration attribute found in this assembly.
The assembly should contain an instance of the attribute 'Microsoft.VisualStudio.Shell.RegistrationAttribute' defined in assembly 'Microsoft.VisualStudio.Shell.Framework' version '16.0.0.0' 
   at Microsoft.VisualStudio.Tools.CreatePkgDef.ProcessAssembly(String fileName, Hive hive, PkgDefContext context, Boolean register, RegistrationMode mode)
   at Microsoft.VisualStudio.Tools.CreatePkgDef.DoCreatePkgDef(InputArguments inputArguments)
   at Microsoft.VisualStudio.Tools.CreatePkgDef.Main(String[] arguments)
Run Code Online (Sandbox Code Playgroud)

c# vsix

5
推荐指数
1
解决办法
1627
查看次数

不记名令牌未包含在 SwaggerUI 中

我正在使用AspNet Boilerplate框架。我正在尝试通过AzureAD在我的应用程序中实现身份验证。我正在使用ASP.NET core 3.0并通过 swagger 测试我的应用程序。我看到令牌未包含在标头中。

Startup.cs 的 ConfigureServices() 方法

                {
                    Type = SecuritySchemeType.OAuth2,
                    Flows = new OpenApiOAuthFlows()
                    {
                        Implicit = new OpenApiOAuthFlow()
                        {
                            TokenUrl = new Uri(My Token Url),
                            AuthorizationUrl = new Uri(My Authorization Url),
                            Scopes = { { "api://357...../user_impersonation", "Access adt-service" } }
                        }
                    }
                });

Run Code Online (Sandbox Code Playgroud)

Startup.cs 的 Configure() 方法:

            {                
                options.OAuthClientId("22............");
                options.OAuthScopeSeparator(" ");
                
            });
Run Code Online (Sandbox Code Playgroud)

如果我遗漏了什么,请告诉我。

swagger-ui asp.net-core aspnetboilerplate

0
推荐指数
1
解决办法
106
查看次数

标签 统计

asp.net-core ×1

aspnetboilerplate ×1

c# ×1

swagger-ui ×1

vsix ×1