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

Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. #1805

Closed
reza-toorani opened this issue Mar 6, 2023 · 11 comments

Comments

@reza-toorani
Copy link

reza-toorani commented Mar 6, 2023

We are facing this error

 Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Microsoft.CodeAnalysis.Tools.Analyzers.AnalyzerFinderHelpers.<>c.<LoadAnalyzersAndFixers>b__0_0(Assembly assembly)
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.OfTypeIterator[TResult](IEnumerable source)+MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
   at Microsoft.CodeAnalysis.Tools.Analyzers.AnalyzerFinderHelpers.LoadAnalyzersAndFixers(IEnumerable`1 assemblies)
   at Microsoft.CodeAnalysis.Tools.Analyzers.AnalyzerReferenceInformationProvider.GetAnalyzersAndFixers(Project project)
   at System.Collections.Immutable.ImmutableDictionary.<>c__DisplayClass9_0`3.<ToImmutableDictionary>b__0(TSource element)
   at System.Linq.Utilities.<>c__DisplayClass2_0`3.<CombineSelectors>b__0(TSource x)
   at System.Linq.Enumerable.SelectIListIterator`2.MoveNext()
   at System.Collections.Immutable.ImmutableDictionary`2.AddRange(IEnumerable`1 items, MutationInput origin, KeyCollisionBehavior collisionBehavior)
   at System.Collections.Immutable.ImmutableDictionary`2.AddRange(IEnumerable`1 pairs, Boolean avoidToHashMap)
   at System.Collections.Immutable.ImmutableDictionary`2.AddRange(IEnumerable`1 pairs)
   at System.Collections.Immutable.ImmutableDictionary.ToImmutableDictionary[TSource,TKey,TValue](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 keyComparer, IEqualityComparer`1 valueComparer)
   at System.Collections.Immutable.ImmutableDictionary.ToImmutableDictionary[TSource,TKey,TValue](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at Microsoft.CodeAnalysis.Tools.Analyzers.AnalyzerReferenceInformationProvider.GetAnalyzersAndFixers(Solution solution, FormatOptions formatOptions, ILogger logger)
   at Microsoft.CodeAnalysis.Tools.Analyzers.AnalyzerFormatter.FormatAsync(Solution solution, ImmutableArray`1 formattableDocuments, FormatOptions formatOptions, ILogger logger, List`1 formattedFiles, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Tools.CodeFormatter.RunCodeFormattersAsync(Solution solution, ImmutableArray`1 formattableDocuments, FormatOptions formatOptions, ILogger logger, List`1 formattedFiles, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Tools.CodeFormatter.FormatWorkspaceAsync(FormatOptions formatOptions, ILogger logger, CancellationToken cancellationToken, String binaryLogPath)
   at Microsoft.CodeAnalysis.Tools.FormatCommandCommon.FormatAsync(FormatOptions formatOptions, ILogger`1 logger, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Tools.Commands.RootFormatCommand.FormatCommandDefaultHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass11_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass21_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass18_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__17_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass15_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__4_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass7_0.<<UseExceptionHandler>b__0>d.MoveNext() 

This is the project specification.

   <Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
      <TargetFramework>net6.0</TargetFramework>
      <ImplicitUsings>enable</ImplicitUsings>
     <Nullable>enable</Nullable>
     <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
    <IsPackable>false</IsPackable>
  </PropertyGroup>
 </Project>

And here is the pipeline detail

 - task: UseDotNet@2
            displayName: Install .NET 6.0 SDK
            inputs:
              packageType: 'sdk'
              version: 6.0.x
      - task: CmdLine@2
            displayName: Verify code formatting
            inputs:
              script: |
                dotnet format ./src/Project.sln  --verify-no-changes --severity error --no-restore
              failOnStderr: true

The dotnet runtime version is '7.0.3'.
The dotnet CLI version is '7.0.201'.

Everything was fine before we upgraded dotnet to version 7.0. While getting the error locally, the pipeline fails as well.

Can the reason be the same as #1800?

@koenigst
Copy link

koenigst commented Mar 8, 2023

We have the same issue after migrating from dotnet SDK 7.0.102 to 7.0.201.

To fix it we can change the SDK version back to 7.0.1xx in the global.json or set <EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild> in our projects.

@reza-toorani
Copy link
Author

To fix this issue we set false EnforceCodeStyleInBuild

@lbruun
Copy link

lbruun commented Mar 14, 2023

Hit by this too.

For GitHub Workflow we had to do the following in order to lock to a previous SDK version:

  1. In the workflow file:
  - name: Setup .NET SDK
    uses: actions/setup-dotnet@v3
    with:
      dotnet-version: '7.0.103'
  1. Add a global.json file in the root of the repo with this content:
{
    "sdk": {
      "version": "7.0.103"
    }
}

The first step merely makes sure the version is available on the Runner. The second step is necessary to make sure the CLI actually picks up the SDK version we want.

@herebebeasties
Copy link

Please close this as a duplicate of #1800.

@MarkusRodler
Copy link

I have the same error but I think it is the same one as last year: #1519
Infos:

  • EnforceCodeStyleInBuild is not set
  • I am using dotnet format
  • The dotnet runtime version is '7.0.4'
  • The dotnet CLI version is '7.0.202'
  • I have a library-project including Microsoft.CodeAnalysis.CSharp 4.5.0. If I lower it to 4.4.0 than there is no error.

@nietras
Copy link

nietras commented Mar 24, 2023

Same issue. Multiple machines incl. in CI. Tried to downgrade global.json to 7.0.102 from 7.0.202. Doesn't work still. Don't have a working fix neither local or on CI. Have to disable the task for CI. This issue has hit us several times before.

@lucasteles
Copy link

I got the same behavior as @MarkusRodler

@othmane-kinane-nw
Copy link

othmane-kinane-nw commented Apr 4, 2023

Same issue. Multiple machines incl. in CI. Tried to downgrade global.json to 7.0.102 from 7.0.202. Doesn't work still. Don't have a working fix neither local or on CI. Have to disable the task for CI. This issue has hit us several times before.

@nietras I did manage to make it work on CI with SDK 7.0.104 by setting DOTNET_INSTALL_DIR and DOTNET_ROOT, so that the SDK used in the workflow is completely isolated from the one installed on the agent:

name: .NET

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
  workflow_dispatch:

env:
  PROJECT_DIR: ${{ github.workspace }}/backend
  DOTNET_CLI_TELEMETRY_OPTOUT: true
  CONFIGURATION: Release
  DOTNET_INSTALL_DIR: .temp/dotnet
  DOTNET_ROOT: .temp/dotnet

jobs:
  build:
    name: Build and test
    runs-on: ubuntu-latest
    defaults:
      run:
        shell: bash
        working-directory: ${{ env.PROJECT_DIR }}
    steps:    
    - uses: actions/checkout@v3    
    - name: Setup .NET
      uses: actions/setup-dotnet@v3
      with:
        global-json-file: backend/global.json        
    - name: Restore dependencies
      run: dotnet restore      
    - name: Check format
      run: dotnet format --no-restore --verify-no-changes --verbosity detailed

Here is the content of my global.json file:

{
  "sdk": {
    "version": "7.0.104",
    "rollForward": "latestMinor"
  }
}

@GGG-KILLER
Copy link

GGG-KILLER commented Apr 7, 2023

I've been getting this using .NET 8 in a dev container where .NET was installed using dotnet-install.sh.

The project it runs into an exception while trying to format is an Incremental Source Generator.

Solution: https://github.com/LorettaDevs/Loretta (devcontainer files are contained within)
Project: Loretta.Generators.SyntaxFactsGenerator
Format command: dotnet format (v8.0.405501+2cb3e68c6b9a966114572fd63f2a20d2cb54a288)
Output: https://gist.github.com/GGG-KILLER/81a9773f7c02a12a841edd331751d2ee

dotnet --info
$ dotnet --info
.NET SDK:
 Version:   8.0.100-preview.2.23157.25
 Commit:    54801b2435

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         ubuntu.22.04-x64
 Base Path:   /usr/local/dotnet/current/sdk/8.0.100-preview.2.23157.25/

Host:
  Version:      8.0.0-preview.2.23128.3
  Architecture: x64
  Commit:       30b879924a

.NET SDKs installed:
  6.0.407 [/usr/local/dotnet/current/sdk]
  7.0.202 [/usr/local/dotnet/current/sdk]
  8.0.100-preview.2.23157.25 [/usr/local/dotnet/current/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.15 [/usr/local/dotnet/current/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.4 [/usr/local/dotnet/current/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0-preview.2.23153.2 [/usr/local/dotnet/current/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.15 [/usr/local/dotnet/current/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.4 [/usr/local/dotnet/current/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0-preview.2.23128.3 [/usr/local/dotnet/current/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

UPDATE: In this case it seems to be caused by EnforceCodeStyleInBuild so I'm moving this comment to #1800.

TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 7, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
@lucasteles
Copy link

I'm getting this error just adding this source generator package (this version only)

<ItemGroup>
  <PackageReference Include="Riok.Mapperly" Version="2.7.0"/>
</ItemGroup>
Unhandled exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.    
Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.    
Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.    
Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.    
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.    
Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.    
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.    
Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.    
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Microsoft.CodeAnalysis.Tools.Analyzers.AnalyzerFinderHelpers.<>c.<LoadAnalyzersAndFixers>b__0_0(Assembly assembly)
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.OfTypeIterator[TResult](IEnumerable source)+MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
   at Microsoft.CodeAnalysis.Tools.Analyzers.AnalyzerFinderHelpers.LoadAnalyzersAndFixers(IEnumerable`1 assemblies)
   at Microsoft.CodeAnalysis.Tools.Analyzers.AnalyzerReferenceInformationProvider.GetAnalyzersAndFixers(Project project)
   at System.Collections.Immutable.ImmutableDictionary.<>c__DisplayClass9_0`3.<ToImmutableDictionary>b__0(TSource element)
   at System.Linq.Utilities.<>c__DisplayClass2_0`3.<CombineSelectors>b__0(TSource x)
   at System.Linq.Enumerable.SelectIListIterator`2.MoveNext()
   at System.Collections.Immutable.ImmutableDictionary`2.AddRange(IEnumerable`1 items, MutationInput origin, KeyCollisionBehavior collisionBehavior)
   at System.Collections.Immutable.ImmutableDictionary`2.AddRange(IEnumerable`1 pairs, Boolean avoidToHashMap)
   at System.Collections.Immutable.ImmutableDictionary`2.AddRange(IEnumerable`1 pairs)
   at System.Collections.Immutable.ImmutableDictionary.ToImmutableDictionary[TSource,TKey,TValue](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 keyComparer, IEqualityComparer`1 valueComparer)
   at System.Collections.Immutable.ImmutableDictionary.ToImmutableDictionary[TSource,TKey,TValue](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at Microsoft.CodeAnalysis.Tools.Analyzers.AnalyzerReferenceInformationProvider.GetAnalyzersAndFixers(Solution solution, FormatOptions formatOptions, ILogger logger)
   at Microsoft.CodeAnalysis.Tools.Analyzers.AnalyzerFormatter.FormatAsync(Solution solution, ImmutableArray`1 formattableDocuments, FormatOptions formatOptions, ILogger logger, List`1 formattedFiles, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Tools.CodeFormatter.RunCodeFormattersAsync(Solution solution, ImmutableArray`1 formattableDocuments, FormatOptions formatOptions, ILogger logger, List`1 formattedFiles, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Tools.CodeFormatter.FormatWorkspaceAsync(FormatOptions formatOptions, ILogger logger, CancellationToken cancellationToken, String binaryLogPath)     
   at Microsoft.CodeAnalysis.Tools.FormatCommandCommon.FormatAsync(FormatOptions formatOptions, ILogger`1 logger, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Tools.Commands.RootFormatCommand.FormatCommandDefaultHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass11_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass21_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass18_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__17_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass15_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__4_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.CommandLineBuilderExtensions.<>c__DisplayClass7_0.<<UseExceptionHandler>b__0>d.MoveNext()
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
   at Microsoft.CodeAnalysis.DefaultAnalyzerAssemblyLoader.DirectoryLoadContext.Load(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
   at Microsoft.CodeAnalysis.DefaultAnalyzerAssemblyLoader.DirectoryLoadContext.Load(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)

TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 11, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 12, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 14, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 15, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 15, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 16, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 16, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 17, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 17, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 21, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 26, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 27, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Apr 27, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue May 3, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue May 28, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue May 28, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jun 4, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jun 4, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jun 12, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jun 12, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jun 12, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jun 14, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jun 16, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
@glen-84
Copy link

glen-84 commented Jun 17, 2023

@reza-toorani Is this fixed for you in 7.0.304? If so, please close this issue.

TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jun 21, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jun 23, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jun 24, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jun 26, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jul 16, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jul 16, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
TSRBerry added a commit to TSRBerry/Ryujinx that referenced this issue Jul 22, 2023
This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800
jcm93 pushed a commit to jcm93/Ryujinx that referenced this issue Aug 15, 2023
* Add workflow to perform automated checks for PRs

* Downgrade Microsoft.CodeAnalysis to 4.4.0

This is a workaround to fix issues with dotnet-format.
See:
- dotnet/format#1805
- dotnet/format#1800

* Adjust editorconfig to be more compatible with Ryujinx code-style

* Adjust .editorconfig line endings to match .gitattributes

* Disable 'prefer switch expression' rule

* Remove naming styles

These are the default rules, so we don't need to override them.

* Silence IDE0060 in .editorconfig

* Slightly adjust .editorconfig

* Add lost workflow changes

* Move .editorconfig comment to the top

* .editorconfig: private static readonly fields should be _lowerCamelCase

* .editorconfig: Remove alignment for declarations as well

* editorconfig: Add rule for local constants

* Disable CA1822 for HLE services

* Disable CA1822 for ViewModels

Bindings won't work with static members, but this issue is silently ignored.

* Run dotnet format for the whole solution

* Check result code of SDL_GetDisplayBounds

* Fix dotnet format style issues

* Add missing trailing commas

* Update Microsoft.CodeAnalysis.CSharp to 4.6.0

Skipping 4.5.0 since it breaks dotnet format

* Restore old default naming rules for dotnet format

* Add naming rule exception for CPU tests

* checks: Include all files before excluding paths

* Fix dotnet format issues

* Check dotnet format version

* checks: Run dotnet format with severity info again

* checks: Disable naming style rules until they won't crash the process anymore

* Remove unread private member

* checks: Attempt to run analyzers 3 times before giving up

* checks: Enable naming style rules again with the new retry logic
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

No branches or pull requests

10 participants