System.Private.CoreLib的WASM WebAssembly FileNotFoundException

时间:2019-07-01 11:10:43

标签: .net-core .net-standard uno-platform

我正在尝试使用https://platform.uno/来构建一些工具。由于与某些基本Microsoft库有关的FileNotFoundExceptions,无法从uno平台模板启动WASM(WebAssembly)-Project。 我从uno模板创建了一个新的uno平台APP。我已经将所有NuGet软件包更新为最新版本。当我启动wasm Web项目时,出现以下异常(我猜是在引导程序中):

FileNotFoundException

后跟: FileNotFoundException

后跟: WTF

在这里您可以看到Exception类来自图片1中找不到的命名空间。这对我来说很奇怪,我不知道发生了什么。 我猜这是先决条件或依赖项版本错误的问题。有人知道怎么回事吗?

这是WASM项目的csproj:

<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netstandard2.0</TargetFramework>
    <WasmHead>true</WasmHead>
    <DefineConstants>$(DefineConstants);__WASM__</DefineConstants>
    <NoWarn>NU1701</NoWarn>
    <StartupObject>Macs3.Calculations.TestTool.Wasm.Program</StartupObject>
	<MonoRuntimeDebuggerEnabled>true</MonoRuntimeDebuggerEnabled> 
  </PropertyGroup>
  <ItemGroup>
    <Content Include="..\Macs3.Calculations.TestTool.UWP\Assets\*.png" Link="Assets\%(FileName)%(Extension)" />
    <Content Include="Fonts\winjs-symbols.woff2" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="WasmCSS\Fonts.css" />
    <EmbeddedResource Include="WasmScripts\AppManifest.js" />
  </ItemGroup>
  <ItemGroup>
    <LinkerDescriptor Include="LinkerConfig.xml" />
  </ItemGroup>
  <ItemGroup>
    <!-- 
    This item group is required by the project templace because of the
    new SDK-Style project, otherwise some files are not aded automatically.
    
    You can safely remove this ItemGroup completely.
    -->
    <Compile Remove="Program.cs" />
    <Compile Include="Program.cs" />
    <Content Include="LinkerConfig.xml" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Uno.UI" Version="1.46.0-dev.2039" />
    <PackageReference Include="Uno.Wasm.Bootstrap" Version="1.0.0-dev.298" />
  </ItemGroup>
  <Import Project="..\Macs3.Calculations.TestTool.Shared\Macs3.Calculations.TestTool.Shared.projitems" Label="Shared" Condition="Exists('..\Macs3.Calculations.TestTool.Shared\Macs3.Calculations.TestTool.Shared.projitems')" />
</Project>

0 个答案:

没有答案