Giter Site home page Giter Site logo

Comments (16)

ericstj avatar ericstj commented on September 26, 2024 2

Just hit this myself when trying to tell folks to use nativeassets. Can we please get docs for this feature that's been around for 2 years now? /cc @jainaashish @rrelyea

from docs.microsoft.com-nuget.

Mizux avatar Mizux commented on September 26, 2024 2

my 2 cents for "Building a cross-platform .NetStandard2.0 package with native dependencies" (only using dotnet/cli and modern .csproj)

I add my own way to do it there #1013 (comment)
And you can found a full example project in https://github.com/Mizux/dotnet-native (Documentation on the way)

Still, waiting for the official documentation !!!

from docs.microsoft.com-nuget.

jjpepper avatar jjpepper commented on September 26, 2024 1

@kraigb that's not really correct. We don't really need anything vcpkg specific here, someone might be building in linux and producing a shared libraries from there without vcpkg being in the picture at all. The C++ people will know how to build their own libraries. The bigger question is then how to structure/create a nuget package via .nuspec so that the native libraries wind up in the target directory of the C# application that references the package. That expertise should exist within the nuget team, as it's just nuget functionality. Our approach was to use a .targets file, with the unfortunate side effect that the C# project that uses the native package sees all the shared libraries along side the source files in the solution explorer view. Yuck!

from docs.microsoft.com-nuget.

Mizux avatar Mizux commented on September 26, 2024 1

@jjpepper why do you use/hack a target file instead of setting it in the .*proj file ?
And did you try the <Visible> property (which should work in .*proj) ?
src: https://docs.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-items?view=vs-2017#content

from docs.microsoft.com-nuget.

Mizux avatar Mizux commented on September 26, 2024 1

FYI I've updated https://github.com/Mizux/dotnet-native to add "real" C++ samples code up to the .Net wrapper generation (using SWIG to generate the .NET wrapper from the C++ code) and I've updated my documentation accordingly.

There is also github actions workflows CI and few Linux docker to test on various distros as well as tests using MacOS and Windows runners.

from docs.microsoft.com-nuget.

kraigb avatar kraigb commented on September 26, 2024

See also https://github.com/MicrosoftDocs/mvp-hackadoc-2018/issues/43

from docs.microsoft.com-nuget.

ras0219-msft avatar ras0219-msft commented on September 26, 2024

no way to create a standalone package for publishing on the official repository :-(.

Take a look at our export command [1][2].

[1] https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/
[2] https://github.com/Microsoft/vcpkg/blob/d80dd5cbc777ce765c2d6b78d7c485fdf05f284b/docs/users/integration.md#export

from docs.microsoft.com-nuget.

kraigb avatar kraigb commented on September 26, 2024

What we really need is someone familiar with the process using vcpkg to draft a walkthrough that demonstrates the whole process of creating a native package. That expertise unfortunately does not seem to exist within the NuGet team. I can provide editing help and bringing the draft up to docs quality. Just create a branch with the work in it and we can go from there.

from docs.microsoft.com-nuget.

kraigb avatar kraigb commented on September 26, 2024

Also addres #190, #592, and #600.

from docs.microsoft.com-nuget.

jjpepper avatar jjpepper commented on September 26, 2024

Does anyone know if there is a way of making native libraries specified in a targets file not appear in the solution view?

from docs.microsoft.com-nuget.

stale avatar stale commented on September 26, 2024

This issue has been automatically marked as stale and closed because it has not had recent activity. Thank you for your contributions.

from docs.microsoft.com-nuget.

Mizux avatar Mizux commented on September 26, 2024

still not resolved officially...

from docs.microsoft.com-nuget.

tebeco avatar tebeco commented on September 26, 2024

I'm really curious about a dotnet pack solution when vendor just gives you MyNative.dll and MyDotnetWapper.dll, refusing to create nupkg.

That's also a VERY common scenario for "legacy" nuget or third part that was used thx to <Reference and truing to move forward to <PackageReference by manually repackaging already built dll.
They are supposed to be repackaged to netstandard2.0 since some could target net47x for example.

As of today i never found a clear and clean solution :(

from docs.microsoft.com-nuget.

karann-msft avatar karann-msft commented on September 26, 2024

Not eligible for docs day.

from docs.microsoft.com-nuget.

tebeco avatar tebeco commented on September 26, 2024

hello @karann-msft
would something like this helps as a support for documentation ?
NuGet/Home#9502

This repository show a "way" that vendor uses (that is bad ... as they gives us RAW .net dll)
https://github.com/tebeco/NativeLibNugetStuff/blob/master/README.md

The original repo from @poke, shows a better way => properly packing the native + managed, it only depends on what you have on your hands
https://github.com/poke/NativeLibNugetStuff

I think both could be a good contribution to the the docs as it would helps vendor to have something to rely on, in order to release fully functional packages compliant with dotnet restore and dotnet publish

from docs.microsoft.com-nuget.

github-actions avatar github-actions commented on September 26, 2024

Thanks for sharing your feedback. We apologize for our delayed response. Due to the sheer volume of feedback in our repo, we have decided to prioritize the newest issues and are automatically closing our oldest issues with an Issues bot. If you believe your feedback is still actionable, then either respond directly in this issue or open a new documentation issue and we’ll review. If no activity occurs in the next 14 days, this issue will be closed.

from docs.microsoft.com-nuget.

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.