Skip to content

Commit

Permalink
Ported SampleCsCommands.csproj 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 6484bb1 commit 7efdcf2
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 330 deletions.
42 changes: 6 additions & 36 deletions rhinocommon/cs/SampleCsCommands/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,48 +1,18 @@
using System.Reflection;
using Rhino.PlugIns;
using System.Reflection;
using System.Runtime.InteropServices;
using Rhino.PlugIns;

// Plug-in Description Attributes - all of these are optional
// These will show in Rhino's option dialog, in the tab Plug-ins
[assembly: PlugInDescription(DescriptionType.Address, "3670 Woodland Park Avenue North\r\nSeattle, WA 98103")]
[assembly: PlugInDescription(DescriptionType.Address, "146 North Canal Street, Suite 320\r\nSeattle, WA 98103")]
[assembly: PlugInDescription(DescriptionType.Country, "United States")]
[assembly: PlugInDescription(DescriptionType.Email, "devsupport@mcneel.com")]
[assembly: PlugInDescription(DescriptionType.Email, "dale@mcneel.com")]
[assembly: PlugInDescription(DescriptionType.Phone, "206-545-6877")]
[assembly: PlugInDescription(DescriptionType.Fax, "206-545-7321")]
[assembly: PlugInDescription(DescriptionType.Organization, "Robert McNeel & Associates")]
[assembly: PlugInDescription(DescriptionType.UpdateUrl, "https://github.com/mcneel/rhino-developer-samples")]
[assembly: PlugInDescription(DescriptionType.WebSite, "http://www.rhino3d.com/")]
[assembly: PlugInDescription(DescriptionType.WebSite, "https://github.com/mcneel/rhino-developer-samples")]
[assembly: PlugInDescription(DescriptionType.Icon, "SampleCsCommands.Resources.SampleCs.ico")]

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SampleCsCommands")] // Plug-In title is extracted from this
[assembly: AssemblyDescription("RhinoCommon Sample - SampleCsCommands")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Robert McNeel & Associates")]
[assembly: AssemblyProduct("SampleCsCommands")]
[assembly: AssemblyCopyright("Copyright © 2017, Robert McNeel & Associates")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4d58b9ad-7cfd-47c2-b250-f44001d2cf9f")] // This will also be the Guid of the Rhino plug-in

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("6.0.0.0")]
[assembly: AssemblyFileVersion("6.0.0.0")]
[assembly: Guid("4D58B9AD-7CFD-47C2-B250-F44001D2CF9F")]
14 changes: 14 additions & 0 deletions rhinocommon/cs/SampleCsCommands/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"
}
}
}
2 changes: 1 addition & 1 deletion rhinocommon/cs/SampleCsCommands/SampleCsClipboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private static byte[] GeometryBaseToBytes(GeometryBase src)
if (null == src)
return null;

