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

System.Runtime needs explicit inclusion on creating compilation object #49

Open
kevinwkt opened this issue Aug 7, 2020 · 0 comments
Open
Assignees

Comments

@kevinwkt
Copy link

kevinwkt commented Aug 7, 2020

Overview:

When creating a compilation object for unit testing given string-based source code, we get the following error:

Collection: [(12,18): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'., (12,18): error CS0012: The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'., (7,18): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.]

Current workaround can be seen here (by explicitly including system.runtime and loading its assembly):
https://github.com/dotnet/runtimelab/blob/JsonCodeGen/src/libraries/System.Text.Json/System.Text.Json.SourceGeneration.UnitTests/CompilationHelper.cs#L31

Repro:

Comment out the workaround line and run unit tests for System.Text.Json.SourceGeneration.UnitTests

@kevinwkt kevinwkt self-assigned this Aug 7, 2020
scalablecory pushed a commit that referenced this issue Sep 22, 2020
This (hopefully) fixes the hang for spinquic (#37 ) on shutdown. The TempDir variable was referencing previous stack memory which was now invalid. This change allocates the memory with the config params.
MichalStrehovsky pushed a commit to MichalStrehovsky/runtimelab that referenced this issue Oct 15, 2021
* Stop fighting the coreclr build system, it enforces platform specific output. Instead adapt the projects in such a way that VS will always build it as x64.

For now hardcoded the fact that it runs on x64 - everywhere.

* Add missing project ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant