Skip to content

Commit b629d29

Browse files
authored
Update workaround for evaluate expressions in a wasm hosted apps
dotnet/runtime#75495
1 parent 9669ebe commit b629d29

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

release-notes/7.0/known-issues.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,50 @@ You may encounter the following known issues, which may include workarounds, mit
44

55
## .NET Runtime
66

7+
### Unable to evaluate expressions in a Blazor WebAssembly App
8+
9+
It isn't possible to debug a Blazor WebAssembly app using .NET 7 RC1 https://github.com/dotnet/runtime/pull/75495
10+
11+
#### Workaround for a Blazor WebAssembly Hosted App:
12+
13+
Copy the following into the server project (`.csproj`) of a `.NET 7 Preview RC1` Blazor WebAssembly Hosted App:
14+
15+
```xml
16+
<ItemGroup>
17+
<PackageReference Include="Microsoft.CodeAnalysis.Scripting.Common" Version="3.7.0" ExcludeAssets="all" GeneratePathProperty="true"/>
18+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="3.7.0" ExcludeAssets="all" GeneratePathProperty="true"/>
19+
</ItemGroup>
20+
<Target Name="_CopyCodeAnalysisDeps" AfterTargets="Build">
21+
<Copy SourceFiles="$(PkgMicrosoft_CodeAnalysis_Scripting_Common)\lib\netstandard2.0\Microsoft.CodeAnalysis.Scripting.dll"
22+
DestinationFolder="$(OutputPath)\BlazorDebugProxy"
23+
SkipUnchangedFiles="true"/>
24+
<Copy SourceFiles="$(PkgMicrosoft_CodeAnalysis_CSharp_Scripting)\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.Scripting.dll"
25+
DestinationFolder="$(OutputPath)\BlazorDebugProxy"
26+
SkipUnchangedFiles="true"/>
27+
</Target>
28+
```
29+
30+
#### Workaround for a Blazor WebAssembly Standalone App:
31+
32+
Copy the following into a `.NET 7 Preview RC1` Blazor WebAssembly project (`.csproj`):
33+
34+
```xml
35+
<ItemGroup>
36+
<PackageReference Include="Microsoft.CodeAnalysis.Scripting.Common" Version="3.7.0" ExcludeAssets="all" GeneratePathProperty="true"/>
37+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="3.7.0" ExcludeAssets="all" GeneratePathProperty="true"/>
38+
</ItemGroup>
39+
<Target Name="_CopyCodeAnalysisDeps" AfterTargets="Build">
40+
<Copy SourceFiles="$(PkgMicrosoft_CodeAnalysis_Scripting_Common)\lib\netstandard2.0\Microsoft.CodeAnalysis.Scripting.dll"
41+
DestinationFolder="$(PkgMicrosoft_AspNetCore_Components_WebAssembly_DevServer)\tools\BlazorDebugProxy"
42+
SkipUnchangedFiles="true"/>
43+
<Copy SourceFiles="$(PkgMicrosoft_CodeAnalysis_CSharp_Scripting)\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.Scripting.dll"
44+
DestinationFolder="$(PkgMicrosoft_AspNetCore_Components_WebAssembly_DevServer)\tools\BlazorDebugProxy"
45+
SkipUnchangedFiles="true"/>
46+
</Target>
47+
```
48+
49+
That will copy the missing dependency into the DevServer package and enable evaluation of expression on Wasm debugging in .NET 7.0 Preview RC1 after a single build. This workaround only needs to be run once per package root to repair the DevServer package but should be harmless to leave in.
50+
751
### Unable to debug a Blazor WebAssembly App
852

953
It isn't possible to debug a Blazor WebAssembly app using .NET 7 Preview 5 https://github.com/dotnet/runtime/pull/70383

0 commit comments

Comments
 (0)