小编Dyl*_*eti的帖子

Azure 对 .NET 4.8 的支持

有没有人了解 Azure 应用服务 .NET 4.8 支持。我们目前有一个已开始迁移到 .NET Core 的存储库,但由于我们的依赖关系,我们不得不以 .NET 4.8 为目标。不幸的是,Azure 似乎尚不支持此框架版本。

有没有人对是否/何时可能支持的时间表有任何想法?或者可能的解决方法,因为我们无法在这些服务上安装第三方软件。

.net azure azure-web-app-service

14
推荐指数
2
解决办法
5526
查看次数

源代码管理中的 Visual Studio 代码片段

我想将 vscode typescript React 片段文件检查到源代码中,以便将它们分发给开发人员。

目前,我正在 - [user]/AppData/Romaing/Code/Snippets/typescriptreact.json- 下编辑一个全局片段文件,所以这对我本地来说非常有用。如果我可以将其签入我的应用程序代码中,那就更好了。

任何建议表示赞赏 -

干杯

typescript reactjs visual-studio-code

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

Gatsby React-Helmet不是服务器端渲染

我正在尝试在服务器端加载我的react-helmet标签,以便在构建时将它们注入到静态html文件中。这样一来,Facebook之类的东西就可以直接获取源文件并使用适当的元标记。

使用此配置应用程序之后,我在服务器端看到的所有静态渲染输出是:

<title data-react-helmet="true"></title>

设定:

gatsby-config.js

module.exports = {
  plugins: ['gatsby-plugin-react-helmet']
}
Run Code Online (Sandbox Code Playgroud)

app.tsx

import Helmet from 'react-helmet';

const Head: React.FunctionComponent<Props> = () => (
  <Helmet title="the title is big" >
    <meta name="description" content="the content" />
  </Helmet >
);

...
Run Code Online (Sandbox Code Playgroud)

gatsby-ssr.js

const {Helmet} = require('react-helmet');

exports.onRenderBody = () => {
  console.log(Helmet.renderStatic())
}

**Output**
<title data-react-helmet="true"></title>
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

reactjs server-side-rendering gatsby react-helmet

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

ASP.NET Core 发布和启动设置

我有一个 ASP.NET Core (v2.0),我希望launchSettings.json在不同的环境中保留我的属性。

我遇到的问题是,每当我使用 发布我的项目时dotnet publish,包含已发布输出的 artifacts 文件夹不包含launchSettings.json文件。这会编译成别的东西吗?

c# .net-core

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

如何针对 .Net Framework 和 Autofac 注册服务集合?

我正在尝试将此Microsoft.FeatureManagement服务包添加到我的 .NET Framework 4.7 Web API 中。该应用程序配置为使用 OWIN 管道和 Autofac DI。所有服务均针对 Autofac IContainerBuilder 进行注册。

功能管理服务注册进行了扩展IServiceCollection,虽然它是一个 .NET Standard 2.0 库,但看起来它是设计用于针对 .NET Core DI 服务注册的。例如,设置期望注册如下所示:

public void Configuration(IServiceCollection services) {
  services.AddFeatureManagement();
}
Run Code Online (Sandbox Code Playgroud)

有没有办法可以在我当前的 Autofac + 框架中注册它?

在 .NET Framework 4.7 上运行并使用 Autofac 4.9.2,这是我当前的配置:

自定义模块.cs

public class CustomModule: Module {
  protected override void Load(ContainerBuilder builder) {
    builder.RegisterType<ExampleType>().As<IExampleType>();
  }
}
Run Code Online (Sandbox Code Playgroud)

启动.cs

public void Configuration(IAppBuilder app) {
  var configuration = new HttpConfiguration();
  var containerBuilder = new ContainerBuilder();
  containerBuilder.RegisterModule(new CustomModule());
  containerBuilder.RegisterWebApiFilterProvider(configuration);
  var …
Run Code Online (Sandbox Code Playgroud)

.net autofac owin

3
推荐指数
1
解决办法
4730
查看次数