Skip to content

Commit cedf4d0

Browse files
jpobstpjcollins
andauthored
[build] Convert more projects to Short-Form projects (#547)
Bulk translate various `.csproj` files to [Short-Form Projects][0]: * Remove `packages.config`, replace with `@(PackageReference)`. * Set `$(AppendTargetFrameworkToOutputPath)`=False so that we preserve the existing directory structure. * Remove `Mono.Options-PCL.cs`, replaced by `Mono.Options` NuGet. * `JdkInfo.props` doesn't exist when doing preparation via the xamarin-android repo, so ignore it if it doesn't exist yet. [0]: https://docs.microsoft.com/en-us/dotnet/core/tools/csproj#additions Co-authored-by: Peter Collins <[email protected]>
1 parent bd7c60a commit cedf4d0

File tree

32 files changed

+113
-3378
lines changed

32 files changed

+113
-3378
lines changed

build-tools/automation/azure-pipelines.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
- script: |
9898
r=0
9999
make run-all-tests CONFIGURATION=$(Build.Configuration) || r=$?
100-
jar cf xatb.jar -C src/Xamarin.Android.Tools.Bytecode/Tests/obj/*/classes .
100+
jar cf xatb.jar -C tests/Xamarin.Android.Tools.Bytecode-Tests/obj/*/classes .
101101
zip -r bin.zip bin
102102
exit $r
103103
displayName: Run Tests

samples/Hello/Hello.csproj

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,16 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
33
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>8.0.30703</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{F3ECB73D-9263-4E42-A5B4-3FC0D1D829F9}</ProjectGuid>
4+
<TargetFramework>net472</TargetFramework>
95
<OutputType>Exe</OutputType>
10-
<RootNamespace>Hello</RootNamespace>
11-
<AssemblyName>Hello</AssemblyName>
12-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
13-
</PropertyGroup>
14-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
15-
<DebugSymbols>true</DebugSymbols>
16-
<DebugType>full</DebugType>
17-
<Optimize>false</Optimize>
18-
<OutputPath>..\..\bin\TestDebug</OutputPath>
19-
<DefineConstants>DEBUG;</DefineConstants>
20-
<ErrorReport>prompt</ErrorReport>
21-
<WarningLevel>4</WarningLevel>
22-
<Externalconsole>true</Externalconsole>
23-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
24-
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<DebugType>full</DebugType>
27-
<Optimize>true</Optimize>
28-
<OutputPath>..\..\bin\TestRelease</OutputPath>
29-
<ErrorReport>prompt</ErrorReport>
30-
<WarningLevel>4</WarningLevel>
31-
<Externalconsole>true</Externalconsole>
6+
<OutputPath>..\..\bin\Test$(Configuration)</OutputPath>
7+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
328
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
339
</PropertyGroup>
10+
3411
<ItemGroup>
35-
<Reference Include="System" />
36-
</ItemGroup>
37-
<ItemGroup>
38-
<Compile Include="Program.cs" />
39-
<Compile Include="Properties\AssemblyInfo.cs" />
40-
</ItemGroup>
41-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
42-
<ItemGroup>
43-
<ProjectReference Include="..\..\src\Java.Interop\Java.Interop.csproj">
44-
<Project>{94BD81F7-B06F-4295-9636-F8A3B6BDC762}</Project>
45-
<Name>Java.Interop</Name>
46-
</ProjectReference>
47-
<ProjectReference Include="..\..\src\Java.Runtime.Environment\Java.Runtime.Environment.csproj">
48-
<Project>{5887B410-D448-4257-A46B-EAC03C80BE93}</Project>
49-
<Name>Java.Runtime.Environment</Name>
50-
</ProjectReference>
12+
<ProjectReference Include="..\..\src\Java.Interop\Java.Interop.csproj" />
13+
<ProjectReference Include="..\..\src\Java.Runtime.Environment\Java.Runtime.Environment.csproj" />
5114
</ItemGroup>
52-
</Project>
15+
16+
</Project>

samples/Hello/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/Java.Interop.Dynamic/Java.Interop.Dynamic.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<Company>Microsoft Corporation</Company>
1111
<Copyright>Microsoft Corporation</Copyright>
1212
<AssemblyVersion>0.1.0.0</AssemblyVersion>
13+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1314
</PropertyGroup>
1415
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1516
<OutputPath>..\..\bin\Debug</OutputPath>

src/Java.Interop.Export/Java.Interop.Export.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<Company>Microsoft Corporation</Company>
1010
<Copyright>Microsoft Corporation</Copyright>
1111
<AssemblyVersion>0.1.0.0</AssemblyVersion>
12+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1213
</PropertyGroup>
1314
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1415
<OutputPath>..\..\bin\Debug</OutputPath>

src/Java.Interop.GenericMarshaler/Java.Interop.GenericMarshaler.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<Company>Microsoft Corporation</Company>
1111
<Copyright>Microsoft Corporation</Copyright>
1212
<AssemblyVersion>0.1.0.0</AssemblyVersion>
13+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1314
</PropertyGroup>
1415
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1516
<OutputPath>..\..\bin\Debug</OutputPath>

src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
56
</PropertyGroup>
67

78
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
56
</PropertyGroup>
67

78
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

src/Java.Interop/Java.Interop.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<DefineConstants>INTEROP;FEATURE_JNIENVIRONMENT_JI_PINVOKES;FEATURE_JNIOBJECTREFERENCE_INTPTRS;INTERNAL_NULLABLE_ATTRIBUTES</DefineConstants>
99
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1010
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
11+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1112
</PropertyGroup>
1213
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1314
<OutputPath>..\..\bin\Debug</OutputPath>

src/Xamarin.Android.Tools.AnnotationSupport.Cecil/Xamarin.Android.Tools.AnnotationSupport.Cecil.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
56
</PropertyGroup>
67

78
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

0 commit comments

Comments
 (0)