var rc = new byte[0];
var rc = Array.Empty<byte>();
try
{
var formatter = new BinaryFormatter();
Expand Down
302 changes: 24 additions & 278 deletions rhinocommon/cs/SampleCsCommands/SampleCsCommands.csproj
Original file line number Diff line number Diff line change
@@ -1,290 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.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>{C1498326-89AB-48B0-A148-290C169CAA68}</ProjectGuid>
<TargetFrameworks>net7.0-windows;net48</TargetFrameworks>
<UseWindowsForms>true</UseWindowsForms>
<TargetExt>.rhp</TargetExt>
<OutputPath>..\Bin\</OutputPath>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SampleCsCommands</RootNamespace>
<AssemblyName>SampleCsCommands</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 Commands 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-windows|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-windows|AnyCPU'">
<NoWarn>1701;1702;NU1701</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net48|AnyCPU'">
<NoWarn>1701;1702;NU1701</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="Eto">
<HintPath>C:\Program Files\Rhino 7\System\Eto.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rhino.UI">
<HintPath>C:\Program Files\Rhino 7\System\Rhino.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RhinoCommon">
<HintPath>C:\Program Files\Rhino 7\System\RhinoCommon.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="RhinoWindows">
<HintPath>C:\Program Files\Rhino 7\System\RhinoWindows.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" />
<Reference Include="System.Xml" />
<Reference Include="Xfinium.Pdf.Win">
<HintPath>C:\Program Files\Rhino 7\Plug-ins\Xfinium.Pdf.Win.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="SampleCsAlignProfiles.cs" />
<Compile Include="SampleCsApplyCrv.cs" />
<Compile Include="SampleCsArc.cs" />
<Compile Include="SampleCsBooleanDifference4.cs" />
<Compile Include="SampleCsCachedTextureCoordinates.cs" />
<Compile Include="SampleCsCreateBooleanRegions.cs" />
<Compile Include="SampleCsCreateUVCurve.cs" />
<Compile Include="SampleCsAddAlignedDimension.cs" />
<Compile Include="SampleCsAddRadialDimension.cs" />
<Compile Include="SampleCsClipboard.cs" />
<Compile Include="SampleCsContour.cs" />
<Compile Include="SampleCsCreateNestedBlock.cs" />
<Compile Include="SampleCsDetailLock.cs" />
<Compile Include="SampleCsDrawArrow.cs" />
<Compile Include="SampleCsDrawGrayscale.cs" />
<Compile Include="SampleCsDrawPin.cs" />
<Compile Include="SampleCsDuplicateObjectFromNameTag.cs" />
<Compile Include="SampleCsExportDXF.cs" />
<Compile Include="SampleCsExportSvgWithDialog.cs" />
<Compile Include="SampleCsExtractInflectionPoints.cs" />
<Compile Include="SampleCsExtractMinMaxRadiusPoints.cs" />
<Compile Include="SampleCsExtrudeMeshFace.cs" />
<Compile Include="SampleCsFairCurves.cs" />
<Compile Include="SampleCsFindUnweldedEdges.cs" />
<Compile Include="SampleCsGuilloche.cs" />
<Compile Include="SampleCsGumballCylinder.cs" />
<Compile Include="SampleCsHatch.cs" />
<Compile Include="SampleCsHideInDetail.cs" />
<Compile Include="SampleCsIntersectBreps.cs" />
<Compile Include="SampleCsIntersectCurveBrepFace.cs" />
<Compile Include="SampleCsKeyboardHook.cs" />
<Compile Include="SampleCsLayerOff.cs" />
<Compile Include="SampleCsAddNurbsCircle.cs" />
<Compile Include="SampleCsAddRdkMaterials.cs" />
<Compile Include="SampleCsAddTextDot.cs" />
<Compile Include="SampleCsAppearanceColors.cs" />
<Compile Include="SampleCsBooleanDifference2.cs" />
<Compile Include="SampleCsBooleanDifference3.cs" />
<Compile Include="SampleCsBoundingBox.cs" />
<Compile Include="SampleCsCircleRadius.cs" />
<Compile Include="SampleCsCurveDiscontinuity.cs" />
<Compile Include="SampleCsCurvePoints.cs" />
<Compile Include="SampleCsCylinderTest.cs" />
<Compile Include="SampleCsDrawRightAlignedText.cs" />
<Compile Include="SampleCsDumpBlockTree.cs" />
<Compile Include="SampleCsEditPolyline.cs" />
<Compile Include="SampleCsEmbedTextFile.cs" />
<Compile Include="SampleCsExtrusion.cs" />
<Compile Include="SampleCsFaceWithHole.cs" />
<Compile Include="SampleCsGetDirection.cs" />
<Compile Include="SampleCsGroup.cs" />
<Compile Include="SampleCsIntersectCurveLine.cs" />
<Compile Include="SampleCsIntersectCurves.cs" />
<Compile Include="SampleCsIntersectCurveSelf.cs" />
<Compile Include="SampleCsIntersectionMeshPolyline.cs" />
<Compile Include="SampleCsInvertSelected.cs" />
<Compile Include="SampleCsLastCreatedObjects.cs" />
<Compile Include="SampleCsLayerPathName.cs" />
<Compile Include="SampleCsMake2D.cs" />
<Compile Include="SampleCsMeshBox.cs" />
<Compile Include="SampleCsMove.cs" />
<Compile Include="SampleCsMoveGrips.cs" />
<Compile Include="SampleCsMoveNormal.cs" />
<Compile Include="SampleCsNurbsCircle.cs" />
<Compile Include="SampleCsAddNurbsCurve.cs" />
<Compile Include="SampleCsAddNurbsSurface.cs" />
<Compile Include="SampleCsArray.cs" />
<Compile Include="SampleCsAutomateGrasshopper.cs" />
<Compile Include="SampleCsBlock.cs" />
<Compile Include="SampleCsBooleanDifference.cs" />
<Compile Include="SampleCsBoxMorph.cs" />
<Compile Include="SampleCsCircleOfLines.cs" />
<Compile Include="SampleCsClassifyCurve.cs" />
<Compile Include="SampleCsColorfulMeshBox.cs" />
<Compile Include="SampleCsCommandLineOptions.cs" />
<Compile Include="SampleCsCommandsCommand.cs" />
<Compile Include="SampleCsCommandsPlugIn.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SampleCsContourMesh.cs" />
<Compile Include="SampleCsCurveSeam.cs" />
<Compile Include="SampleCsCurveGetter.cs" />
<Compile Include="SampleCsCustomLine.cs" />
<Compile Include="SampleCsCustomRenderMeshSettings.cs" />
<Compile Include="SampleCsCurveDirection.cs" />
<Compile Include="SampleCsDeleteMeshFace.cs" />
<Compile Include="SampleCsDeleteSubCurve.cs" />
<Compile Include="SampleCsDrawDistance.cs" />
<Compile Include="SampleCsDrawMesh.cs" />
<Compile Include="SampleCsDrawText.cs" />
<Compile Include="SampleCsDrawViewportLogo.cs" />
<Compile Include="SampleCsDuplicateBorder.cs" />
<Compile Include="SampleCsDuplicateMeshBorder.cs" />
<Compile Include="SampleCsEscapeKey.cs" />
<Compile Include="SampleCsEscapeKey2.cs" />
<Compile Include="SampleCsExplodeBlock.cs" />
<Compile Include="SampleCsExplodeHatch.cs" />
<Compile Include="SampleCsExtractPreview.cs" />
<Compile Include="SampleCsFilletSrf.cs" />
<Compile Include="SampleCsGetMultiplePoints.cs" />
<Compile Include="SampleCsGetPoint.cs" />
<Compile Include="SampleCsGetPointOnBreps.cs" />
<Compile Include="SampleCsHistory.cs" />
<Compile Include="SampleCsHistoryDivide.cs" />
<Compile Include="SampleCsImportNamedViews.cs" />
<Compile Include="SampleCsIntersectCircles.cs" />
<Compile Include="SampleCsIsolate.cs" />
<Compile Include="SampleCsMeshBrep.cs" />
<Compile Include="SampleCsMeshOutline.cs" />
<Compile Include="SampleCsModifySphereRadius.cs" />
<Compile Include="SampleCsNamedPlaneSurface.cs" />
<Compile Include="SampleCsObjectEnumerator.cs" />
<Compile Include="SampleCsOpen3dm.cs" />
<Compile Include="SampleCsOpenDwg.cs" />
<Compile Include="SampleCsOptionsList.cs" />
<Compile Include="SampleCsOrientOnMesh.cs" />
<Compile Include="SampleCsOrientPerpendicularToCurve.cs" />
<Compile Include="SampleCsOverCut.cs" />
<Compile Include="SampleCsParseTextFields.cs" />
<Compile Include="SampleCsPerFaceMaterial.cs" />
<Compile Include="SampleCsPersistentSettings.cs" />
<Compile Include="SampleCsPickHole.cs" />
<Compile Include="SampleCsPictureFrame.cs" />
<Compile Include="SampleCsPlanarClosedCurveRelationship.cs" />
<Compile Include="SampleCsPlanarFaceLoops.cs" />
<Compile Include="SampleCsPointCloudPoints.cs" />
<Compile Include="SampleCsPointOnMesh.cs" />
<Compile Include="SampleCsPrePostSelect.cs" />
<Compile Include="SampleCsPrintViewList.cs" />
<Compile Include="SampleCsProjectCurvesToBrep.cs" />
<Compile Include="SampleCsProjectPointToMesh.cs" />
<Compile Include="SampleCsPullGripsToMesh.cs" />
<Compile Include="SampleCsQuadRemesh.cs" />
<Compile Include="SampleCsRenderBackground.cs" />
<Compile Include="SampleCsRestoreLayerState.cs" />
<Compile Include="SampleCsRestoreNamedView.cs" />
<Compile Include="SampleCSRibbonOffsetCurve.cs" />
<Compile Include="SampleCsRotate.cs" />
<Compile Include="SampleCsRTree.cs" />
<Compile Include="SampleCsSave3DS.cs" />
<Compile Include="SampleCsSaveAs.cs" />
<Compile Include="SampleCsScriptedSweep2.cs" />
<Compile Include="SampleCsSelCircle.cs" />
<Compile Include="SampleCsSelectHoles.cs" />
<Compile Include="SampleCsSelectLayerObjects.cs" />
<Compile Include="SampleCsSerializeClass.cs" />
<Compile Include="SampleCsSetCameraTarget.cs" />
<Compile Include="SampleCsSetDisplayMode.cs" />
<Compile Include="SampleCsSetDocumentUserText.cs" />
<Compile Include="SampleCsSetObjectName.cs" />
<Compile Include="SampleCsSetPoint.cs" />
<Compile Include="SampleCsShadedBrep.cs" />
<Compile Include="SampleCsShadedView.cs" />
<Compile Include="SampleCsSilhouetteDraftCurve.cs" />
<Compile Include="SampleCsSineWaveLoft.cs" />
<Compile Include="SampleCsSketch.cs" />
<Compile Include="SampleCsSmash.cs" />
<Compile Include="SampleCsSmooth.cs" />
<Compile Include="SampleCsSpiral.cs" />
<Compile Include="SampleCsSplitCurve.cs" />
<Compile Include="SampleCsStackedControlPointsCurve.cs" />
<Compile Include="SampleCsSubCurve.cs" />
<Compile Include="SampleCsCurveEditPoints.cs" />
<Compile Include="SampleCsExplodePolyCurve.cs" />
<Compile Include="SampleCsSubDEditPts.cs" />
<Compile Include="SampleCsSweep1.cs" />
<Compile Include="SampleCsTestPlanarCurveContainment.cs" />
<Compile Include="SampleCsText.cs" />
<Compile Include="SampleCsTextEntityBoundingBox.cs" />
<Compile Include="SampleCsTrimmedPlane.cs" />
<Compile Include="SampleCsTrimSurface.cs" />
<Compile Include="SampleCsUnisolate.cs" />
<Compile Include="SampleCsSetUserText.cs" />
<Compile Include="SampleCsUnweldAll.cs" />
<Compile Include="SampleCsUtilities.cs" />
<Compile Include="SampleCsViewBoundingBox.cs" />
<Compile Include="SampleCsViewCapture.cs" />
<Compile Include="SampleCsViewCaptureBoundingBox.cs" />
<Compile Include="SampleCsViewportSize.cs" />
<Compile Include="SampleCsViewSize.cs" />
<Compile Include="SampleCsWorldToPageTransform.cs" />
<Compile Include="SampleCsWrite3dmFile.cs" />
<Compile Include="SampleCsWritePdf.cs" />
<Compile Include="SampleCsWriteStl.cs" />
<Compile Include="SampleCsZAnalysis.cs" />
<Compile Include="SampleCsZebraAnalysis.cs" />
<Compile Include="SampleCsZoom.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Resources\**\*" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\logo.png" />
<PackageReference Include="RhinoCommon" Version="8.9.24194.18121" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\SampleCs.ico" />
<Folder Include="Properties\" />
</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\Rhino WIP\System\Rhino.exe</StartProgram>
<StartArguments>
</StartArguments>
<StartAction>Program</StartAction>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
</Project>
Loading

0 comments on commit 7efdcf2

Please sign in to comment.