Skip to content

Commit c6630e7

Browse files
committed
Clean up msbuild, include pkg.json
1 parent f6c0d91 commit c6630e7

File tree

7 files changed

+64
-68
lines changed

7 files changed

+64
-68
lines changed

DSPythonNet3/DSPythonNet3.csproj

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,10 @@
33
<ProjectGuid>{F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}</ProjectGuid>
44
<OutputType>Library</OutputType>
55
<AppDesignerFolder>Properties</AppDesignerFolder>
6-
<RootNamespace>DSPythonNet3</RootNamespace>
7-
<AssemblyName>DSPythonNet3</AssemblyName>
8-
<OutputPath>$(SolutionDir)\package_output\DSPythonNet3\extra\</OutputPath>
9-
<DotNet>net8.0</DotNet>
10-
<TargetFramework>$(DotNet)</TargetFramework>
11-
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
12-
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
13-
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
14-
</PropertyGroup>
15-
<PropertyGroup>
6+
<OutputPath>$(BuildOutput)extra\</OutputPath>
7+
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
168
<NoWarn>MSB3539;CS1591;NUnit2005;NUnit2007;CS0618;CS0612;CS0672</NoWarn>
179
</PropertyGroup>
18-
<ItemGroup>
19-
<PackageReference Include="DynamoVisualProgramming.Core" Version="3.4.0-beta6616" ExcludeAssets="runtime" />
20-
<PackageReference Include="DynamoVisualProgramming.DynamoServices" Version="3.4.0-beta6616" ExcludeAssets="runtime" />
21-
<PackageReference Include="pythonnet" Version="3.1.0-preview-ADSK-*" />
22-
</ItemGroup>
2310
<ItemGroup>
2411
<Reference Include="Python.Deployment">
2512
<HintPath>..\extern\Python\Python.Deployment.dll</HintPath>
@@ -29,6 +16,12 @@
2916
<HintPath>..\extern\Python\Python.Included.dll</HintPath>
3017
<Private>True</Private>
3118
</Reference>
19+
<InternalsVisibleTo Include="PythonMigrationViewExtension" />
20+
<InternalsVisibleTo Include="DynamoPythonTests" />
21+
22+
<PackageReference Include="DynamoVisualProgramming.Core" Version="$(DynamoPackageVersion)" ExcludeAssets="runtime" />
23+
<PackageReference Include="DynamoVisualProgramming.DynamoServices" Version="$(DynamoPackageVersion)" ExcludeAssets="runtime" />
24+
<PackageReference Include="pythonnet" Version="3.1.0-preview-ADSK-*" />
3225
</ItemGroup>
3326
<ItemGroup>
3427
<Compile Update="Properties\Resources.Designer.cs">
@@ -52,4 +45,15 @@
5245
<LastGenOutput>Resources.en-US.Designer.cs</LastGenOutput>
5346
</EmbeddedResource>
5447
</ItemGroup>
55-
</Project>
48+
<ItemGroup>
49+
<None Update="pkg.json">
50+
<TargetPath>..\%(Filename)%(Extension)</TargetPath>
51+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
52+
</None>
53+
</ItemGroup>
54+
55+
<Target Name="PrepareExtension" AfterTargets="AfterBuild">
56+
<WriteLinesToFile File="$(BuildOutput)pkg.json" Lines="$([System.IO.File]::ReadAllText($(BuildOutput)pkg.json).Replace('$Version$','$(Version)').Replace('$DynamoVersion$','$(DynamoVersion)').Replace('$DllVersion$','$(MS_PACKAGE_VERSION)'))" Overwrite="true" Encoding="Unicode" />
57+
</Target>
58+
59+
</Project>

DSPythonNet3/Properties/AssemblyInfo.cs

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

