Stream: C#/.net-collaboration

Topic: implicit project file imports


view this post on Zulip Joel Dice (Jul 31 2024 at 19:19):

Can someone explain (or point to documentation regarding) how project files are implicitly imported per https://github.com/bytecodealliance/componentize-dotnet/blob/22eeed4233ec311f1f3e8f76d0ba0eb191b6ebb1/samples/calculator/Adder/Adder.csproj#L3-L4 ?

Tooling for creating WebAssembly components from C# - bytecodealliance/componentize-dotnet

view this post on Zulip Joel Dice (Jul 31 2024 at 19:29):

Maybe related to these lines? https://github.com/bytecodealliance/componentize-dotnet/blob/22eeed4233ec311f1f3e8f76d0ba0eb191b6ebb1/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj#L39-L41

Tooling for creating WebAssembly components from C# - bytecodealliance/componentize-dotnet

view this post on Zulip James Sturtevant (Aug 05 2024 at 16:17):

https://github.com/bytecodealliance/componentize-dotnet/blob/22eeed4233ec311f1f3e8f76d0ba0eb191b6ebb1/src/WasmComponent.Sdk/WasmComponent.Sdk.csproj#L39-L41

These lines tell msbuild to include the readme in the final package when it is put together.

view this post on Zulip James Sturtevant (Aug 05 2024 at 16:21):

Joel Dice said:

https://github.com/bytecodealliance/componentize-dotnet/blob/22eeed4233ec311f1f3e8f76d0ba0eb191b6ebb1/samples/calculator/Adder/Adder.csproj#L3-L4 ?

These lines are there to bring in the "build" props and targets, which don't get automicatlly added when referencing as a subproject. When you reference the package as a nuget package those files get included into the build process automatically but since Adder is referencing the component sdk as a "project" (https://github.com/bytecodealliance/componentize-dotnet/blob/22eeed4233ec311f1f3e8f76d0ba0eb191b6ebb1/samples/calculator/Adder/Adder.csproj#L17) it doesn't include those files

Tooling for creating WebAssembly components from C# - bytecodealliance/componentize-dotnet

view this post on Zulip James Sturtevant (Aug 05 2024 at 16:23):

i think these are the docs you are looking for https://learn.microsoft.com/en-us/dotnet/core/project-sdk/overview#project-files

Learn about the .NET project SDKs.

view this post on Zulip James Sturtevant (Aug 05 2024 at 16:25):

fyi - I added some links I found helpful when learning this stuff in https://github.com/bytecodealliance/componentize-dotnet/blob/22eeed4233ec311f1f3e8f76d0ba0eb191b6ebb1/CONTRIBUTING.md#debugging

Tooling for creating WebAssembly components from C# - bytecodealliance/componentize-dotnet

Last updated: Dec 13 2025 at 20:04 UTC