我在我的 jekyll 站点中嵌入了一个 blazor 应用程序。它在本地完美运行,但是当我在 github 页面上发布它时,出现此错误:
Failed to find a valid digest in the 'integrity' attribute for resource 'https://chrisevans9629.github.io/blazor/xt/_framework/wasm/dotnet.3.2.0-rc1.20222.2.js' with computed SHA-256 integrity 'yVt8FYsTQDifOGsifIkmEXwe+7ML0jZ1dMi2xluiDXQ='. The resource has been blocked.
Run Code Online (Sandbox Code Playgroud)
这是我认为 blazor 在页面运行时生成的东西。这是我的页面开始 blazor 的样子:
Failed to find a valid digest in the 'integrity' attribute for resource 'https://chrisevans9629.github.io/blazor/xt/_framework/wasm/dotnet.3.2.0-rc1.20222.2.js' with computed SHA-256 integrity 'yVt8FYsTQDifOGsifIkmEXwe+7ML0jZ1dMi2xluiDXQ='. The resource has been blocked.
Run Code Online (Sandbox Code Playgroud)
这是 github 页面上的页面:
<script src="js/index.js"></script>
<app>Loading...</app>
Built with <3 using Blazor
<script src="_framework/blazor.webassembly.js"></script>
Run Code Online (Sandbox Code Playgroud)
为什么会发生此错误,我该如何解决?我想过创建一个删除完整性属性的脚本,但我认为这不是一个好的解决方案。
我有一个用于构建我的 asp.net core 2.2 项目的 azure 管道。我升级了项目使用 c# 8.0。但是,我的 azure 管道似乎不支持 c# 8.0。如何升级我的 azure 管道以使用 c# 8.0?
我查看了 azure 管道中的选项,但没有发现任何关于升级到 c# 8.0 的内容
这是生成的 YAML 文件
pool:
name: Hosted VS2017
demands:
- msbuild
- visualstudio
steps:
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.4.1'
inputs:
versionSpec: 4.4.1
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: '$(Parameters.solution)'
vstsFeed: '3e219c03-bc0d-4106-82be-9ff3b21190a5'
- task: VSBuild@1
displayName: 'Build solution'
inputs:
solution: '$(Parameters.solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactstagingdirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
- …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 msix 作为部署方法将 .net core 3.1 wpf 应用程序安装到 Windows 2019 服务器上。Windows 服务器是最新的并且应该支持 msix,但不会安装我使用 powershell 命令 Add-AppPackage 创建的任何 msix 包。如果您单击 .appinstaller 文件并使用 gui,这些软件包将安装在 Windows 10 计算机上,但如果您使用 powershell,它们将不会安装在同一台计算机上。
这是我尝试安装的示例:
运行 .appinstaller 文件将正确安装此 uwp 应用程序。但是,这是行不通的:
Add-AppPackage .\TestUwp.appinstaller
Run Code Online (Sandbox Code Playgroud)
这是 powershell 脚本输出的错误消息:
Add-AppPackage : Deployment failed with HRESULT: 0x80073CF0, Package could not be opened.
error 0x8007000D: Opening the package from location TestUwp.appinstaller failed.
NOTE: For additional information, look for [ActivityId] 742e8080-11e2-0000-5f0b-3374e211d601 in the …Run Code Online (Sandbox Code Playgroud) 我有一个简单的 C# 神经网络方法:
private void InitNeurons()
{
//Neuron Initilization
List<float[]> neuronsList = new List<float[]>();
for (int i = 0; i < _layers.Length; i++) //run through all layers
{
neuronsList.Add(new float[_layers[i]]); //add layer to neuron list
}
_neurons = neuronsList.ToArray(); //convert list to array
}
Run Code Online (Sandbox Code Playgroud)
我如何在 F# 中做到这一点?我在想它可以更简单。也许像这样?
namespace NeuralNetwork
type NeuralNetworkF(layers : int[]) =
member this.Layers = layers
member this.Neurons : float[][] = [| for layer in layers do new float[]|]
Run Code Online (Sandbox Code Playgroud)
这会导致 F# 中的编译器错误。我想获取 int 数组“_layers”的大小,并对每个值进行迭代并将该值添加到 F# 中的 Neurons 成员中。
c# ×2
.net-core ×1
arrays ×1
asp.net-core ×1
azure ×1
azure-devops ×1
blazor ×1
deployment ×1
f# ×1
github-pages ×1
html ×1
javascript ×1
jekyll ×1
msix ×1
powershell ×1
wpf ×1