pkg.json renamed to DSPythonNet3/pkg.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"license": "MIT",
33
"file_hash": null,
44
"name": "DSPythonNet3",
5-
"version": "1.0.0",
5+
"version": "$Version$",
66
"description": "***This is PythonNet3 version***",
77
"group": "",
88
"keywords": [
@@ -13,14 +13,14 @@
1313
"dependencies": [],
1414
"host_dependencies": [],
1515
"contents": "",
16-
"engine_version": "3.3.0.5104",
16+
"engine_version": "$DynamoVersion$",
1717
"engine": "dynamo",
1818
"engine_metadata": "",
1919
"site_url": "https://dynamobim.org/",
2020
"repository_url": "https://github.com/DynamoDS/Dynamo",
2121
"contains_binaries": true,
2222
"node_libraries": [
23-
"DSPythonNet3Empty, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
23+
"DSPythonNet3Empty, Version=$DllVersion$, Culture=neutral, PublicKeyToken=null"
2424
],
2525
"copyright_holder": "DynamoTeam",
2626
"copyright_year": "2024"

Directory.Build.props

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project>
2+
<PropertyGroup>
3+
<Company>Autodesk, Inc</Company>
4+
<Owners>$(Company)</Owners>
5+
<Authors>Dynamo</Authors>
6+
<Product>Dynamo</Product>
7+
<Copyright>Copyright © Autodesk, Inc 2024</Copyright>
8+
9+
<TargetFramework>net8.0</TargetFramework>
10+
<ImplicitUsings>enable</ImplicitUsings>
11+
<Nullable>enable</Nullable>
12+
13+
<!-- Using `VersionPrefix` allows specifying a `version-suffix` argument when packing for beta releases. -->
14+
<VersionPrefix>1.4.0</VersionPrefix>
15+
<DynamoPackageVersion>3.4.0-beta6616</DynamoPackageVersion>
16+
<DynamoVersion>3.4</DynamoVersion>
17+
18+
<!--Aids in code analysis.-->
19+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
20+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
21+
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
22+
<BuildOutput>$(SolutionDir)\package_output\DSPythonNet3\</BuildOutput>
23+
</PropertyGroup>
24+
</Project>

DynamoPythonNet3.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DSPythonNet3", "DSPythonNet
1111
EndProject
1212
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8C9CB9FD-F6BC-41D4-A587-0558846B4A31}"
1313
ProjectSection(SolutionItems) = preProject
14+
Directory.Build.props = Directory.Build.props
1415
nuget.config = nuget.config
1516
pipeline.yml = pipeline.yml
1617
README.md = README.md
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
3-
<PropertyGroup>
4-
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
5-
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
6-
<OutputPath>$(SolutionDir)\package_output\DSPythonNet3\bin\</OutputPath>
7-
<TargetFramework>net8.0</TargetFramework>
8-
<ImplicitUsings>enable</ImplicitUsings>
9-
<Nullable>enable</Nullable>
10-
</PropertyGroup>
11-
12-
</Project>
2+
<PropertyGroup>
3+
<OutputPath>$(BuildOutput)bin\</OutputPath>
4+
</PropertyGroup>
5+
</Project>
Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<OutputPath>$(BuildOutput)extra\</OutputPath>
4+
</PropertyGroup>
25

3-
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
5-
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
6-
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
7-
<OutputPath>$(SolutionDir)\package_output\DSPythonNet3\extra\</OutputPath>
8-
<AssemblyVersion>1.4.0</AssemblyVersion>
9-
</PropertyGroup>
10-
11-
<ItemGroup>
12-
<PackageReference Include="DynamoVisualProgramming.Core" Version="3.4.0-beta6616">
13-
<PrivateAssets>all</PrivateAssets>
14-
<ExcludeAssets></ExcludeAssets>
15-
</PackageReference>
16-
<PackageReference Include="DynamoVisualProgramming.DynamoServices" Version="3.4.0-beta6616">
17-
<PrivateAssets>all</PrivateAssets>
18-
<ExcludeAssets></ExcludeAssets>
19-
</PackageReference>
20-
</ItemGroup>
21-
22-
<ItemGroup>
23-
<None Update="DSPythonNet3Extension_ExtensionDefinition.xml">
24-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
25-
</None>
26-
</ItemGroup>
6+
<ItemGroup>
7+
<PackageReference Include="DynamoVisualProgramming.Core" Version="$(DynamoPackageVersion)" PrivateAssets="all" />
8+
<PackageReference Include="DynamoVisualProgramming.DynamoServices" Version="$(DynamoPackageVersion)" PrivateAssets="all" />
9+
</ItemGroup>
2710

11+
<ItemGroup>
12+
<None Update="DSPythonNet3Extension_ExtensionDefinition.xml">
13+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
14+
</None>
15+
</ItemGroup>
2816
</Project>

0 commit comments

Comments
 (0)