Skip to content

Commit 233004d

Browse files
authored
Migrate MSBuildTask project to SDK project (#140)
***NO_CI***
1 parent 25bb9ab commit 233004d

File tree

8 files changed

+149
-311
lines changed

8 files changed

+149
-311
lines changed
Lines changed: 75 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,75 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="$(VisualStudioVersion)" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4-
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{9B18784E-1BF2-47D1-BDD1-85B678F883F9}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>nanoFramework.Tools.MetadataProcessor.MsBuildTask</RootNamespace>
11-
<AssemblyName>nanoFramework.Tools.MetadataProcessor.MsBuildTask</AssemblyName>
12-
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<NuGetPackageImportStamp>
15-
</NuGetPackageImportStamp>
16-
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
17-
<Deterministic>true</Deterministic>
18-
<EmbedUntrackedSources>true</EmbedUntrackedSources>
19-
<ContinuousIntegrationBuild Condition="'$(TF_BUILD)' == 'true'">True</ContinuousIntegrationBuild>
20-
</PropertyGroup>
21-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
22-
<DebugSymbols>true</DebugSymbols>
23-
<DebugType>full</DebugType>
24-
<Optimize>false</Optimize>
25-
<OutputPath>bin\Debug\</OutputPath>
26-
<DefineConstants>DEBUG;TRACE</DefineConstants>
27-
<ErrorReport>prompt</ErrorReport>
28-
<WarningLevel>4</WarningLevel>
29-
</PropertyGroup>
30-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
31-
<DebugType>portable</DebugType>
32-
<Optimize>true</Optimize>
33-
<OutputPath>bin\Release\</OutputPath>
34-
<DefineConstants>TRACE</DefineConstants>
35-
<ErrorReport>prompt</ErrorReport>
36-
<WarningLevel>4</WarningLevel>
37-
</PropertyGroup>
38-
<ItemGroup>
39-
<Reference Include="Microsoft.Build.Framework" />
40-
<Reference Include="Microsoft.Build.Utilities.v4.0" />
41-
<Reference Include="System" />
42-
<Reference Include="System.Core" />
43-
<Reference Include="System.Xml.Linq" />
44-
<Reference Include="System.Data.DataSetExtensions" />
45-
<Reference Include="Microsoft.CSharp" />
46-
<Reference Include="System.Data" />
47-
<Reference Include="System.Net.Http" />
48-
<Reference Include="System.Xml" />
49-
</ItemGroup>
50-
<ItemGroup>
51-
<Compile Include="TasksConstants.cs" />
52-
<Compile Include="MetaDataProcessorTask.cs" />
53-
<Compile Include="Properties\AssemblyInfo.cs" />
54-
<Compile Include="Utilities\DebuggerHelper.cs" />
55-
</ItemGroup>
56-
<ItemGroup>
57-
<ProjectReference Include="..\MetadataProcessor.Core\MetadataProcessor.Core.csproj">
58-
<Project>{e32f7d15-2499-440c-8026-4d5ee1c5ec3a}</Project>
59-
<Name>MetadataProcessor.Core</Name>
60-
</ProjectReference>
61-
</ItemGroup>
62-
<ItemGroup>
63-
<None Include="packages.lock.json" />
64-
</ItemGroup>
65-
<ItemGroup>
66-
<PackageReference Include="Microsoft.SourceLink.GitHub">
67-
<Version>1.0.0</Version>
68-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
69-
<PrivateAssets>all</PrivateAssets>
70-
</PackageReference>
71-
<PackageReference Include="Mono.Cecil">
72-
<Version>0.11.4</Version>
73-
</PackageReference>
74-
<PackageReference Include="mustache-sharp">
75-
<Version>1.0.0</Version>
76-
</PackageReference>
77-
<PackageReference Include="Nerdbank.GitVersioning">
78-
<Version>3.4.220</Version>
79-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
80-
<PrivateAssets>all</PrivateAssets>
81-
</PackageReference>
82-
</ItemGroup>
83-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
84-
<PropertyGroup>
85-
<!-- Need to set this environment variable to use the DLL from the build -->
86-
<!-- Make sure to remove the environment variable after testing -->
87-
<!-- <PreBuildEvent>SETX NF_MDP_MSBUILDTASK_PATH $(TargetDir)</PreBuildEvent> -->
88-
</PropertyGroup>
89-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Library</OutputType>
5+
6+
<MicrosoftBuildFrameworkVersion>15.4.8</MicrosoftBuildFrameworkVersion>
7+
8+
<TargetFrameworks>net6.0;net472</TargetFrameworks>
9+
<PackageId>nanoFramework.Tools.MetadataProcessor.MsBuildTask</PackageId>
10+
<AssemblyName>nanoFramework.Tools.MetadataProcessor.MsBuildTask</AssemblyName>
11+
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
12+
<Authors>.NET nanoFramework project contributors</Authors>
13+
<Company>.NET nanoFramework</Company>
14+
<Description>This package includes the Metadata Processor build task required to build a .NET nanoFramework project with msbuild and dotnet tool.</Description>
15+
<PackageProjectUrl>https://github.com/nanoframework/metadata-processor</PackageProjectUrl>
16+
<RepositoryUrl>https://github.com/nanoframework/metadata-processor</RepositoryUrl>
17+
<RepositoryType>git</RepositoryType>
18+
<PackageIcon>nf-logo.png</PackageIcon>
19+
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
20+
<Deterministic>true</Deterministic>
21+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
22+
<ContinuousIntegrationBuild Condition="'$(TF_BUILD)' == 'true'">True</ContinuousIntegrationBuild>
23+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
24+
<IncludeSymbols>true</IncludeSymbols>
25+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
26+
</PropertyGroup>
27+
28+
<PropertyGroup>
29+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
30+
<EnableDefaultItems>false</EnableDefaultItems>
31+
<GenerateDependencyFile>false</GenerateDependencyFile>
32+
<IncludeBuildOutput>true</IncludeBuildOutput>
33+
34+
<NoPackageAnalysis>true</NoPackageAnalysis>
35+
<!-- MSBuild Task DLLs need to be versioned with every build -->
36+
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
37+
</PropertyGroup>
38+
39+
<ItemGroup>
40+
<None Include="..\assets\nf-logo.png">
41+
<Pack>True</Pack>
42+
<PackagePath></PackagePath>
43+
</None>
44+
<None Include="..\LICENSE.md">
45+
<Pack>True</Pack>
46+
<PackagePath></PackagePath>
47+
</None>
48+
<None Include="nanoFramework.Tools.MetadataProcessor.MsBuildTask.targets">
49+
<Pack>True</Pack>
50+
<PackagePath>build</PackagePath>
51+
</None>
52+
</ItemGroup>
53+
54+
<ItemGroup>
55+
<Compile Include="*.cs" />
56+
<Compile Include="Utilities/*.cs" />
57+
</ItemGroup>
58+
59+
<ItemGroup>
60+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.255">
61+
<PrivateAssets>all</PrivateAssets>
62+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
63+
</PackageReference>
64+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
65+
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" ExcludeAssets="Runtime" />
66+
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildFrameworkVersion)" ExcludeAssets="Runtime" />
67+
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
68+
<PackageReference Include="mustache-sharp" Version="1.0.0" />
69+
</ItemGroup>
70+
71+
<ItemGroup>
72+
<ProjectReference Include="..\MetadataProcessor.Core\MetadataProcessor.Core.csproj" />
73+
</ItemGroup>
74+
75+
</Project>

MetadataProcessor.MsBuildTask/Properties/AssemblyInfo.cs

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

MetadataProcessor.MsBuildTask/package.nuspec

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

MetadataProcessor.MsBuildTask/packages.lock.json

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

MetadataProcessor.Tests/MetadataProcessor.Tests.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@
9191
<Project>{e32f7d15-2499-440c-8026-4d5ee1c5ec3a}</Project>
9292
<Name>MetadataProcessor.Core</Name>
9393
</ProjectReference>
94-
<ProjectReference Include="TestNFApp\TestNFApp.nfproj">
95-
<Project>{9e5e0766-701d-4266-9eba-7b3e4338ed21}</Project>
96-
<Name>TestNFApp</Name>
97-
</ProjectReference>
9894
</ItemGroup>
9995
<ItemGroup>
10096
<PackageReference Include="Mono.Cecil">

0 commit comments

Comments
 (0)