Skip to content

Commit

Permalink
Initial updates for .net standard
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-cpp authored and cwensley committed Jan 12, 2018
1 parent c3ccc9f commit e5fca9f
Show file tree
Hide file tree
Showing 79 changed files with 38,291 additions and 2,270 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ AppPackages
packages/
.vs/
[Tt]humbs.db
artifacts
2 changes: 1 addition & 1 deletion Resources/help/Help.shfbproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<Language>en-US</Language>
<HelpFileFormat>Website</HelpFileFormat>
<DocumentationSources>
<DocumentationSource sourceFile="..\..\Source\Eto\Eto - pcl.csproj" />
<DocumentationSource sourceFile="..\..\Source\Eto\Eto.csproj" />
</DocumentationSources>
<HelpTitle>Eto.Forms documentation</HelpTitle>
<PresentationStyle>VS2013</PresentationStyle>
Expand Down
9 changes: 0 additions & 9 deletions Source/.nuget/NuGet.Config

This file was deleted.

Binary file removed Source/.nuget/NuGet.exe
Binary file not shown.
178 changes: 0 additions & 178 deletions Source/.nuget/NuGet.targets

This file was deleted.

4 changes: 0 additions & 4 deletions Source/.nuget/packages.config

This file was deleted.

23 changes: 23 additions & 0 deletions Source/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project>
<PropertyGroup>
<XamarinMacPath>\Library\Frameworks\Xamarin.Mac.framework\Versions\Current</XamarinMacPath>
<XamarinMacLibPath>$(XamarinMacPath)/lib/mono</XamarinMacLibPath>
<!-- Prevent VS2015 from copying files from the GAC to the output folder -->
<DoNotCopyLocalIfInGac>true</DoNotCopyLocalIfInGac>
<BasePath>$(MSBuildThisFileDirectory)..\</BasePath>
<BaseIntermediateOutputPath>$(BasePath)artifacts\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Deterministic>False</Deterministic>
<!-- RestoreProjectStyle will be supported in VS for Mac 7.4 -->
<RestoreProjectStyle Condition="$(UsePackagesConfig) != 'True'">PackageReference</RestoreProjectStyle>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'portable45-net45+win8+wpa81+wp8'">
<TargetFrameworkIdentifier Condition="$(TargetFrameworkIdentifier) == ''">.NETPortable</TargetFrameworkIdentifier>
<TargetFrameworkVersion Condition="$(TargetFrameworkVersion) == ''">v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile Condition="$(TargetFrameworkProfile) == ''">Profile259</TargetFrameworkProfile>
<OutputPath>$(OutputPath)\portable259</OutputPath>
</PropertyGroup>
<Import Condition="Exists('$(BasePath)..\Eto.Common.props')" Project="$(BasePath)..\Eto.Common.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" Condition="$(TargetFrameworkIdentifier) == '.NETPortable'" />
</Project>
68 changes: 68 additions & 0 deletions Source/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project>
<PropertyGroup>
<BuildDependsOn>
_SetAssemblySearchPaths;
$(BuildDependsOn);
</BuildDependsOn>
</PropertyGroup>
<Target Name="_SetAssemblySearchPaths" Condition="$(CustomAssemblySearchPaths) != ''">
<CreateProperty Value="$(CustomAssemblySearchPaths);$(AssemblySearchPaths)">
<Output TaskParameter="Value" PropertyName="AssemblySearchPaths" />
</CreateProperty>
</Target>
<UsingTask TaskName="_GetCommonFiles" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Files ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="true" />
<Names ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="true" />
<Result ParameterType="Microsoft.Build.Framework.ITaskItem[]" Output="true" />
</ParameterGroup>
<Task>
<Code Type="Fragment" Language="cs"><![CDATA[
var result = new List<ITaskItem>();
foreach (var fileItem in Files)
{
string name = fileItem.GetMetadata("Filename");
//Log.LogMessage(MessageImportance.High, "This one: " + name);
foreach (var nameItem in Names)
{
if (string.Equals(name, nameItem.ItemSpec, StringComparison.OrdinalIgnoreCase))
{
result.Add(new TaskItem(fileItem.ItemSpec));
break;
}
}
}
Result = result.ToArray();
]]></Code>
</Task>
</UsingTask>
<Target Name="_EmbedReferencedAssemblies" Condition="$(EmbedReferences) != ''" AfterTargets="ResolveAssemblyReferences">
<PropertyGroup>
<EmbedDebugSymbols Condition="$(EmbedDebugSymbols) == ''">false</EmbedDebugSymbols>
<EmbedPrefix Condition="$(EmbedPrefix) == ''">References</EmbedPrefix>
<EmbedPrefix>$(EmbedPrefix).</EmbedPrefix>
</PropertyGroup>
<!-- Embed only specified references -->
<_GetCommonFiles Files="@(ReferencePath)" Names="$(EmbedReferences)" Condition="$(EmbedReferences) != 'True'">
<Output ItemName="EmbedReferences" TaskParameter="Result" />
</_GetCommonFiles>
<ItemGroup>
<!-- Embed all copy local references -->
<EmbedReferences Include="@(ReferenceCopyLocalPaths)" Condition="$(EmbedReferences) == 'True'" />
<!-- Find files to embed and exclude -->
<FilesToEmbed Include="@(EmbedReferences)" Condition="'%(EmbedReferences.Extension)' == '.dll'" />
<FilesToEmbed Include="@(EmbedReferences)" Condition="$(EmbedDebugSymbols) == 'True' AND '%(EmbedReferences.Extension)' == '.pdb'" />
<FilesToExclude Include="@(EmbedReferences)" Condition="$(EmbedDebugSymbols) != 'True' AND '%(EmbedReferences.Extension)' == '.pdb'" />
<FilesToExclude Include="@(EmbedReferences)" Condition="'%(EmbedReferences.Extension)' == '.xml'" />
<EmbeddedResource Include="@(FilesToEmbed)">
<LogicalName>$(EmbedPrefix)%(FilesToEmbed.DestinationSubDirectory)%(FilesToEmbed.Filename)%(FilesToEmbed.Extension)</LogicalName>
</EmbeddedResource>
<!-- no need to copy the assemblies locally anymore -->
<ReferenceCopyLocalPaths Remove="@(FilesToEmbed)" />
<ReferenceCopyLocalPaths Remove="@(FilesToExclude)" />
</ItemGroup>
<Message Importance="high" Text="Embedding: @(FilesToEmbed->'%(Filename)%(Extension)', ', ')" />
</Target>
<Import Condition="Exists('$(BasePath)..\Eto.Common.targets')" Project="$(BasePath)..\Eto.Common.targets" />
</Project>
Loading

0 comments on commit e5fca9f

Please sign in to comment.