Giter VIP home page Giter VIP logo

Comments (6)

danielhogg avatar danielhogg commented on September 13, 2024

The first thing that comes to mind is - are you using the correct version of the SnipeSharp API? Marksman has a dependency on this particular version of SnipeSharp.

from marksman.

emike09 avatar emike09 commented on September 13, 2024

That's the version I'm using, I used to get SnipeSharp errors until I added the dependancy, now the build error is related to SearchFilter. I'm assuming I can't just provide the dependencies and hit build solution?

from marksman.

emike09 avatar emike09 commented on September 13, 2024

Looks like it can't find Location, Manufacture, Company, etc as well. With the proper snipesharp.dll added as reference, I get the following errors:

Error CS1729 'Manufacturer' does not contain a constructor that takes 1 arguments marksman C:\Users\mike.capps\source\repos\marksman2 C:\Users\mike.capps\source\repos\marksman2\Marksman.cs 100 N/A Compiler
Error CS1729 'SearchFilter' does not contain a constructor that takes 1 arguments marksman C:\Users\mike.capps\source\repos\marksman2 C:\Users\mike.capps\source\repos\marksman2\Broker.cs 105 N/A Compiler
Error CS1729 'SearchFilter' does not contain a constructor that takes 1 arguments marksman C:\Users\mike.capps\source\repos\marksman2 C:\Users\mike.capps\source\repos\marksman2\Broker.cs 109 N/A Compiler
Error CS1729 'SearchFilter' does not contain a constructor that takes 1 arguments marksman C:\Users\mike.capps\source\repos\marksman2 C:\Users\mike.capps\source\repos\marksman2\Broker.cs 115 N/A Compiler
Error CS1729 'SearchFilter' does not contain a constructor that takes 1 arguments marksman C:\Users\mike.capps\source\repos\marksman2 C:\Users\mike.capps\source\repos\marksman2\Broker.cs 119 N/A Compiler
Error CS1729 'SearchFilter' does not contain a constructor that takes 1 arguments marksman C:\Users\mike.capps\source\repos\marksman2 C:\Users\mike.capps\source\repos\marksman2\Broker.cs 123 N/A Compiler
Error CS1729 'SearchFilter' does not contain a constructor that takes 1 arguments marksman C:\Users\mike.capps\source\repos\marksman2 C:\Users\mike.capps\source\repos\marksman2\Broker.cs 127 N/A Compiler
Error CS1729 'Location' does not contain a constructor that takes 1 arguments marksman C:\Users\mike.capps\source\repos\marksman2 C:\Users\mike.capps\source\repos\marksman2\Marksman.cs 61 N/A Compiler
Error CS1729 'StatusLabel' does not contain a constructor that takes 1 arguments marksman C:\Users\mike.capps\source\repos\marksman2 C:\Users\mike.capps\source\repos\marksman2\Marksman.cs 68 N/A Compiler
Error CS1729 'Company' does not contain a constructor that takes 1 arguments marksman C:\Users\mike.capps\source\repos\marksman2 C:\Users\mike.capps\source\repos\marksman2\Marksman.cs 75 N/A Compiler
Error CS1729 'Category' does not contain a constructor that takes 1 arguments marksman C:\Users\mike.capps\source\repos\marksman2 C:\Users\mike.capps\source\repos\marksman2\Marksman.cs 93 N/A Compiler

Steps to reproduce:

  1. Clone SnipeSharp repo from github.
  2. Build SnipeSharp to obtain snipesharp.dll
  3. Clone Marksman from github
  4. Add snipesharp.dll as a reference
  5. Build Marksman solution
  6. Receive errors.

I know this has to be my own lack of understanding how VS 2017 and .NET works.

from marksman.

danielhogg avatar danielhogg commented on September 13, 2024

I am pretty sure what's going on here, as I was able to regenerate that series of errors by building SnipeSharp.dll from this link: https://github.com/barrycarey/SnipeSharp (which is the wrong version).

Here's what I got (same as your errors)

1>------ Build started: Project: marksman, Configuration: Release Any CPU ------
1>C:\Users\Danny\code\ScopeIT\marksman\Marksman.cs(61,44,61,52): error CS1729: 'Location' does not contain a constructor that takes 1 arguments
1>C:\Users\Danny\code\ScopeIT\marksman\Marksman.cs(68,50,68,61): error CS1729: 'StatusLabel' does not contain a constructor that takes 1 arguments
1>C:\Users\Danny\code\ScopeIT\marksman\Marksman.cs(75,42,75,49): error CS1729: 'Company' does not contain a constructor that takes 1 arguments
1>C:\Users\Danny\code\ScopeIT\marksman\Marksman.cs(93,44,93,52): error CS1729: 'Category' does not contain a constructor that takes 1 arguments
1>C:\Users\Danny\code\ScopeIT\marksman\Marksman.cs(100,51,100,63): error CS1729: 'Manufacturer' does not contain a constructor that takes 1 arguments
1>C:\Users\Danny\code\ScopeIT\marksman\Broker.cs(105,51,105,63): error CS1729: 'SearchFilter' does not contain a constructor that takes 1 arguments
1>C:\Users\Danny\code\ScopeIT\marksman\Broker.cs(109,47,109,59): error CS1729: 'SearchFilter' does not contain a constructor that takes 1 arguments
1>C:\Users\Danny\code\ScopeIT\marksman\Broker.cs(115,44,115,56): error CS1729: 'SearchFilter' does not contain a constructor that takes 1 arguments
1>C:\Users\Danny\code\ScopeIT\marksman\Broker.cs(119,46,119,58): error CS1729: 'SearchFilter' does not contain a constructor that takes 1 arguments
1>C:\Users\Danny\code\ScopeIT\marksman\Broker.cs(123,50,123,62): error CS1729: 'SearchFilter' does not contain a constructor that takes 1 arguments
1>C:\Users\Danny\code\ScopeIT\marksman\Broker.cs(127,47,127,59): error CS1729: 'SearchFilter' does not contain a constructor that takes 1 arguments
2>------ Skipped Build: Project: MarksmanSetup, Configuration: Release ------
2>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========

Then I was able to get it to build without errors by building SnipeSharp.dll from our fork of SnipeSharp (we have made some API changes): https://github.com/Scope-IT/SnipeSharp

Try following these steps:

  1. Go to your marksman project, and remove the SnipeSharp reference
  2. Clone our fork of SnipeSharp: https://github.com/Scope-IT/SnipeSharp
  3. Build that project
  4. Re-add the resulting SnipeSharp.dll as a reference to your marksman project

from marksman.

emike09 avatar emike09 commented on September 13, 2024

Well that seemed to resolve it! Thanks for the help.

Now to figure out how to query the SMBIOSAssetTag from wbemtest. SELECT SMBIOSAssetTag FROM Win32_SystemEnclosure doesn't seem to pull the correct information.

from marksman.

emike09 avatar emike09 commented on September 13, 2024

Figured that out as well. I've forked the project with the changes.

127: string assettag = GetOutputVariable("Win32_SystemEnclosure.SMBIOSAssetTag");
143: AssetTag = appSettings["AssetTagPrefix"] + assettag,
328: mySentry.AddQuery("WMI", "SELECT SMBIOSAssetTag FROM Win32_SystemEnclosure");

from marksman.

Related Issues (20)

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.