Skip to content

Commit 3240e8a

Browse files
committed
Add solution file and make the build script more robust
1 parent f022f9f commit 3240e8a

File tree

3 files changed

+48
-8
lines changed

3 files changed

+48
-8
lines changed

build_netfx_loader.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
S=`dirname $0`
44
P=netfx_loader/
5-
O=clr_loader/ffi/dlls/
5+
O=$S/clr_loader/ffi/dlls/
66

7-
dotnet build $P -r win-x86 -o $O/x86
8-
dotnet build $P -r win-x64 -o $O/amd64
7+
mkdir -p "$O" || exit -1
8+
9+
dotnet build "$P" -r win-x86 -o "$O/x86" || exit -1
10+
dotnet build "$P" -r win-x64 -o "$O/amd64" || exit -1

netfx_loader/ClrLoader.csproj

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>net47</TargetFrameworks>
4-
<Platforms>x64;x86</Platforms>
4+
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="NXports" Version="0.2.0-dev" />
9-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2">
8+
<PackageReference Include="NXports" Version="0.2.0" />
9+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Condition="$(MSBuildRuntimeType) == 'Core'">
10+
<Version>1.0.0-preview.2</Version>
1011
<PrivateAssets>all</PrivateAssets>
1112
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
1213
</PackageReference>
1314
</ItemGroup>
1415

15-
<PropertyGroup Condition=" '$(Platform)' == 'x86'">
16+
<PropertyGroup Condition=" '$(RuntimeIdentifier)' == 'win-x86'">
1617
<PlatformTarget>x86</PlatformTarget>
1718
</PropertyGroup>
18-
<PropertyGroup Condition=" '$(Platform)' == 'x64'">
19+
<PropertyGroup Condition=" '$(RuntimeIdentifier)' == 'win-x64'">
1920
<PlatformTarget>x64</PlatformTarget>
2021
</PropertyGroup>
2122
</Project>

netfx_loader/ClrLoader.sln

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29418.71
5+
MinimumVisualStudioVersion = 15.0.26124.0
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClrLoader", "ClrLoader.csproj", "{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionProperties) = preSolution
10+
HideSolutionNode = FALSE
11+
EndGlobalSection
12+
GlobalSection(ExtensibilityGlobals) = postSolution
13+
SolutionGuid = {AEFFF002-4CD2-491F-9BDE-785AF6F1021E}
14+
EndGlobalSection
15+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16+
Debug|Any CPU = Debug|Any CPU
17+
Debug|x64 = Debug|x64
18+
Debug|x86 = Debug|x86
19+
Release|Any CPU = Release|Any CPU
20+
Release|x64 = Release|x64
21+
Release|x86 = Release|x86
22+
EndGlobalSection
23+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
24+
{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}.Debug|Any CPU.ActiveCfg = Debug|x64
25+
{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}.Debug|Any CPU.Build.0 = Debug|x64
26+
{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}.Debug|x64.ActiveCfg = Debug|x64
27+
{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}.Debug|x64.Build.0 = Debug|x64
28+
{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}.Debug|x86.ActiveCfg = Debug|x86
29+
{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}.Debug|x86.Build.0 = Debug|x86
30+
{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}.Release|Any CPU.ActiveCfg = Release|x64
31+
{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}.Release|Any CPU.Build.0 = Release|x64
32+
{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}.Release|x64.ActiveCfg = Release|x64
33+
{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}.Release|x64.Build.0 = Release|x64
34+
{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}.Release|x86.ActiveCfg = Release|x86
35+
{DE15B0BD-C44B-44CD-980D-3A975D7AAFA3}.Release|x86.Build.0 = Release|x86
36+
EndGlobalSection
37+
EndGlobal

0 commit comments

Comments
 (0)