Skip to content

Commit bbd1117

Browse files
fixes grammar mistakes and improves readability
1 parent 0f6a513 commit bbd1117

File tree

1 file changed

+30
-27
lines changed

1 file changed

+30
-27
lines changed

README.md

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,32 @@
77
[![](https://img.shields.io/github/downloads/codingadventures/LINQBridgeVs/total.svg)](https://github.com/codingadventures/LINQBridgeVs/releases)
88

99
LINQBridgeVs is a Visual Studio Extension compatible with Visual Studio 2012/2013/2015/2017.
10-
It is a bridge between a Visual Studio debugging session and [LINQPad](http://www.linqpad.net).
11-
When enabled on a solution containing C#, VB, ASP.NET or MVC projects, it creates at compile time a Custom Debugger Visualizer assembly
12-
mapping to all the public complex types and making the magnifier glass available for all of them. By clicking on the magnifier glass on an object instance, this will be transmitted over a
10+
It is a bridge between a Visual Studio debugging session and [LINQPad](http://www.linqpad.net). It creates at compile time, a Custom Debugger Visualizer making the magnifier glass available for all of the public classes and structs. By clicking on the magnifier glass on an object instance, this will be transmitted over a
1311
bus and 'Dumped' out by LINQPad.
1412
<br><br>
1513
## Getting Started
1614

17-
Once the extension is installed a new menu will be available in the Visual Studio Menu Bar, only visible
18-
when a solution is loaded, called "BridgeVs". There are two options available:
15+
Once the extension is installed, a new menu called *"BridgeVs"* will be available in the Visual Studio Menu Bar. Such menu is only visible
16+
when a solution is loaded. There are two options available:
1917

2018
* *Bridge Solution*
2119
* *Un-Bridge Solution*
2220

2321
Bridging a solution will extend the MsBuild process to create a custom debugger visualizer assembly for each project. These assemblies are created or updated when you build your projects.
24-
Private and internal classes _are not_ included, magnifier glass will not be available for them.
25-
Run the solution, set a breakpoint and hover the mouse pointer on any object instance and the magnifier glass will appear.
26-
If the magnifier glass does not appear, after you bridged and rebuilt your solution, make sure that in this folder _"C:\Users\youruser\Documents\Visual Studio 201**x**\Visualizers"_ there is/are assemblies with this name template "***AssemblyName**.Visualizer.V1**x**.dll*" (where x is the version number of Visual Studio).
27-
If the folder does not contain any assembly then please check the log files here: *C:\Users\youruser\AppData\Local\LINQBridgeVs* and open [a new bug](https://github.com/codingadventures/LINQBridgeVs/issues/new).
22+
Private and internal classes _are not_ included, hence the magnifier glass will not be available for them.
2823

29-
Do not keep two instances of two different version of LINQPad running (e.g. LINQPad 4 and LINQPad 5) at the same time. If you do so, the data will be automatically sent to the lower version of LINQPad.
24+
Run the solution, set a breakpoint and hover the mouse pointer on any object instance then the magnifier glass will appear inside the data tip.
25+
26+
## Compatibility
27+
28+
LINQBridgeVs is compatible with any Visual Studio edition from 2012 to 2017. It works only for **.NET Framework 4.0 to 4.6.2**. There is no support for .NET Framework 3.5 downwards. LINQPad 4 and 5 are both supported.
29+
30+
## Troubleshooting
31+
32+
If after bridging and rebuilding your solution the magnifier glass still does not appear, make sure that in this folder _"C:\Users\youruser\Documents\Visual Studio 201**x**\Visualizers"_ there is/are assemblies with this name template "***AssemblyName**.Visualizer.V1**x**.dll*" (where x is the version number of Visual Studio).
33+
If the folder does not contain any assembly then please check the log files here *C:\Users\youruser\AppData\Local\LINQBridgeVs* and send them with [a new bug](https://github.com/codingadventures/LINQBridgeVs/issues/new).
34+
35+
Do not keep two instances of two different versions of LINQPad running (e.g. LINQPad 4 and LINQPad 5) at the same time. If you do so, the data will be automatically sent to the lower version of LINQPad.
3036
<br><br>
3137
<p align="center">
3238
<img src="https://github.com/codingadventures/LINQBridgeVs/blob/master/Docs/Example.gif?raw=true" width="1000" />
@@ -35,29 +41,26 @@ Do not keep two instances of two different version of LINQPad running (e.g. LINQ
3541
## Configuration
3642

3743
Unfortunately an installer is not available yet, therefore Visual Studio needs to be configured in order to run the extension. This is done only once by the extension itself.
38-
Only for the first time, Visual Studio must be run with Administrator privileges, if not a form will appear asking to restart Visual Studio:
44+
Only for the first time, Visual Studio must be run with Administrator privileges. If not, a form will appear asking to restart Visual Studio:
3945
<br><br>
4046
<p align="center">
4147
<img src="https://github.com/codingadventures/LINQBridgeVs/blob/master/Docs/VsRestart.PNG?raw=true" width="700" />
4248
</p>
4349

4450
Once Visual Studio is restarted as Administrator, the configuration will complete and the form will never appear again.
4551

46-
During this process two custom MsBuild Targets [Custom.After.Microsoft.Common.targets](https://github.com/codingadventures/LINQBridgeVs/blob/master/Src/VsExtension/Targets/Custom.After.Microsoft.Common.targets) and [Custom.Before.Microsoft.Common.targets](https://github.com/codingadventures/LINQBridgeVs/blob/master/Src/VsExtension/Targets/Custom.Before.Microsoft.Common.targets), are needed to extend the MsBuild process. They are copied into specific Visual Studio version and edition's folder:
52+
During this process two custom MsBuild Targets, [Custom.After.Microsoft.Common.targets](https://github.com/codingadventures/LINQBridgeVs/blob/master/Src/VsExtension/Targets/Custom.After.Microsoft.Common.targets) and [Custom.Before.Microsoft.Common.targets](https://github.com/codingadventures/LINQBridgeVs/blob/master/Src/VsExtension/Targets/Custom.Before.Microsoft.Common.targets), are needed to extend the MsBuild process. They are copied into specific Visual Studio version and edition's folder:
4753
* Visual Studio 2017 - C:\Program Files (x86)\Microsoft Visual Studio\2017\{Edition}\MSBuild\v15.0
4854
* Visual Studio 2015 - C:\Program Files (x86)\MSBuild\v14.0
4955
* Visual Studio 2013 - C:\Program Files (x86)\MSBuild\v12.0
5056
* Visual Studio 2012 - C:\Program Files (x86)\MSBuild\v4.0
5157

5258
You can skip this process but you will not be able to use the extension until you complete the configuration.
5359

54-
## Compatibility
55-
56-
LINQBridgeVs is compatible with any Visual Studio edition from 2012 to 2017. It works only for **.NET Framework 4.0 to 4.6.2**. There is no support for .NET Framework 3.5 downwards. LINQPad 4 and 5 are either supported.
57-
5860
## How it works
5961

60-
LINQBridgeVs uses a technique called [Aspect Oriented Programming](https://wikipedia.AOP). AOP is a programming paradigm that aims to increase modularity by allowing separations of cross-cutting concerns (read behaviors) without modifying the code itself. In general this is achieved by adding an extra step in the build process, usually after the assembly is created. Specifically in Visual Studio the [MsBuild](https://en.wikipedia.org/wiki/MSBuild), which is the Microsoft Build Engine, is to be extended to use AOP. This can be done by either copying a [custom Target file](https://msdn.microsoft.com/en-us/library/ms164312.aspx) to the MsBuild installation folder or by adding ***Target*** tags in a project file like the following:
62+
LINQBridgeVs uses a technique called [Aspect Oriented Programming](https://wikipedia.AOP). AOP is a programming paradigm that aims to increase modularity, by allowing separations of cross-cutting concerns (read behaviors) without modifying the code itself. Usually this is achieved by adding an extra step into the build process after the assembly is created.
63+
Specifically, in Visual Studio the Build Engine is called [MsBuild](https://en.wikipedia.org/wiki/MSBuild) and it is to be extended to use AOP. This can be done by either copying a [custom Target file](https://msdn.microsoft.com/en-us/library/ms164312.aspx) to a specific MsBuild folder or by adding ***Target*** tags in a project file like the following:
6164
```xml
6265
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
6366
Other similar extension points exist, see Microsoft.Common.targets. -->
@@ -69,24 +72,24 @@ LINQBridgeVs uses a technique called [Aspect Oriented Programming](https://wikip
6972

7073
This extension uses custom build Targets in order to avoid the modification of each individual project.
7174

72-
When a solution is *Bridged*, every projects in it is essentially flagged. Configuration values are stored in the Windows Registry at this location ***\HKEY_CURRENT_USER\Software\LINQBridgeVs***
75+
When a solution is *Bridged*, every project in is essentially flagged. Configuration values are stored in the Windows Registry at this location ***\HKEY_CURRENT_USER\Software\LINQBridgeVs***
7376

7477
<p align="center">
7578
<img src="https://github.com/codingadventures/LINQBridgeVs/blob/master/Docs/Registry.PNG?raw=true" width="700" />
7679
</p>
7780

78-
For each flagged project the custom tasks that extend the MsBuild engine mentioned earlier, perform some operation on the corresponding generated assembly. These tasks are:
81+
For each flagged project there are custom tasks that run before and after a project is built:
7982

8083
* **Mapper Task** - This task creates a Custom Debugger Visualizer assembly for each project.
81-
* **SInjection Task** - SInjection stands for "Serializable Injection". This task reads the built assembly and mark every public class and struct as Serializable. By doing so it's then possible to use binary serialization through the [BinaryFormatter](https://msdn.microsoft.com/en-us/library/system.runtime.serialization.formatters.binary.binaryformatter(v=vs.110).aspx) which is the standard binary serializer available in the .NET framework. Binary serialization is pretty powerful, and also fast. I prefer it over Json serialization, as it proved to be more suitable for complex object graphs.
82-
* **Clean Task** - This taks deletes the custom visualizers assemblies. It is invoked either by rebuilding or cleaning the solution.
84+
* **SInjection Task** - SInjection stands for "Serializable Injection". This task reads the built assembly and marks every public class and struct as Serializable. It also ensures that any type is serializable using the [BinaryFormatter](https://msdn.microsoft.com/en-us/library/system.runtime.serialization.formatters.binary.binaryformatter(v=vs.110).aspx).
85+
* **Clean Task** - This task deletes the custom visualizers assemblies generated by the Mapper task.
8386

8487
## Architecture of a Debugger Visualizer
8588

8689
From the [MSDN documentation](https://docs.microsoft.com/en-us/visualstudio/debugger/create-custom-visualizers-of-data):
8790
>Visualizers are components of the Visual Studio debugger user interface. A visualizer creates a dialog box or another interface to display a variable or object in a manner that is appropriate to its data type. For example, an HTML visualizer interprets an HTML string and displays the result as it would appear in a browser window; a bitmap visualizer interprets a bitmap structure and displays the graphic it represents. The Visual Studio debugger includes six standard visualizers.
8891
>
89-
The process of creating custom visualizers to extend the debugger is not too complicated. However it requires a lot of setup, either for mapping a class to custom visualizer but also to prepare the class for serialization.
92+
The process of creating custom visualizers to extend the debugger is not too complicated. However, it requires a lot of setup, either for mapping a class to custom visualizer but also to prepare the class for serialization.
9093

9194
The architecture of a debugger visualizer has two parts:
9295

@@ -137,17 +140,17 @@ namespace DebuggerVisualizerExample
137140
}
138141
```
139142

140-
For each class, *Class1, Class2, Class3* it is needed a global assembly attribute that maps the type to a debugger visualizer. This extension does all of this automatically. Internally it uses the .NET BinaryFormatter to send the data from the debuggee to the debugger. In case the BinaryFormatter fails to serialize the data, JSON.NET is used instead.
143+
For each class (*Class1, Class2, Class3*) a global assembly attribute that maps the type to a debugger visualizer is needed. This extension does all of this automatically. Internally it uses the .NET BinaryFormatter to send the data from the debuggee to the debugger. If the BinaryFormatter fails to serialize the data, JSON.NET is used instead.
141144

142145
## Acknowledgments
143146

144147
I have used several community open source projects to make this extension. So if you like LINQBridgeVs I recommend checking out the following:
145148

146-
- [JSON.NET](https://github.com/JamesNK/Newtonsoft.Json) is an awesome serializer. It has become part of the .NET Framework and it is used by millions worlwide, now it has become the standard. LINQBridgeVs mainly uses the BinaryFormatter but in case it fails it falls back on JSON.NET.
147-
- [VsRestart](https://github.com/ilmax/vs-restart) is an extension that restart Visual Studio under Administrator privileges. Unfortunately the project seems abandoned and the extension works only with Visual Studio 2013. However but code proved to be working with any version really.
148-
- [MahApps](https://github.com/MahApps/MahApps.Metro) which was the first open source project to make WPF truly modern.
149-
- [LINQPad](http://www.linqpad.net) super useful scratch pad for C#, VB, F#, SQL. Without it this extension wouldn't exist.
149+
- [LINQPad](http://www.linqpad.net) super useful scratch pad for C#, VB, F# and SQL. Without it this extension would not exist.
150150
- [Mono.Cecil](http://www.mono-project.com/docs/tools+libraries/libraries/Mono.Cecil/) very famous and useful AOP library designed, written and maintaned by JB Evain to generate and inspect programs and libraries in the ECMA CIL format.
151+
- [JSON.NET](https://github.com/JamesNK/Newtonsoft.Json) is an awesome serializer. It has become part of the .NET Framework and it is used by millions worlwide, now it has become the standard. LINQBridgeVs mainly uses the BinaryFormatter, but should it fail, it uses JSON.NET as a fallback mechanism.
152+
- [VsRestart](https://github.com/ilmax/vs-restart) is an extension that restart Visual Studio under Administrator privileges. Unfortunately the project seems abandoned. The extension works only with Visual Studio 2013. However, code proved to be working with any Visual Studio version.
153+
- [MahApps](https://github.com/MahApps/MahApps.Metro) which was the first open source project to make WPF truly modern.
151154
- [ILMerge](https://github.com/Microsoft/ILMerge) is a utility that merges multiple .NET assemblies into a single assembly.
152155

153156
[logo]: https://raw.github.com/codingadventures/LINQBridgeVs/master/Src/VsExtension/LINQBridgeLogo.png "LINQBridge"

0 commit comments

Comments
 (0)