Fixed k10 csproj generation
- Added the project k targets to KoreBuild
This commit is contained in:
parent
98cac2df27
commit
7e90d0ef32
|
|
@ -0,0 +1,21 @@
|
||||||
|
<!--
|
||||||
|
***********************************************************************************************
|
||||||
|
ProjectK.CSharp.targets
|
||||||
|
|
||||||
|
Contains common properties and targets that are shared by all v4.5 Portable Library C# projects.
|
||||||
|
|
||||||
|
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
|
||||||
|
created a backup copy. Incorrect changes to this file will make it
|
||||||
|
impossible to load or build your projects from the command-line or the IDE.
|
||||||
|
|
||||||
|
Copyright (C) Microsoft Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************
|
||||||
|
-->
|
||||||
|
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
|
||||||
|
<Import Project="ProjectK.Common.props" />
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.Targets" />
|
||||||
|
<Import Project="ProjectK.Common.targets" />
|
||||||
|
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
<!--
|
||||||
|
***********************************************************************************************
|
||||||
|
ProjectK.Common.props
|
||||||
|
|
||||||
|
Contains common properties and targets that are shared by all v4.5 Portable Library C# projects.
|
||||||
|
|
||||||
|
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
|
||||||
|
created a backup copy. Incorrect changes to this file will make it
|
||||||
|
impossible to load or build your projects from the command-line or the IDE.
|
||||||
|
|
||||||
|
Copyright (C) Microsoft Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************
|
||||||
|
-->
|
||||||
|
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- Currently we force these to override what's in the project file, but by the time
|
||||||
|
we ship, they should respect user settings -->
|
||||||
|
<TargetFrameworkIdentifier>.NETServer</TargetFrameworkIdentifier>
|
||||||
|
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
|
||||||
|
<TargetFrameworkProfile></TargetFrameworkProfile>
|
||||||
|
|
||||||
|
<TargetFrameworkMonikerDisplayName>.NET for Server</TargetFrameworkMonikerDisplayName>
|
||||||
|
|
||||||
|
<!-- Temporary until we are installed on the box under Reference Assemblies -->
|
||||||
|
<TargetFrameworkRootPath>$(MSBuildThisFileDirectory)</TargetFrameworkRootPath>
|
||||||
|
<FrameworkPathOverride>$(TargetFrameworkRootPath)</FrameworkPathOverride>
|
||||||
|
<_FullFrameworkReferenceAssemblyPaths>$(FrameworkPathOverride)</_FullFrameworkReferenceAssemblyPaths>
|
||||||
|
<_TargetFrameworkDirectories>$(FrameworkPathOverride)</_TargetFrameworkDirectories>
|
||||||
|
<NoStdLib>true</NoStdLib>
|
||||||
|
|
||||||
|
<!-- Automatically reference all assemblies in the target framework -->
|
||||||
|
<ImplicitlyExpandTargetFramework Condition="'$(ImplicitlyExpandTargetFramework)' == '' ">true</ImplicitlyExpandTargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- Redefine AssemblySearchPaths to exclude {AssemblyFolders} and {GAC}, these represent .NET-specific locations -->
|
||||||
|
<PropertyGroup>
|
||||||
|
<AssemblySearchPaths Condition="'$(AssemblySearchPaths)' == ''">
|
||||||
|
{CandidateAssemblyFiles};
|
||||||
|
$(ReferencePath);
|
||||||
|
{HintPathFromItem};
|
||||||
|
{TargetFrameworkDirectory};
|
||||||
|
{Registry:$(FrameworkRegistryBase),$(TargetFrameworkVersion),$(AssemblyFoldersSuffix)$(AssemblyFoldersExConditions)};
|
||||||
|
{RawFileName};
|
||||||
|
$(OutDir)
|
||||||
|
</AssemblySearchPaths>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
<!--
|
||||||
|
***********************************************************************************************
|
||||||
|
ProjectK.Common.targets
|
||||||
|
|
||||||
|
Contains common properties and targets that are shared by all v4.5 Portable Library C# projects.
|
||||||
|
|
||||||
|
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
|
||||||
|
created a backup copy. Incorrect changes to this file will make it
|
||||||
|
impossible to load or build your projects from the command-line or the IDE.
|
||||||
|
|
||||||
|
Copyright (C) Microsoft Corporation. All rights reserved.
|
||||||
|
***********************************************************************************************
|
||||||
|
-->
|
||||||
|
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
The ImplicitlyExpandTargetFramework target will expand all
|
||||||
|
of the dll reference assemblies in the TargetFrameworkDirectory
|
||||||
|
for the project and place the items into the ReferencePath itemgroup
|
||||||
|
which contains resolved items.
|
||||||
|
-->
|
||||||
|
<PropertyGroup>
|
||||||
|
<ResolveReferencesDependsOn>
|
||||||
|
$(ResolveReferencesDependsOn);
|
||||||
|
ImplicitlyExpandTargetFramework;
|
||||||
|
</ResolveReferencesDependsOn>
|
||||||
|
|
||||||
|
<ImplicitlyExpandTargetFrameworkDependsOn>
|
||||||
|
$(ImplicitlyExpandTargetFrameworkDependsOn);
|
||||||
|
GetReferenceAssemblyPaths
|
||||||
|
</ImplicitlyExpandTargetFrameworkDependsOn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="ImplicitlyExpandTargetFramework"
|
||||||
|
Condition="'$(ImplicitlyExpandTargetFramework)' == 'true'"
|
||||||
|
DependsOnTargets="$(ImplicitlyExpandTargetFrameworkDependsOn)"
|
||||||
|
>
|
||||||
|
<ItemGroup>
|
||||||
|
<ReferenceAssemblyPaths Include="$(_TargetFrameworkDirectories)"/>
|
||||||
|
<ReferencePath Include="%(ReferenceAssemblyPaths.Identity)*.dll">
|
||||||
|
<WinMDFile>false</WinMDFile>
|
||||||
|
<CopyLocal>false</CopyLocal>
|
||||||
|
<ReferenceGroupingDisplayName>$(TargetFrameworkMonikerDisplayName)</ReferenceGroupingDisplayName>
|
||||||
|
<ReferenceGrouping>$(TargetFrameworkIdentifier),$(TargetFrameworkVersion)</ReferenceGrouping>
|
||||||
|
<ResolvedFrom>ImplicitlyExpandTargetFramework</ResolvedFrom>
|
||||||
|
<IsSystemReference>True</IsSystemReference>
|
||||||
|
</ReferencePath>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Message Importance="Low" Text="TargetMonikerDisplayName: $(TargetFrameworkMonikerDisplayName) ReferenceAssemblyPaths: @(ReferenceAssemblyPaths)"/>
|
||||||
|
|
||||||
|
<Message Importance="Low" Text="Including @(ReferencePath)"
|
||||||
|
Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandTargetFramework'"/>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<_ResolveAssemblyReferenceResolvedFiles Include="@(ReferencePath)"
|
||||||
|
Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandTargetFramework'"/>
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
</Project>
|
||||||
|
|
@ -500,35 +500,7 @@ functions
|
||||||
|
|
||||||
private static string GetProjectKTargets(string packagesDir)
|
private static string GetProjectKTargets(string packagesDir)
|
||||||
{
|
{
|
||||||
Func<string, long> getVersion = version => {
|
return Path.Combine(packagesDir, "KoreBuild", "build", "ProjectK.CSharp.targets");
|
||||||
var dash = version.LastIndexOf('-');
|
|
||||||
|
|
||||||
if(dash != -1)
|
|
||||||
{
|
|
||||||
var lastToken = version.Substring(dash + 1);
|
|
||||||
|
|
||||||
if(lastToken.StartsWith("t"))
|
|
||||||
{
|
|
||||||
return Int64.Parse(lastToken.Substring(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
return Int64.Parse(lastToken);
|
|
||||||
}
|
|
||||||
return Int64.MaxValue;
|
|
||||||
};
|
|
||||||
|
|
||||||
var projectK = Directory.GetDirectories(packagesDir, "ProjectK*")
|
|
||||||
.Select(p => new { Path = p, Build = getVersion(p) })
|
|
||||||
.OrderByDescending(p => p.Build)
|
|
||||||
.FirstOrDefault();
|
|
||||||
|
|
||||||
if (projectK == null)
|
|
||||||
{
|
|
||||||
Warn("Project K targets aren't installed");
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
return Path.Combine("..", "..", projectK.Path.Substring(projectK.Path.IndexOf("packages")), "Framework\\K\\v1.0\\ProjectK.CSharp.targets");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetProjectFileName(string projectName, string config)
|
private static string GetProjectFileName(string projectName, string config)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue