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

Omnisharp Razor DLL fix #2178

Merged
merged 1 commit into from
Jun 14, 2021
Merged

Conversation

crummel
Copy link
Contributor

@crummel crummel commented May 24, 2021

Fixes #2006.

Build and ship a net46 version of MS.NET.SDK.Razor to support Omnisharp (and therefore VSCode Intellisense). Some complications:

  • Omnisharp explicitly depends on net46, not just any full-framework TFM.
    • When built as net461 or net472: [fail]: OmniSharp.MSBuild.ProjectLoader The "Microsoft.AspNetCore.Razor.Tasks.DiscoverDefaultScopedCssItems" task could not be loaded from the assembly sdk/5.0.203/Sdks/Microsoft.NET.Sdk.Razor/build/netstandard2.0/../../tasks/net46/Microsoft.NET.Sdk.Razor.Tasks.dll. Invalid Image Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
  • MS.NET.SDK.Razor depends on runtime and MSBuild packages built earlier in source-build. Source-build previously produced these with just .NET Core TFMs, so this PR has to add some full-framework TFMs back in these repos, at least for some packages.
  • runtime's BuildAllConfigurations still has errors in source-build. (XXX log issue XXX): /home/chris/dotnet_source-build/artifacts/src/runtime.478b2f8c0e480665f6c52c95cd57830784dc9560/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs(1383,140): error CS0433: The type 'PermissionSet' exists in both 'System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' [/home/chris/dotnet_source-build/artifacts/src/runtime.478b2f8c0e480665f6c52c95cd57830784dc9560/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.csproj] /home/chris/dotnet_source-build/artifacts/src/runtime.478b2f8c0e480665f6c52c95cd57830784dc9560/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs(1471,125): error CS0433: The type 'PermissionSet' exists in both 'System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' [/home/chris/dotnet_source-build/artifacts/src/runtime.478b2f8c0e480665f6c52c95cd57830784dc9560/src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.csproj] /home/chris/dotnet_source-build/artifacts/src/runtime.478b2f8c0e480665f6c52c95cd57830784dc9560/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.cs(39,43): error CS0433: The type 'EventLog' exists in both 'System.Diagnostics.EventLog, Version=5.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' [/home/chris/dotnet_source-build/artifacts/src/runtime.478b2f8c0e480665f6c52c95cd57830784dc9560/src/libraries/System.ServiceProcess.ServiceController/ref/System.ServiceProcess.ServiceController.csproj]

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@crummel crummel force-pushed the razorOmnisharpDll branch 3 times, most recently from d425bb3 to 06dc859 Compare June 9, 2021 21:31
@crummel crummel force-pushed the razorOmnisharpDll branch from 06dc859 to ac426a8 Compare June 10, 2021 04:31
…ode.

This also requires building some runtime and MSBuild packages as net46.  Unfortunately we can't rely on the targeting packs for these because source-build does produce the packages but without the net46 runtime currently.
@crummel crummel force-pushed the razorOmnisharpDll branch from ac426a8 to 7e7abb0 Compare June 10, 2021 05:37
@crummel crummel changed the title [WIP] Omnisharp Razor DLL fix Omnisharp Razor DLL fix Jun 10, 2021
@crummel crummel marked this pull request as ready for review June 10, 2021 07:40
@crummel
Copy link
Contributor Author

crummel commented Jun 10, 2021

cc @michaelbarkdoll and @tvildo if you'd like to try out this fix.

Copy link
Member

@MichaelSimons MichaelSimons left a comment

Choose a reason for hiding this comment

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

Does this need to get ported to 6.0 as well? If so will you handle this?

@crummel
Copy link
Contributor Author

crummel commented Jun 14, 2021

Yes, logged #2232 to track that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants