Skip to content

SelfContained does not work anymore since version 4.14.4 #467

Description

@robmuller

Starting with the 4.14.4 release any project with SelfContained set to true gives errors when trying to compile a script.
I have attached a minimal example which shows the problem. If you change cs-script to version 4.14.3 or set SelfContained to false the script can be compiled.

The is the exception message:

<script>(6,12): error CS0518: Predefined type 'System.Void' is not defined or imported
<script>(8,9): error CS0518: Predefined type 'System.Object' is not defined or imported
<script>(8,17): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
<script>(8,17): error CS0518: Predefined type 'System.Object' is not defined or imported
<script>(8,27): error CS0518: Predefined type 'System.Object' is not defined or imported
<script>(8,27): error CS0103: The name 'Environment' does not exist in the current context
<script>(8,49): error CS0518: Predefined type 'System.String' is not defined or imported
<script>(8,58): error CS0518: Predefined type 'System.Object' is not defined or imported
<script>(8,58): error CS1069: The type name 'RuntimeInformation' could not be found in the namespace 'System.Runtime.InteropServices'. This type has been forwarded to assembly 'System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' Consider adding a reference to that assembly.
<script>(8,9): error CS0518: Predefined type 'System.Void' is not defined or imported
<script>(4,14): error CS1729: 'object' does not contain a constructor that takes 0 arguments
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Attribute' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute..ctor'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.AllowMultiple'
error CS0656: Missing compiler required member 'System.AttributeUsageAttribute.Inherited'

SelfContained_problem.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions