Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric StJohn <ericstj@microsoft.com>2018-10-31 21:43:55 +0300
committerSantiago Fernandez Madero <safern@microsoft.com>2018-10-31 21:43:55 +0300
commit4049b2040a7eb838f7e8563eebd03df3015edbf5 (patch)
treec25ffaf2a2b5a7bd5c58030372e2a96bad0cf963
parentd7d278fa58f82640dd8adbf76282b5ec8918f161 (diff)
Move resolveContract into corefx (dotnet/corefx#33152)
* Move resolveContract into corefx This moves resolveContract logic into corefx. It also fixes API compat which hasn't been running for some time due to ResolveMatchingContract property being set to let to sequence the target. * Fix System.Drawing.Design.Primitives reference * Fix resolveContract convention We only want to add the contract item when building source projects. Commit migrated from https://github.com/dotnet/corefx/commit/271ed1b719b144a54d10e36dd74e5b763ea5f472
-rw-r--r--eng/resolveContract.targets24
-rw-r--r--src/libraries/System.Drawing.Design.Primitives/ref/System.Drawing.Design.Primitives.cs2
2 files changed, 24 insertions, 2 deletions
diff --git a/eng/resolveContract.targets b/eng/resolveContract.targets
new file mode 100644
index 00000000000..eedc7f2f063
--- /dev/null
+++ b/eng/resolveContract.targets
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project>
+ <PropertyGroup Condition="'$(IsSourceProject)' == 'true'">
+ <ContractProject Condition="'$(ContractProject)' == ''">$(SourceDir)/$(MSBuildProjectName)/ref/$(MSBuildProjectName).csproj</ContractProject>
+ <HasMatchingContract Condition="'$(HasMatchingContract)' == '' and Exists('$(ContractProject)')">true</HasMatchingContract>
+ <ContractAssemblyPath Condition="'$(ContractAssemblyPath)' == ''">$(ContractOutputPath)/$(MSBuildProjectName).dll</ContractAssemblyPath>
+ </PropertyGroup>
+
+ <ItemGroup Condition="'$(HasMatchingContract)' == 'true'">
+ <ResolvedMatchingContract Condition="Exists('$(ContractAssemblyPath)')" Include="$(ContractAssemblyPath)" />
+ <!-- If the contract doesn't exist in the default contract output path add a project reference to the contract project to resolve -->
+ <ProjectReference Condition="'@(ResolvedMatchingContract)' == ''" Include="$(ContractProject)">
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ <OutputItemType>ResolvedMatchingContract</OutputItemType>
+ </ProjectReference>
+ </ItemGroup>
+
+ <!-- intentionally empty since we no longer need a target -->
+ <Target Name="ResolveMatchingContract" />
+
+ <Target Name="VerifyMatchingContract" AfterTargets="ResolveReferences">
+ <Error Condition="'$(HasMatchingContract)' == 'true' and !Exists('%(ResolvedMatchingContract.Identity)')" Text="ResolveMatchingContract could not find a matching contract '%(ResolvedMatchingContract.Identity)' not found." />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/src/libraries/System.Drawing.Design.Primitives/ref/System.Drawing.Design.Primitives.cs b/src/libraries/System.Drawing.Design.Primitives/ref/System.Drawing.Design.Primitives.cs
index 2849bc37c10..a6198e40f0a 100644
--- a/src/libraries/System.Drawing.Design.Primitives/ref/System.Drawing.Design.Primitives.cs
+++ b/src/libraries/System.Drawing.Design.Primitives/ref/System.Drawing.Design.Primitives.cs
@@ -113,7 +113,6 @@ namespace System.Drawing.Design
public System.ComponentModel.IComponent[] CreateComponents(System.ComponentModel.Design.IDesignerHost host, System.Collections.IDictionary defaultValues) { throw null; }
protected virtual System.ComponentModel.IComponent[] CreateComponentsCore(System.ComponentModel.Design.IDesignerHost host) { throw null; }
protected virtual System.ComponentModel.IComponent[] CreateComponentsCore(System.ComponentModel.Design.IDesignerHost host, System.Collections.IDictionary defaultValues) { throw null; }
- protected virtual void Deserialize(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public override bool Equals(object obj) { throw null; }
protected virtual object FilterPropertyValue(string propertyName, object value) { throw null; }
public override int GetHashCode() { throw null; }
@@ -123,7 +122,6 @@ namespace System.Drawing.Design
public virtual void Lock() { }
protected virtual void OnComponentsCreated(System.Drawing.Design.ToolboxComponentsCreatedEventArgs args) { }
protected virtual void OnComponentsCreating(System.Drawing.Design.ToolboxComponentsCreatingEventArgs args) { }
- protected virtual void Serialize(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public override string ToString() { throw null; }
protected void ValidatePropertyType(string propertyName, object value, System.Type expectedType, bool allowNull) { }