MartinSedlmair-3265 avatar image
1 Vote"
MartinSedlmair-3265 asked ·

VS Extension as nuget package

We are currently using VS extensions to create CUDA PTX files while developing in VS. The CUDA code is placed in the solution as a single file with the cu-extension. The extension hooks in into the save routine and any time the developer saves the CUDA code our extension hooks in compiles the CUDA code to PTX code and creates wrappers around and for this CUDA to make the CUDA code managable in C#. The extension creates 3 additional files (original filename for example: Filter3D), the PTX (filename: Filter3D.ptx) code that is embedded as "Embedded Resource" the wrapper code (filename: Filter3D.designer.cs) and some user-definable code (filename: Filter3D.cs).

This all works fine so far, but the problem is that there can only exist one version of an extension. So if we go bag to older versions of our code, the extension does not fit and compiles code that is not compatible with the current code version.

The idea was that something similar can be achieved by nuget packages that are "installed" alongside with the current code version as PackageReference in the C#-project. As this is also done with analyzer and source generators.

My problem is that I have no good clue where to start and where to search for.

· 2
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MartinSedlmair-3265, in order for use to investigate it further, could you tell me what the VS extension is? Which version of Visual Studio are you using?

0 Votes 0 ·

@AnnaXiu-MSFT: This VS extension is currently our own extension. The question is more related to: "How can I deliver VS extensions as a nuget package" that is bound to the current version of the source code, rather than having a global source code version independent VS extension"

1 Vote 1 ·

0 Answers