Skip to content

Commit 1aeb3a8

Browse files
benvillalobosbaronfel
authored andcommitted
Create packaging project (#157)
1 parent 17c9efb commit 1aeb3a8

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Test.Microsoft.NET.Build.Containers.Filesystem/Evaluator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private static string CombineFiles(string propsFile, string targetsFile)
2424
public static void LocateMSBuild(TestContext ctx)
2525
{
2626
var instances = MSBuildLocator.RegisterDefaults();
27-
var relativePath = Path.Combine("..", "Microsoft.NET.Build.Containers", "build", "Microsoft.NET.Build.Containers.targets");
27+
var relativePath = Path.Combine("..", "packaging", "build", "Microsoft.NET.Build.Containers.targets");
2828
var targetsFile = CurrentFile.Relative(relativePath);
2929
var propsFile = Path.ChangeExtension(targetsFile, ".props");
3030
CombinedTargetsLocation = CombineFiles(propsFile, targetsFile);
@@ -46,7 +46,7 @@ public static (Project, CapturingLogger?) InitProject(Dictionary<string, string>
4646
props["Version"] = "1.0.0"; // TODO: need to test non-compliant version strings here
4747

4848
// test setup parameters so that we can load the props/targets/tasks
49-
props["CustomTasksAssembly"] = Path.GetFullPath(Path.Combine(".", "Microsoft.NET.Build.Containers.dll"));
49+
props["ContainerCustomTasksAssembly"] = Path.GetFullPath(Path.Combine(".", "Microsoft.NET.Build.Containers.dll"));
5050
props["_IsTest"] = "true";
5151
var loggers = new List<ILogger>
5252
{

packaging/build/Microsoft.NET.Build.Containers.props

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
<PropertyGroup>
33
<!-- A flag representing this package existing in a project. -->
44
<SDKContainerSupportEnabled>true</SDKContainerSupportEnabled>
5-
<taskFoldername>tasks</taskFoldername>
6-
<taskFramework Condition="'$(MSBuildRuntimeType)' == 'Core'">net7.0</taskFramework>
7-
<taskFramework Condition="'$(MSBuildRuntimeType)' == 'Full'">net472</taskFramework>
5+
<ContainerTaskFolderName>tasks</ContainerTaskFolderName>
6+
<ContainerTaskFramework Condition="'$(MSBuildRuntimeType)' == 'Core'">net7.0</ContainerTaskFramework>
7+
<ContainerTaskFramework Condition="'$(MSBuildRuntimeType)' == 'Full'">net472</ContainerTaskFramework>
88
<ContainerizeFolderName>containerize</ContainerizeFolderName>
99
<!--The folder where the custom task will be present. It points to inside the nuget package. -->
10-
<CustomTasksFolder>$(MSBuildThisFileDirectory)..\$(taskFoldername)\$(taskFramework)\</CustomTasksFolder>
10+
<ContainerCustomTasksFolder>$(MSBuildThisFileDirectory)..\$(ContainerTaskFolderName)\$(ContainerTaskFramework)\</ContainerCustomTasksFolder>
1111
<ContainerizeFolder>$(MSBuildThisFileDirectory)..\$(ContainerizeFolderName)\</ContainerizeFolder>
1212
<!--Reference to the assembly which contains the MSBuild Task-->
13-
<CustomTasksAssembly Condition="'$(CustomTasksAssembly)' == ''">$(CustomTasksFolder)$(MSBuildThisFileName).dll</CustomTasksAssembly>
13+
<ContainerCustomTasksAssembly Condition="'$(ContainerCustomTasksAssembly)' == ''">$(ContainerCustomTasksFolder)$(MSBuildThisFileName).dll</ContainerCustomTasksAssembly>
1414
</PropertyGroup>
1515

1616
<!--Register our custom task-->
17-
<UsingTask TaskName="$(MSBuildThisFileName).Tasks.ParseContainerProperties" AssemblyFile="$(CustomTasksAssembly)"/>
18-
<UsingTask TaskName="$(MSBuildThisFileName).Tasks.CreateNewImage" AssemblyFile="$(CustomTasksAssembly)"/>
19-
</Project>
17+
<UsingTask TaskName="$(MSBuildThisFileName).Tasks.CreateNewImage" AssemblyFile="$(ContainerCustomTasksAssembly)"/>
18+
<UsingTask TaskName="$(MSBuildThisFileName).Tasks.ParseContainerProperties" AssemblyFile="$(ContainerCustomTasksAssembly)"/>
19+
</Project>

packaging/package.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@
7070
<Copy SourceFiles="$(OutDir)../Microsoft.NET.Build.Containers.$(Version).nupkg"
7171
DestinationFiles="../Test.Microsoft.NET.Build.Containers.Filesystem/package/Microsoft.NET.Build.Containers.$(Version).nupkg" />
7272
</Target>
73-
</Project>
73+
</Project>

0 commit comments

Comments
 (0)