overwrite resharper "Import symbol completion" plugin behavior - plugins

When a new type gets referenced in code, resharper provides an option to "reference the dll and import the usings"
The dll reference added in csproj file, normally comes with the version and publickey information.
But i want to overwrite this behavior and have the reference to dll as follows:
False
False
This does not include any version or key information.
Currently after the resharper adds the reference, we have to manually edit the csproj file and do the changes.
Please let me know if i can overwrite this behavior .

Related

Eclipse CDT Getting path & symbols from referenced project

I added a project as referenced project (with active configuration) to my actual project.
My expectation was that all the symbols and includes defined in that project should also be accessible in my actual project, but unfortunately that is not the case.
I aslo expected that the include pathes and symbols are detected by the Exported Entries from referenced Project providers. But there are no entries found by them.
Is my expectation wrong, or is there a problem with my confinguration?
Thank you very much.
For importing the Path & Symbols from external projects, the export property (button) has to be set.
See also question:
"Export" button in Eclipse CDT "Paths and Symbols" dialog??

VSCode extension that packages .d.ts file

I've created a new .d.ts file which will enable autocomplete whenever a particular global object is used in the code.
How do I package this .d.ts file as part of an extension, so that, anyone can install this extension and use the autocomplete/intellisense ?

How to see C# Nuget Package's source code on Visual Studio Code?

Is there any way to see a Nuget Package's source code when we choose "Go to Definition" (or F12 or CRTL+click)?
At this time, I click (CRTL+click) on some class from Nuget Package in my code and the vscode shows me an assembly summary [metadata], where I can see only docs and methods signature.
I'd like to see all the source code from this class.
Is there some extension I need to install or I misunderstood some config?
I believe you can now do this with source link enabled libraries (nuget packages included).
You can have a look at these .NET blog posts from Claire:
Improving Debug-time Productivity with Source Link
Producing Packages with Source Link
With Source Link-enabled libraries, the debugger can download the underlying source files as you step in, and you can set breakpoints/tracepoints like you would with any other source.
JetBrains Resharper provides this functionality by decompiling source in Visual Studio. I am not aware of integrated extension for VSCode.
NuPKG files are just zip files, so anything that can process a zip file should be able to process a nupkg file, i.e, 7zip.

Scoping "Go to Symbol in Workspace" in VSCode to the entire workspace

I'm working in a TypeScript project in VSCode that contains multiple modules. The "Go to Symbol in Workspace" (CTRL+T) command seems to scope itself to a local subset of the workspace, despite its name (which implies its search should be global).
Let's say I have Foo() defined in module A, which exposes a foo.d.ts file consumed by module B, and I have this directory structure
root
|
+-- A (folder)
|
+-- B (folder)
I see the following behavior:
If I am editing a file in A and search for #Foo, it will take me to the actual definition of Foo(). Good.
But if I am editing a file in B and search for #Foo, it will only take me to the foo.d.ts exported by A - I have to manually navigate into A to find the actual definition of Foo().
I really want #Foo to mean "show me all instances of the symbol Foo anywhere in my workspace." Is there a way to force this behavior?
Preview feature: vscode v1.45 should improve on symbol searching across javascript and typescript projects without having all the files open. See https://github.com/microsoft/vscode/issues/11026 and https://github.com/microsoft/vscode/issues/11026 (js/ts workspace symbol search only works if you have loaded a js/ts file).
Added with a new setting: typescript.workspaceSymbols.scope. Valid
values are:
allOpenProjects — (default) search all opened projects for symbols.
Requires TS 3.9+
currentProject — Only search the current project
above from the first link.
#11026 Improved this. You no longer need to have a JS/TS file open for workspace symbol search to work and we can now search across all JS/TS
projects you know about.
If you are using TS 3.9, all projects should be searched by default
On older TS versions, only the current project should be searched. If
using TS 3.9, you can switch to only search the current project by
setting: "typescript.workspaceSymbols.scope": "currentProject"
However we still require you to have opened a JS/TS file
above from the second link.
Also see the v1.45 release notes : https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_45.md#workspace-symbol-search-in-all-open-typescriptjavascript-projects
When using TypeScript 3.9+, VS Code's workspace symbol
search
now includes results from all opened JavaScript and TypeScript
projects by default. We previously only searched the project of the
currently active file.
This is controlled by the new "typescript.workspaceSymbols.scope"
setting. To revert to the old behavior, just set:
"typescript.workspaceSymbols.scope": "currentProject".
To see what version of typescript you have and how to install a newer version, see https://stackoverflow.com/a/39676463/836330. And https://stackoverflow.com/a/47087772/836330 is good.
v1.46 release notes: searching for symbols across projects in a workspace
JS/TS Go to Symbol in workspace includes all opened projects
By default, workspace symbol
search
for JavaScript and TypeScript now search all opened jsconfig and
tsconfig projects. It previously only included search results from the
project the focused file belonged to.
This behavior is controlled by the typescript.workspaceSymbols.scope
setting and requires TS 3.9+. To revert the to previous behavior and
only search the current project, just set
"typescript.workspaceSymbols.scope": "currentProject"

Examine contents of a nuget package

Is there a way to examine the contents of a NuGet package to see what changes it will be making? There is no option for this on the Nuget.exe command line and I do not find any information about this in the NuGet docs.
.nupkg files are just ZIP files with some metadata, so you can have a look at the contents. The NuGet Package Explorer should make it a little easier to view the contents.
The NuGet Gallery (e.g. https://www.nuget.org/) has a "Download" link on the right hand side, otherwise just install the package into an empty project and then take a peek.
Windows Users:
As Jonathon Rossi pointed out,
.nupkg files are just ZIP files, so you can have a look at the contents
So on a windows machine, for a temporary fix, just change the file extension from .nupkg to .zip, and then just use Windows' File Explorer to leverage the existing file association for .zip (CompressedFolder) files.
It is possible to "permanently" associate .nupkg with your system's CompressedFolder tool. However, this will corrupt the IconCache.db at the very least, and the typical method to restore it does not work for me (deleting the IconCache.db and rebooting). So I would recommend against associating .nupkg with CompressedFolder if you are concerned with seeing the correct file icon in File Explorer.
With that in mind, if you want a longer term solution for opening .nupkg files without changing their extension...
You can set a file association easily via a command prompt (cmd) like so:
These files will now have the same icon as any other CompressedFolder on your file system, and you can leave their extensions unchanged (as .nupkg).
To undo this association, repeat assoc command for the .nupkg but leave the RHS blank:
You can confirm the current file association at any time by running assoc .nupkg, dropping the equals sign (=).:
Another solution would be to use DotPeek.
It has an option to decompile packages from NuGet directly and NuGet caches.