Skip to content

Commit

Permalink
Ported SampleCsUserData to Rhino 8, .NET7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dalefugier committed Sep 16, 2024
1 parent 4a3f456 commit 9ba5021
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

namespace SampleCsUserData.Commands
{
[System.Runtime.InteropServices.Guid("38868ab0-cef1-4b61-ab53-45ef4d450027")]
public class SampleCsAddBrepFaceUserData : Command
{
public override string EnglishName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace SampleCsUserData.Commands
{
[System.Runtime.InteropServices.Guid("d8f14956-165c-4c22-9f2d-93db2b8e108d")]
public class SampleCsAddLayerUserData : Command
{
public override string EnglishName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace SampleCsUserData.Commands
{
[System.Runtime.InteropServices.Guid("dd97883a-077d-4ea3-9848-8752ac40339b")]
public class SampleCsAddSimpleDocumentData : Command
{
public override string EnglishName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace SampleCsUserData.Commands
{
[System.Runtime.InteropServices.Guid("2adff73e-30b1-4ded-80d0-6eae56d8a790")]
public class SampleCsDocumentDictionary : Command
{
private const string INTEGER_VALUE = "INT";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace SampleCsUserData.Commands
{
[System.Runtime.InteropServices.Guid("59f0cc43-3019-41ae-b65b-87e1fbadfba3")]
public class SampleCsModifyUserData : Command
{
public override string EnglishName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

namespace SampleCsUserData.Commands
{
[System.Runtime.InteropServices.Guid("075db042-a92e-40f4-8ca2-5b9c9e243334")]
public class SampleCsQueryLayerUserData : Command
{
public override string EnglishName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

namespace SampleCsUserData.Commands
{
[System.Runtime.InteropServices.Guid("171d4a92-600b-485c-9629-d5648a878600")]
public class SampleCsQueryUserData : Command
{
public override string EnglishName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

namespace SampleCsUserData.Commands
{
[System.Runtime.InteropServices.Guid("60fcd171-d0a4-4184-b2a4-22dc2e9c1ebe")]
public class SampleCsRemoveUserData : Command
{
public override string EnglishName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

namespace SampleCsUserData.Commands
{
[System.Runtime.InteropServices.Guid("e4653aad-b0e8-4b4b-b94a-7dedb64dc501")]
public class SampleCsStringTable : Command
{
public override string EnglishName
Expand Down
48 changes: 0 additions & 48 deletions rhinocommon/cs/SampleCsUserData/Properties/AssemblyInfo.cs

This file was deleted.

14 changes: 14 additions & 0 deletions rhinocommon/cs/SampleCsUserData/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"profiles": {
"Rhino 8 (net7.0)": {
"commandName": "Executable",
"executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe",
"commandLineArgs": "/netcore"
},
"Rhino 8 net48)": {
"commandName": "Executable",
"executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe",
"commandLineArgs": "/netfx"
}
}
}
101 changes: 22 additions & 79 deletions rhinocommon/cs/SampleCsUserData/SampleCsUserData.csproj
Original file line number Diff line number Diff line change
@@ -1,89 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug32</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{444482E8-CB8F-4A79-87A8-9C3FCBCC7B16}</ProjectGuid>
<TargetFrameworks>net7.0;net48</TargetFrameworks>
<TargetExt>.rhp</TargetExt>
<OutputPath>..\Bin\</OutputPath>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SampleCsUserData</RootNamespace>
<AssemblyName>SampleCsUserData</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkProfile />
<Company>Robert McNeel &amp; Associates</Company>
<Copyright>Copyright © 2013-2024, Robert McNeel &amp; Associates</Copyright>
<Product>SampleCsUserData</Product>
<Description>Sample Event Watcher Plug-in</Description>
<Version>8.0.0</Version>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0|AnyCPU'">
<NoWarn>1701;1702;NU1701</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net48|AnyCPU'">
<NoWarn>1701;1702;NU1701</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0|AnyCPU'">
<NoWarn>1701;1702;NU1701</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net48|AnyCPU'">
<NoWarn>1701;1702;NU1701</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="RhinoCommon">
<HintPath>C:\Program Files\Rhino 7\System\RhinoCommon.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<Compile Include="Commands\SampleCsAddBrepFaceUserData.cs" />
<Compile Include="Commands\SampleCsAddSimpleDocumentData.cs" />
<Compile Include="Commands\SampleCsAddUserData.cs" />
<Compile Include="Commands\SampleCsDocumentDictionary.cs" />
<Compile Include="Commands\SampleCsModifyUserData.cs" />
<Compile Include="Commands\SampleCsQueryLayerUserData.cs" />
<Compile Include="Commands\SampleCsQueryUserData.cs" />
<Compile Include="Commands\SampleCsRemoveUserData.cs" />
<Compile Include="Commands\SampleCsStringTable.cs" />
<Compile Include="Commands\SampleCsAddLayerUserData.cs" />
<Compile Include="SampleCsSimpleDocumentData.cs" />
<Compile Include="SampleCsStringDocumentData.cs" />
<Compile Include="SampleCsUserDataObject.cs" />
<Compile Include="SampleCsUserDataPlugIn.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Resources\**\*" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\SampleCs.ico" />
<PackageReference Include="RhinoCommon" Version="8.9.24194.18121" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>Copy "$(TargetPath)" "$(TargetDir)$(ProjectName).rhp"
Erase "$(TargetPath)"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<FallbackCulture>en-US</FallbackCulture>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<StartProgram>c:\Program Files\Rhinoceros 5.0 (64-bit)\System\Rhino.exe</StartProgram>
<StartArguments>
</StartArguments>
<StartAction>Program</StartAction>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
</Project>

0 comments on commit 9ba5021

Please sign in to comment.