Coder Social home page Coder Social logo

codelinker's Introduction

CAD bloke

aka Ewen Wallace

  • https://www.CADtoNetbox.com automates CAD wiring drawings syncing with Netbox...

    • CAD to Netbox also includes my C# .NET Netbox API client generated from multiple versions of Netbox, not just from the YAML and not with SwaggerGen because that made an unholy mess. It is refined with info parsed from the Netbox source code.
  • https://www.CableSchedules.com automates the boring bits of broadcast system design - cable schedules, offsheets, labels...

  • https://www.CADreplace.com - AutoCAD and BricsCAD FIND but good. Replaces multiple things in multiple drawings in one step

  • ๐Ÿ“บ Broadcast Systems Design and Documentation since last century

  • ๐Ÿ’ป Developing: AutoCAD plugins & CAD apps since 2005, in C#, Lisp & VBA (yeahnah)

  • past lives include ๐ŸŽฅ, ๐Ÿ“ท, ๐ŸŽ๏ธ+๐Ÿ“น, ๐Ÿ’ป in the 80s

on StackOverflow

profile for CAD bloke at Stack Overflow, Q&A for professional and enthusiast programmers

https://www.linkedin.com/in/cadbloke

๐Ÿ’ฌ Ask me about

  • ๐Ÿ“บ Broadcast systems
  • ๐Ÿ’ป software development
    • .NET C#
    • WPF
    • AutoCAD, BricsCAD, OpenDesign platforms
    • Lisp, VBA

๐Ÿก home is

๐Ÿจ ๐Ÿฌ ๐Ÿณ ๐Ÿท Newcastle, NSW, Australia

๐Ÿบ ๐Ÿป ๐Ÿบ

codelinker's People

Contributors

cadbloke avatar gitter-badger avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

codelinker's Issues

Log File - um, where is it?

In the XML comment at the end of the clone, add the full path to the Log file so the user can find it.

or not because this will change per user. Perhaps add a note to direct the user to the log file.

... or put the log file somewhere disposable like the 1.vs` folder in the root of the solution.

Hrrrmmm, do the homework - where should the log file usually live?

use timestamp to see if source needs parsing

Save a last-update timestamp for the source file in the target XML placeholder. If the source hasn't been updated, don't bother parsing it unless forced to.

Yay, another optional parameter. ๐Ÿ‘Ž

Nuget references - keep or delete?

<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
      <HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
      <Private>True</Private>
    </Reference>

These are build platform dependent. I guess the project is cloned with with the <TargetFrameworkVersion> intact so the process of breaking the Nugets that is no different to changing the <TargetFrameworkVersion> in the Source project.

Avoid Duplicates

If a file name exists in the destination project in the same folder then don't add it as a link.

Don't forget to check the <Link> attributes too.

Doesn't handle wildcard Includes

<Compile Include="**\*.cs" Exclude="AssemblyInfo.cs;**\Temp*.cs" /> in the source csproj will crash the GUI when linking / re-linking.

Here's the crash

I crashed at Recycling. GetFullPath: C:\Codez\CadBloke\GitHub\CADtest\CADtest-CS\**\*.cs. Whups. See CodeLinkerLog.txt for details.
System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.Path.GetFullPath(String path)
at CodeLinker.DestinationProjLinker.LinkCode() in C:\Codez\CadBloke\GitHub\CodeLinker\codelinker\DestinationProjLinker.cs:line 158

Investigate a better way that doesn't need to reparse relative links (including wildcards) by tweaking the relative path of the Source Include to create the new Include for the destination project. Concatenating **\*.cs to the end of a folder paths should still work for Visual Studio / MSBuild but it's not a legal path name, hence the crash.

Test for

  • linking a csproj that has already been linked
  • linking a csproj into the same directory
  • linking a csproj that has already been linked but now has a different, &/or shallower relative path than its source (that source being the destination of another source). ie. the new relative path for the Include is not just an easy string.Replace()...OR IS IT?

Nuget packages - they break

 <ItemGroup>
    <None Include="..\cadblokefindreplacenunittests\packages.config">
      <Link>packages.config</Link>
    </None>

Have a good look at the packages.config

  • should there be a local copy? PERHAPS
  • Will changing a canonical packages.config break it for all but one project? YES

Perhaps strip out all Nuget <Reference>s so the user can start from scratch after they set upstream build configs (framework etc)

or ... an option to copy and keep the Nuget packages.config file and the user can deal with it. NO because there are upstream things that need doing to make Nuget work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.