Skip to content

[release/6.0.1xx-rc2] BlazorWasm: Fix including the target assembly#21104

Merged
lewing merged 1 commit into
dotnet:release/6.0.1xx-rc2from
radical:wasm-fix-native-ref
Sep 20, 2021
Merged

[release/6.0.1xx-rc2] BlazorWasm: Fix including the target assembly#21104
lewing merged 1 commit into
dotnet:release/6.0.1xx-rc2from
radical:wasm-fix-native-ref

Conversation

@radical

@radical radical commented Sep 17, 2021

Copy link
Copy Markdown
Member

Use $(IntermediateAssembly) when gathering files for wasm build.

Fixes dotnet/runtime#59255 .

@ghost ghost added the Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, StaticWebAssetsSDK label Sep 17, 2021
radical added a commit to radical/runtime that referenced this pull request Sep 17, 2021
.. and update BlazorOverwrite.targets to include the fix from
dotnet/sdk#21104 .

@SteveSandersonMS SteveSandersonMS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense based on what I saw before. Will this make it able to pick up DllImport from ProjectReferences too (if it didn’t already)?

@radical

radical commented Sep 17, 2021

Copy link
Copy Markdown
Member Author

Will this make it able to pick up DllImport from ProjectReferences too (if it didn’t already)?

Can you elaborate on this?

@lewing lewing changed the title BlazorWasm: Fix including the target assembly [release/6.0.1xx-rc]BlazorWasm: Fix including the target assembly Sep 17, 2021
@lewing lewing changed the title [release/6.0.1xx-rc]BlazorWasm: Fix including the target assembly [release/6.0.1xx-rc2]BlazorWasm: Fix including the target assembly Sep 17, 2021
@SteveSandersonMS

Copy link
Copy Markdown
Member

I just wanted to check that the issue that prevented it seeing your main assembly didn’t also prevent it from seeing the assemblies of other projects in your solution.

We know the feature works for PackageReference dependencies, but does it work for ProjectReference dependencies? Has that been tried out?

Hope that makes sense!

@lewing lewing changed the title [release/6.0.1xx-rc2]BlazorWasm: Fix including the target assembly [release/6.0.1xx-rc2] BlazorWasm: Fix including the target assembly Sep 17, 2021
@radical

radical commented Sep 17, 2021

Copy link
Copy Markdown
Member Author

I just wanted to check that the issue that prevented it seeing your main assembly didn’t also prevent it from seeing the assemblies of other projects in your solution.

Yes, dllimports in referenced projects would get scanned for pinvokes during the native build. Currently, the native library won't get automatically included in the app project though. IOW, you would need an explicit <NativeFileReference Include="/path/to/native/lib" /> in the app project.
But we are trying to figure out how the experience could be different.

@SteveSandersonMS

SteveSandersonMS commented Sep 20, 2021

Copy link
Copy Markdown
Member

IOW, you would need an explicit <NativeFileReference Include="/path/to/native/lib" /> in the app project.

Package authors could already fix that themselves by including some MSBuild in their package that adds a <NativeFileReference> itemgroup entry to any project that consumes the package. Maybe we could make that easier for them one day, but for 6.0, I think we already have the necessary capabilities.

@lewing

lewing commented Sep 20, 2021

Copy link
Copy Markdown
Member

@marcpopMSFT what is the process to get this in rc2 now?

@lewing
lewing merged commit dd19efb into dotnet:release/6.0.1xx-rc2 Sep 20, 2021
@radical
radical deleted the wasm-fix-native-ref branch September 20, 2021 18:14
radical added a commit to radical/sdk that referenced this pull request Sep 21, 2021
radical added a commit that referenced this pull request Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, StaticWebAssetsSDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants