Commit Graph
65 Commits
Author SHA1 Message Date
Tomáš Matoušek ce8ebbad24 Implements PEReader.TryOpenAssociatedPortablePdb (dotnet/corefx#11031)
* Reuse MetadataReader instance in provider

* Remove unnecessary unsafe modifiers, add Embedded PDB tests

* Add IsPortableCodeView property

* Allow arbitrary PDB path padding in CodeView

* Implements PEReader.TryOpenAssociatedPortablePdb

* Fix comment

* Remove forgotten debug code

* Fix test


Commit migrated from https://github.com/dotnet/corefx/commit/0743d949b8d7a63f8e7f9ff3b5023b1a8fa8618a
2016-08-25 08:33:29 -07:00
Tomas Matousek a184494f91 Use TempFile
Commit migrated from https://github.com/dotnet/corefx/commit/8a18d94e6875c5f865196a62a05a9cf75b63eb94
2016-08-19 16:00:27 -07:00
Tomáš Matoušek c8bc733066 Implements support for reading loaded PE files (dotnet/corefx#10768)
Commit migrated from https://github.com/dotnet/corefx/commit/f2f264f9e71bc982431a1ed21417ac7d3a3fd847
2016-08-15 15:28:58 -07:00
Tomáš Matoušek 1e8838bc2c Clean up method body encoding APIs (dotnet/corefx#10386)
Commit migrated from https://github.com/dotnet/corefx/commit/9b04bcb14643f3de7e8b4e974dc671b362de2681
2016-07-29 17:09:59 -07:00
Karthik Rajasekaran 5c93b350d3 Add NugetTargetMoniker to test projects and update remaining project references to pkgproj
Commit migrated from https://github.com/dotnet/corefx/commit/13e03705ced065850dc65900fccfd930426e87d7
2016-06-29 12:30:05 -07:00
Tomáš Matoušek 5ede124582 Refactor metadata serializers (dotnet/corefx#9588)
* Refactor metadata serializers

* Split file

* Renames

* More API testing and polish


Commit migrated from https://github.com/dotnet/corefx/commit/d03addae82910375f093dc896ce53528ae2ca443
2016-06-24 15:50:58 -07:00
Karthik Rajasekaran d73f6518c3 Update CoreFX tests to compile against a minimum of netstandard1.3 and add supports clauses for tests
CoreFX tests will now compile against netstandard1.3 as references and will now deploy for the platforms listed in their respective supports clause, provided the appropriate TestTFM is passed in.  The supports are fully listed inside runtime.json in the new TestSuite metapackage in buildtools. The tests will default to netcoreapp1.0 as their TestTFM.

CoreFx test projects now utilise a test csproj to pkgproj reference which determine the appropriate compile time and runtime assets needed.

Dependent on https://github.com/dotnet/buildtools/pull/770


Commit migrated from https://github.com/dotnet/corefx/commit/b4841454de7ddcd75e92e2bb24ebb238a82df43f
2016-06-15 11:23:11 -07:00
Tomas Matousek 5a14de2c13 Implement missing data access members on MetadataReader, PEMemoryBlock
Commit migrated from https://github.com/dotnet/corefx/commit/13bb83a347c7f5ee29bd9f30d37e75418f4d2da4
2016-06-09 18:12:01 -07:00
Tomas Matousek 84c38b9fa6 Removes size validation in TryGetDirectoryOffset, adds tests
Commit migrated from https://github.com/dotnet/corefx/commit/f4a777e7163757e5952462ad6e4026ec05e16e7f
2016-06-08 14:36:02 -07:00
Tomas Matousek 3665bd9b92 CodedIndex cleanup and tests
Commit migrated from https://github.com/dotnet/corefx/commit/0eab3ef1c852798ba4877251d432c4abfcbc27d8
2016-06-07 15:08:41 -07:00
Stephen Toub 482d3a7beb Remove unnecessary assembly-level CLSCompliant attributes
Commit migrated from https://github.com/dotnet/corefx/commit/bdbc8797f55e8a50f4fec4b5b0349666ddfa57e6
2016-06-01 20:03:23 -04:00
Tomas Matousek 68d3758724 DebugDirectoryBuilder and ResourceSectionBuilder
Commit migrated from https://github.com/dotnet/corefx/commit/eb84ead441e4ba5e6d7be74d872a20b11cc9e3c1
2016-05-16 13:53:02 -07:00
Tomas Matousek 337b95c556 Heaps and BlobContentId
Commit migrated from https://github.com/dotnet/corefx/commit/a9442a6fe0d0d616ce372018c86ff435cf5337c2
2016-05-13 15:38:57 -07:00
Tomas Matousek 786b3617fb Test writing and reading large tables, refactor WriteReference API
Commit migrated from https://github.com/dotnet/corefx/commit/6cb5eba928e6a2ae15cb4ae2729364a651b6932e
2016-05-09 11:48:04 -07:00
Tomas Matousek 9b7c4d57ce PEBuilder refactoring, signing
Commit migrated from https://github.com/dotnet/corefx/commit/63df90827918037c245c42ba7e50e2c06814a277
2016-05-05 11:34:10 -07:00
Tomas Matousek 63e76b81d7 Organize test source files
Commit migrated from https://github.com/dotnet/corefx/commit/793bd156e1e81f333ee6feb63862e8b101f075d3
2016-04-29 15:03:53 -07:00
Tomas Matousek 243e5ba426 Encoders: Argument validation and API cleanup
Commit migrated from https://github.com/dotnet/corefx/commit/525a8c4dcae66a67e60f7785b6e03cef84b0ceea
2016-04-29 15:03:47 -07:00
Tomas Matousek 6747be83a1 Add tests
Commit migrated from https://github.com/dotnet/corefx/commit/c5814310ee77d120765b6149d317dc9ffe198557
2016-04-27 15:12:10 -07:00
Tomas Matousek 38ab29d69c Add more tests and comments
Commit migrated from https://github.com/dotnet/corefx/commit/e4cc653667898d444aed85b76865635adcc6828b
2016-04-25 13:00:39 -07:00
Tomas Matousek 019ffc6a0f Implements MetadataReaderProvider
Commit migrated from https://github.com/dotnet/corefx/commit/8d135a6ae8e7121bebd37be836fe687d9b5ffcb9
2016-04-24 12:27:18 -07:00
Eric Mellino 722505f95f Revert PR 7188.
The newest version of MSBuild has fixed the embedded resource culture
issue that was preventing us from using periods in embedded resource
names. This reverts the changes to the System.Reflection.Metadata tests
which removed the periods from some embedded resource file names in the
test assembly.


Commit migrated from https://github.com/dotnet/corefx/commit/933a0cd2faaa26b479b75ae5e54a5b57ed9c15f6
2016-03-28 13:20:08 -07:00
Eric Mellino f00f7619cc Remove periods from embedded resource names in Metadata tests
Commit migrated from https://github.com/dotnet/corefx/commit/d15fca0f9bd9d563869005c3927618b375918f81
2016-03-23 16:00:41 -07:00
Nick Guerrera dfc1c8f5dd Add test coverage for CustomAttributeDecoder
Commit migrated from https://github.com/dotnet/corefx/commit/6ffebba142ec4f9b500a646da8d5754eb4576f07
2016-02-29 17:23:01 -08:00
Jose Perez Rodriguez d4b98f723c Using Full Framework roslyn compilers for Windows builds.
Commit migrated from https://github.com/dotnet/corefx/commit/3b87fdb8a6de3d40560a2db67e52cfffb59aec59
2016-02-19 09:29:21 -08:00
Nick Guerrera 1a9b15e48d Split S.R.Metadata v1.2 and v1.3
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
2016-02-05 13:22:17 -08:00
Tomáš Matoušek 468dd309cc Merge pull request dotnet/corefx#5719 from tmat/PdbStreamValidation
Disallow nil MethodDef token as an entry-point in Portable PDB

Commit migrated from https://github.com/dotnet/corefx/commit/8ed29621f59b74d881421c9df2d4d9c13916653c
2016-01-31 11:25:57 -08:00
Tomas Matousek ff193c272e Disallow nil MethodDef token as an entry-point in Portable PDB
Commit migrated from https://github.com/dotnet/corefx/commit/f2124b43f8f77c5fcc2621f03c48d2ff25ed41d6
2016-01-26 18:51:00 -08:00
Tomas Matousek 75c9b24fde Misc small API additions
Commit migrated from https://github.com/dotnet/corefx/commit/538463a0247a4b77de87283e2d8d196d6f92369b
2016-01-22 18:24:34 -08:00
Tomas Matousek c64e8e45e2 Updates System.Reflection.Metadata.sln to VS2015 and the project language to C# 6
Commit migrated from https://github.com/dotnet/corefx/commit/964a3af7cceb68a440d1762d4529ef9d11567596
2016-01-11 11:35:08 -08:00
Nick Guerrera ff862c42ef Add signature decoder to System.Reflection.Metadata
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
2016-01-07 10:49:12 -08:00
Tomas Matousek 0dc416c285 Implements PE Debug Directory reader.
Commit migrated from https://github.com/dotnet/corefx/commit/bd40b7bc4674a5f536f94f0f80b6c6304650ac87
2015-12-16 03:32:05 +01:00
Matt Ellis fbeb9a7b3a Don't set debug properties in projects
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
2015-10-27 17:35:45 -07:00
Tomas Matousek 8de14b63f9 Add portable PDB reader to System.Reflection.Metadata
Commit migrated from https://github.com/dotnet/corefx/commit/9ff902c77ad34959c154b1289dac19a54ba2cffb
2015-09-30 12:09:41 -07:00
stephentoub 0c8020ecf6 Enable warnings-as-errors for the build
I also explicitly enabled WarningLevel 4 for all projects, and I fixed a few straggling warnings that fire with the VS2013 compiler but not with VS2015 (by design).


Commit migrated from https://github.com/dotnet/corefx/commit/1a732c1b696979a4d5c659e4f35fc990432e66f4
2015-07-01 14:14:37 -04:00
Ben Bader 4def74bd80 Remove null-padding from parsed section-header names.
Fixes issue dotnet/corefx#1805.


Commit migrated from https://github.com/dotnet/corefx/commit/e9dcbba215d5e2abc9e82d27b7b5f53841891632
2015-05-25 15:25:20 -07:00
Alexander Köplinger b46f878f13 Remove outdated comment about packages.config from csproj's
Since the move to project.json we no longer use packages.config


Commit migrated from https://github.com/dotnet/corefx/commit/1d489b12d2f6b7b7128888d525dc2e49fe2f1782
2015-05-15 20:10:42 +02:00
Lakshmi Priya Sekar 2a499c5cbf Remove XunitTraitDiscoverers from corefx and reference the nuget package xunit.netcore.extensions.
Commit migrated from https://github.com/dotnet/corefx/commit/03e32211d668ee215f32c599849987cb7d9d4e2a
2015-05-07 16:15:32 -07:00
Eric StJohn 5db3ae33bf Convert all remaining package dependencies to project.json
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
2015-05-05 12:36:57 -07:00
Eric StJohn c0e430ddf5 Update to latest CoreFx packages, convert to project.json
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
2015-04-15 12:47:43 -07:00
Alexander Köplinger bc43414863 System.Reflection.Metadata: Fix reference path to System.Collections.Immutable
The 1.1.34-rc-00001 version of the package doesn't have +wp8 in it's path.
Use the 1.1.34-rc version instead, which is also available on nuget.org


Commit migrated from https://github.com/dotnet/corefx/commit/47182a701b9f23ddcd0a2f9acd1f41d4e0cee585
2015-04-03 05:27:40 +02:00
Joel Hendrix 9d218b211e Update Metadata package to depend on latest Immutable package.
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
2015-02-27 09:28:29 -08:00
Nick Guerrera fdd7a891c4 Fix build break on machines with recent VS 2015 CTP
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
2015-02-25 17:28:08 -08:00
Nick Guerrera 5cac8fa6be Respond to PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/ca2c0bf5b4606109bd00d28b1f5e7102cc448df2
2015-02-25 10:59:03 -08:00
Nick Guerrera b9fd4a1a50 Use immutable nupkg from metadata tests
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.

Fix dotnet/corefx#950


Commit migrated from https://github.com/dotnet/corefx/commit/7a41cba680f9f1c43ecf7216562f6b4a6c813e68
2015-02-22 18:17:15 -08:00
chcosta d1620100c8 Sync changes from TFS as of 2015/02/16 9:30:00 AM
[tfs-changeset: 1416076]


Commit migrated from https://github.com/dotnet/corefx/commit/67bd740c6c732e141835521ff34b2cc18591a9cc
2015-02-16 09:51:49 -08:00
Maxwe11 2d635dae1c Replace relative path to common tests with a variable
Replace relative path "..\..\Common\tests" with $(CommonTestPath) variable.


Commit migrated from https://github.com/dotnet/corefx/commit/56dbc6abc6dcde5874c99c67f379d788c8dd4420
2015-02-08 15:05:37 +02:00
Nick Guerrera 18d59d59f1 Remove PLIB ProjectTypeGuids to allow editing debug options in VS
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
2015-01-22 16:30:00 -08:00
Matt Cohn 242ade5fd0 Metadata reader tests now take a project reference to Immutable
This allows the Metadata reader tests to run against the version
of immutable in the repository.


Commit migrated from https://github.com/dotnet/corefx/commit/d074dccb27513395be22e98f9551a8d3d46fe436
2015-01-06 15:44:10 -08:00
Wes Haggard 27cb98e29a Switch all projects to resolve references from packages.config.
Commit migrated from https://github.com/dotnet/corefx/commit/08503d51d2c61861bf11c5e36da53c69aca092e1
2014-12-19 17:44:16 -08:00
Alexander Köplinger d7ea53dc3d System.Reflection.Metadata.Tests: reference System.Threading contract assembly
This allows the test project to be built with Mono's xbuild.


Commit migrated from https://github.com/dotnet/corefx/commit/460eb24f1ec243fcd96c217ef3f5d1d8d19635b1
2014-12-18 10:34:29 +01:00