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

Arch Linux: 'Microsoft.NET.Sdk.Razor' not found #2861

Closed
jchand99 opened this issue Feb 19, 2019 · 5 comments
Closed

Arch Linux: 'Microsoft.NET.Sdk.Razor' not found #2861

jchand99 opened this issue Feb 19, 2019 · 5 comments
Labels
.Net sdk not found These are a group of issues when the dotnet sdk could not be found

Comments

@jchand99
Copy link

jchand99 commented Feb 19, 2019

Issue Description

Omnisharp.MSBuild.ProjectManager Failed to load project file

Steps to Reproduce

Create new webapp with razor pages:

dotnet new webapp -n "Test"

Open project with VSCode.

Expected Behavior

Load project without failure

Actual Behavior

Omnisharp fails to load the project.

I have omnisharp.loggingLevel set to debug and omnisharp.path set to latest

Logs

OmniSharp log

Starting OmniSharp server at 2/18/2019, 10:36:24 PM
    Target: /home/dotnull/Programming/School/MusicMadness/MusicMadness.sln

OmniSharp server started with Mono 5.18.0.
    Path: /home/dotnull/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.11-beta.10/omnisharp/OmniSharp.exe
    PID: 16627

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on arch 0.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Mono 15.0 - "/usr/lib/mono/msbuild/15.0/bin"
            2: StandAlone 15.0 - "/home/dotnull/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.11-beta.10/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Mono 15.0 - "/usr/lib/mono/msbuild/15.0/bin"
            CscToolPath = /home/dotnull/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.11-beta.10/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/home/dotnull/Programming/School/MusicMadness'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.WorkspaceInitializer
        Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in '/home/dotnull/Programming/School/MusicMadness/MusicMadness.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/home/dotnull/Programming/School/MusicMadness/App/App.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/home/dotnull/Programming/School/MusicMadness'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/home/dotnull/Programming/School/MusicMadness' on host 16472.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /home/dotnull/Programming/School/MusicMadness/App/App.csproj
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/home/dotnull/Programming/School/MusicMadness/App/App.csproj'.
/home/dotnull/Programming/School/MusicMadness/App/App.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.Sdk.Razor' specified could not be found.  /usr/lib/mono/msbuild/15.0/bin/Sdks/Microsoft.NET.Sdk.Web/Sdk/Sdk.props
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00040] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Shared.ProjectErrorUtilities.VerifyThrowInvalidProject[T1] (System.Boolean condition, System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00003] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1] (Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, T1 arg0) [0x00000] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].ExpandAndLoadImportsFromUnescapedImportExpressionConditioned (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement, System.Collections.Generic.List`1[Microsoft.Build.Construction.ProjectRootElement]& projects, Microsoft.Build.BackEnd.SdkResolution.SdkResult& sdkResult, System.Boolean throwOnFileNotExistsError) [0x0024e] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].ExpandAndLoadImports (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement, Microsoft.Build.BackEnd.SdkResolution.SdkResult& sdkResult) [0x00027] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x00209] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x00040] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].Evaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingService, Microsoft.Build.Framework.BuildEventContext buildEventContext) [0x00103] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].Evaluate (Microsoft.Build.Evaluation.IEvaluatorData`4[P,I,M,D] data, Microsoft.Build.Construction.ProjectRootElement root, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, System.Int32 maxNodeCount, Microsoft.Build.Collections.PropertyDictionary`1[T] environmentProperties, Microsoft.Build.BackEnd.Logging.ILoggingService loggingService, Microsoft.Build.Evaluation.IItemFactory`2[S,T] itemFactory, Microsoft.Build.Evaluation.IToolsetProvider toolsetProvider, Microsoft.Build.Evaluation.ProjectRootElementCache projectRootElementCache, Microsoft.Build.Framework.BuildEventContext buildEventContext, Microsoft.Build.Execution.ProjectInstance projectInstanceIfAnyForDebuggerOnly, Microsoft.Build.BackEnd.SdkResolution.ISdkResolverService sdkResolverService, System.Int32 submissionId, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x0001a] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Project.Reevaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x0004c] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00034] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation) [0x00000] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00023] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Project.Initialize (System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, System.String subToolsetVersion, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x00126] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, System.String subToolsetVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, Microsoft.Build.Evaluation.Context.EvaluationContext evaluationContext) [0x0009e] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, System.String subToolsetVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00000] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00000] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection) [0x00000] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion) [0x000f7] in <12215e3b02f24e078481ed2a7645c866>:0 
  at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] in <12215e3b02f24e078481ed2a7645c866>:0 
  at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath) [0x0003f] in <77778851c95747b99b0a555c24793c29>:0 
  at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <77778851c95747b99b0a555c24793c29>:0 
  at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectLoader loader) [0x00015] in <77778851c95747b99b0a555c24793c29>:0 
  at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass28_0.<LoadProject>b__0 () [0x00000] in <77778851c95747b99b0a555c24793c29>:0 
  at (wrapper delegate-invoke) System.Func`1[System.ValueTuple`3[OmniSharp.MSBuild.ProjectFile.ProjectFileInfo,System.Collections.Immutable.ImmutableArray`1[OmniSharp.MSBuild.Logging.MSBuildDiagnostic],OmniSharp.MSBuild.Notification.ProjectLoadedEventArgs]].invoke_TResult()
  at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject (System.String projectFilePath, System.Func`1[TResult] loader) [0x0001b] in <77778851c95747b99b0a555c24793c29>:0 

[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: /home/dotnull/Programming/School/MusicMadness/App/App.csproj

Environment information

VSCode version: 1.31.1
C# Extension: 1.17.1

Mono Information OmniSharp using global mono :5.18.0
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 2.2.102 Commit: 96ff75a873

Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /opt/dotnet/sdk/2.2.102/

Host (useful for support):
Version: 2.2.1
Commit: 878dd11e62

.NET Core SDKs installed:
2.2.102 [/opt/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.1 [/opt/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.1 [/opt/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.1 [/opt/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
csharp ms-vscode 1.17.1
csharpextensions jchannon 1.3.0
csharpfixformat Leopotam 0.0.78
docomment k--kato 0.1.3
gitlens eamodio 9.5.1
vsc-material-theme Equinusocio 2.7.0
vscode-seedling-icon-theme rastikerdar 0.2.0
vsliveshare ms-vsliveshare 0.3.1182
@akshita31
Copy link
Contributor

@jchand99 Could you try the fix as stated here : #2604 (comment)

@akshita31 akshita31 added the .Net sdk not found These are a group of issues when the dotnet sdk could not be found label Feb 19, 2019
@jchand99
Copy link
Author

@akshita31 Fixed! Thank you!

@akshita31
Copy link
Contributor

@jchand99 Glad you got it working.

@akshita31
Copy link
Contributor

This is a dupe of #2604

@akshita31 akshita31 changed the title Arch Linux: Fail to load webapp Project Arch Linux: 'Microsoft.NET.Sdk.Razor' not found Feb 19, 2019
@float34
Copy link

float34 commented Aug 9, 2019

The issue is being tracked in dotnet/cli#12110.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Net sdk not found These are a group of issues when the dotnet sdk could not be found
Projects
None yet
Development

No branches or pull requests

3 participants