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

Error when build with dotnet build #24

Open
xperiandri opened this issue Apr 9, 2020 · 2 comments
Open

Error when build with dotnet build #24

xperiandri opened this issue Apr 9, 2020 · 2 comments

Comments

@xperiandri
Copy link

%UserName%\.nuget\packages\codecontracts.msbuild\1.13.0-rc\Contracts\MsBuild\vCurrent\Microsoft.CodeContracts.targets(276,5): 
error MSB4062: 
The "Microsoft.Build.Tasks.GetFrameworkSdkPath" task could not be loaded from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.  
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. 

I tried to copy v15.0 to vCurrent. No result

@xperiandri
Copy link
Author

When building on GitHub

Unhandled Exception:
  System.TypeInitializationException: The type initializer for 'System.Compiler.SystemTypes' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Compiler.CoreSystemTypes' threw an exception. ---> System.InvalidCastException: Specified cast is not valid.
    at System.Compiler.CoreSystemTypes.GetSystemAssembly (System.Boolean doNotLockFile, System.Boolean getDebugInfo, System.Compiler.AssemblyNode+PostAssemblyLoadProcessor postAssemblyLoad) [0x00076] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
    at System.Compiler.CoreSystemTypes.Initialize (System.Boolean doNotLockFile, System.Boolean getDebugInfo, System.Compiler.AssemblyNode+PostAssemblyLoadProcessor postAssemblyLoad) [0x0002b] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
    at System.Compiler.CoreSystemTypes..cctor () [0x00000] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
     --- End of inner exception stack trace ---
    at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
    at System.Compiler.SystemTypes.Initialize (System.Boolean doNotLockFile, System.Boolean getDebugInfo, System.Compiler.AssemblyNode+PostAssemblyLoadProcessor postAssemblyLoad) [0x00027] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
    at System.Compiler.SystemTypes..cctor () [0x00000] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
     --- End of inner exception stack trace ---
    at Microsoft.Contracts.Foxtrot.Driver.Program.InternalMain (System.String[] args) [0x0015a] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
    at Microsoft.Contracts.Foxtrot.Driver.Program.Main (System.String[] args) [0x0000c] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
  [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Compiler.SystemTypes' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Compiler.CoreSystemTypes' threw an exception. ---> System.InvalidCastException: Specified cast is not valid.
    at System.Compiler.CoreSystemTypes.GetSystemAssembly (System.Boolean doNotLockFile, System.Boolean getDebugInfo, System.Compiler.AssemblyNode+PostAssemblyLoadProcessor postAssemblyLoad) [0x00076] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
    at System.Compiler.CoreSystemTypes.Initialize (System.Boolean doNotLockFile, System.Boolean getDebugInfo, System.Compiler.AssemblyNode+PostAssemblyLoadProcessor postAssemblyLoad) [0x0002b] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
    at System.Compiler.CoreSystemTypes..cctor () [0x00000] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
     --- End of inner exception stack trace ---
    at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
    at System.Compiler.SystemTypes.Initialize (System.Boolean doNotLockFile, System.Boolean getDebugInfo, System.Compiler.AssemblyNode+PostAssemblyLoadProcessor postAssemblyLoad) [0x00027] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
    at System.Compiler.SystemTypes..cctor () [0x00000] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
     --- End of inner exception stack trace ---
    at Microsoft.Contracts.Foxtrot.Driver.Program.InternalMain (System.String[] args) [0x0015a] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
    at Microsoft.Contracts.Foxtrot.Driver.Program.Main (System.String[] args) [0x0000c] in <7c14c9b51c5c4cbbb3359f80fa0ab01d>:0 
/home/runner/.nuget/packages/codecontracts.msbuild/1.13.0-rc/Contracts/MsBuild/v15.0/Microsoft.CodeContracts.targets(255,5): error MSB3073: The command ""/home/runner/.nuget/packages/codecontracts.msbuild/1.13.0-rc/build/../Contracts/Bin/ccrewrite.exe" "@StringBuilderExtensionsccrewrite.rsp"" exited with code 1. [/home/runner/work/StringBuilderExtensions/StringBuilderExtensions/StringBuilderExtensions/StringBuilderExtensions.csproj]

@xperiandri
Copy link
Author

Tried to build with MSBuild instead of dotnet build on GitHub - same TypeInitializationException

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

1 participant