Brand new WebAssembly project and the previewer #11990
-
When creating a new project that supports running in the browser, all projects build and run fine, but the design previewer of axaml files throws an error. What should I do? I tried to find an answer by myself but didn't find anything.
This is the content of runtimeconfig.template.json {
"wasmHostProperties": {
"perHostConfig": [
{
"name": "browser",
"html-path": "index.html",
"Host": "browser"
}
]
}
} And this is the csproj: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<WasmMainJSPath>AppBundle\main.js</WasmMainJSPath>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<WasmExtraFilesToDeploy Include="AppBundle\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Browser" Version="11.0.0-rc2.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Newbie\Newbie.csproj" />
</ItemGroup>
</Project> I've installed the required workloads. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Previewer needs a desktop project to work. Select one in the project selector at the top-right. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much!! |
Beta Was this translation helpful? Give feedback.
Previewer needs a desktop project to work. Select one in the project selector at the top-right.