Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce a SDK workload for Blazor WebAssembly AOT #29499

Closed
pranavkm opened this issue Jan 21, 2021 · 2 comments
Closed

Produce a SDK workload for Blazor WebAssembly AOT #29499

pranavkm opened this issue Jan 21, 2021 · 2 comments
Assignees
Labels
affected-medium This issue impacts approximately half of our customers area-blazor Includes: Blazor, Razor Components Done This issue has been fixed enhancement This issue represents an ask for new feature or an enhancement to an existing one severity-blocking This label is used by an internal tool
Milestone

Comments

@pranavkm
Copy link
Contributor

pranavkm commented Jan 21, 2021

Some useful notes to get started:

Design docs

.NET Optional SDK Workloads
Workload Resolvers
Workload Manifests

The workload resolvers design doc has technical details about how workloads will work, as well as guidance for how to create a workload.

Enabling workload resolver

The workload resolver is currently behind a feature flag, and won’t be enabled by default. This is because it came in very late in the release cycle and doesn’t yet do the caching that it needs to do, so we wanted to avoid impacting developers who aren’t using workloads. This issue tracks the remaining work.

To enable the workload resolver, you can either set the MSBuildEnableWorkloadResolver environment variable to true, or create a file named EnableWorkloadResolver.sentinel next to the workload resolver DLL. The DLL used will be different for full Framework MSBuild (which is used in Visual Studio and “msbuild” on the command line) and .NET Core MSBuild (which is used by the dotnet CLI). So you will need to create the file in two places if you want to enable the workload resolver that way. The DLL paths will be similar to the following (with highlighted parts likely to change):

• C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\SdkResolvers\Microsoft.DotNet.MSBuildSdkResolver\Microsoft.DotNet.MSBuildSdkResolver.dll
• C:\Program Files\dotnet\sdk\5.0.100\Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.dll

Additionally (whether you enable the workload resolver via the environment variable or a sentinel file), you will need to copy Newtonsoft.Json.dll version 11.0 to the folder with the full framework MSBuild SDK resolver. You should be able to download the package here and extract the DLL from the lib\net45 folder. We plan to fix this for the GA release of VS 16.8.

Creating a workload

There is a very simple workload in the dotnet/sdk repo that is used for testing the workload features: https://github.com/dotnet/sdk/blob/release/5.0.1xx/src/Assets/TestWorkloads/manifests/Microsoft.NET.Sdk.TestWorkload/WorkloadManifest.json. You can refer to / modify that workload, and refer to the Workload Resolvers design doc for overall guidance.

@pranavkm pranavkm added the area-blazor Includes: Blazor, Razor Components label Jan 21, 2021
@pranavkm pranavkm added this to the Next sprint planning milestone Jan 21, 2021
@ghost
Copy link

ghost commented Jan 21, 2021

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@mkArtakMSFT mkArtakMSFT added the enhancement This issue represents an ask for new feature or an enhancement to an existing one label Jan 25, 2021
@SteveSandersonMS SteveSandersonMS added affected-medium This issue impacts approximately half of our customers severity-blocking This label is used by an internal tool labels Jan 26, 2021 — with ASP.NET Core Issue Ranking
@pranavkm pranavkm self-assigned this Jan 26, 2021
@pranavkm
Copy link
Contributor Author

Marking this as done. We have something functional, and we can iterate on it as necessary.

@ghost ghost added Done This issue has been fixed and removed Working labels Feb 23, 2021
@pranavkm pranavkm modified the milestones: 6.0-preview3, 6.0-preview2 Feb 23, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Mar 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affected-medium This issue impacts approximately half of our customers area-blazor Includes: Blazor, Razor Components Done This issue has been fixed enhancement This issue represents an ask for new feature or an enhancement to an existing one severity-blocking This label is used by an internal tool
Projects
None yet
Development

No branches or pull requests

3 participants