We have to lock down a v1.2 S.R.Metadata now, but there are features
(metadata writer, signature decoder) that we're pushing out to a v1.3.
Set up the build to produce both packages and configure the project
such that the default configurations are v1.2 and the *_Future
configurations are v1.3.
Currently, v1.2 just internalizes the features of v1.3, but we can
consider stripping them out entirely.
Commit migrated from https://github.com/dotnet/corefx/commit/7152971f4a940aa897c29fcdbed8934a692a928e
Up to now, System.Reflection.Metadata provides low-level access to
ECMA-335 CLI metadata, but only provides signatures as blobs that must
be parsed with direct knowledge of the format as described in the
section II.23.2 of the CLI specification. There is a BlobReader for
reading various elements out of blobs, but it is up to the caller to
read the right things at the right positions.
This was by-design as the library is designed to sit at the lowest level
behind the scenes of higher level API such as Reflection proper, Roslyn,
or CCI.
The challenge with signatures is that they are variable-length and
encode tree structures, and each higher level model that could sit on
top of System.Reflection.Metadata will have different representations
for the trees. We do not want to introduce an API to build a fully
formed tree that then has to be traversed and rewritten to match the
actual use case.
This API is therefore a middle ground between:
1. Here are the bytes and some helpers. Read the spec to decode.
(Status quo.)
2. Yet another high-level metadata API.
(Out of scope for this layer.)
It works as follows:
1. The caller chooses an arbitrary representation, TType, for type
symbols and implements ISignatureTypeProvider<TType> .
2. Signatures are parsed by recursive descent and the provider is
called to create new type nodes:
* Give me the TType that represents this primitive
* Give me the TType that represents this TypeDefinition
* Give me the TType that represents an array of this other TType
* etc.
Commit migrated from https://github.com/dotnet/corefx/commit/0bc15ebcff855acf36d0970d0ed95d770adf2882
Setting <DebugSymbols> and <DebugType> like this breaks building cross
platform because Roslyn can't emit PDBs. Our top level properties files
define these settings to false when building cross platform and there is
no reason these projects need to be doing their own thing.
Commit migrated from https://github.com/dotnet/corefx/commit/f430cedb84b28ed40b688f8fe5cd6ba5769db9e0
DNX and BuildTools now support all of the nuget v2 conventions that we depend on so we can
move all remaining nuget v2 packages to the project.json file and eliminate packages.config.
This change also adds "frameworks" to the project.json so that dnu restore can calculate
applicable assets. I am not yet using "runtimes" in the project.json since we are still resolving
our runtime assets manually (eg: build tools copies known files from packages). A future
change will move us to using our runtime packages and add runtimes sections to projects
as appropriate.
Commit migrated from https://github.com/dotnet/corefx/commit/eb35a304c7e89e8b4335ed13c5d23706360d49a4
This change updates all projects to the latest CoreFx packages which make use of nuget v3 features and thus require project.json. Packages.config remains for the packages which are not yet compatible with the new build task (mainly because we need to resolve to PCL folders).
The entire change was done by a tool in order to not miss any dependencies, and ensure we have project items for the packages.config/project.json. One side effect of using the tool is some reformatting of whitespace in the projects.
Commit migrated from https://github.com/dotnet/corefx/commit/e729c5353070b71aedff8f1300ae838573813faf
Update the System.Reflection.Metadata package to depend on the RC build of
System.Collections.Immutable.
Update packages.config with the S.C.Immutable package.
Update src and test projects for S.R.Metadata to reference the RC build.
The RC builds are real signed so update assembly reference to specify the
full assembly identity.
Commit migrated from https://github.com/dotnet/corefx/commit/2d440a427d30286b786501709bfb2bb4a5d6dd32
System.Collections.Immutable.dll is installed to the GAC and this
causes msbuild assembly resolution to decide that copy local isn't
necessary. This doesn't work for us because .NET Core doesn't use
the GAC.
The workaround is to explicitly set Private=true on the reference.
Commit migrated from https://github.com/dotnet/corefx/commit/2bc73d7450fd7f301df28c18f975babf27ef3164
System.Reflection.Metadata.Tests has a project-to-project (P2P) reference
to System.Collections.Immutable rather than via the nupkg.
This prevents a successful build in VS until after a full build.cmd has
been done on the command line as VS does not support building project
references on demand unless the referenced project is included in the
same solution.
The project reference appears to have been done to workaround missing
support for portable packages that do not explicitly mention
aspnetcore50 in the interim infrastructure that resolves test
references for deployment.
This change implements a different workaround: reference the dll in
the packages/ folder without mentioning it in packages.config. It
works because we are guaranteed to have the package restored to the
same location for the main System.Reflection.Metadata project.
Fixdotnet/corefx#950
Commit migrated from https://github.com/dotnet/corefx/commit/7a41cba680f9f1c43ecf7216562f6b4a6c813e68
We control the targeting centrally and we shouldn't be retargeting
from VS. With the new support for running tests on F5, it is best
to be able to see and edit the command line in the property pages.
Before this, we had an arbitrary mix of the guids being present or
not anyhow. At some point, if we need to set it, we can put it back
across the board and hopefully by then we'll have proper VS test
integration anyhow.
Commit migrated from https://github.com/dotnet/corefx/commit/da9663498c4f5e6bb663e97531afc48964ffbdd0
Added */tests/*.csproj file to dirs.proj list of projects to build.
There are some tests like the MetadataReaderTests that build against desktop
framework and so that project needed some hacking to get the correct props used,
we should fix that at another point.
Commit migrated from https://github.com/dotnet/corefx/commit/f5f9d189457df676f857c2e589a30795a6e1f8fa
The public ImmutableArrayInterop class has been deemed too dangerous
to be out there for general use.
Remove it and implement a byte[] only version internally in the
metadata reader using an unverifiable union.
Retain the documentation and add a warning to anyone thinking about
reusing the code to do likewise.
Commit migrated from https://github.com/dotnet/corefx/commit/b28ca0e9461e06cefc30980d70310346a5c45eee
One of the disabled tests was obsolete. The design decision that was pending
is closed and the behavior tested did not match the decision. That test is
simply deleted.
The other test is changed from using [Fact(Skip="...")] to /*[Fact]*/. It is
now tracked by Issue dotnet/corefx#26.
Finally, I spotted a typo: 'overload' instead of 'overlong' nearby and fixed it.
Commit migrated from https://github.com/dotnet/corefx/commit/d3b3ac3ab0f20ec5a0f4e07c76554e0cb5ca37c2