Skip to content

Commit 225ca30

Browse files
committed
Updated docs and build number for v2.0 release.
1 parent a256f0d commit 225ca30

9 files changed

+118
-221
lines changed

CHANGELOG.md

+22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# NsDepCop Change Log
22

3+
## v2.0.0
4+
(06/2021)
5+
6+
The big change in this version is that the implementation changed from MSBuild task + Visual Studio Extension to a standard Roslyn analyzer.
7+
8+
- [x] NsDepCop must be added to a project as a NuGet package.
9+
- [x] Appears in Solution Explorer: project / Dependencies / Analyzers / NsDepCop.Analyzer
10+
- [x] Issue severities can be configured that same way as other analyzers (use Visual Studio or .editorconfig files).
11+
- [x] Works both at build time and inside Visual Studio editor.
12+
- [x] Requires Visual Studio 2019 (16.10.0 or later).
13+
- [x] Supports .NET Core / .NET 5 / etc. projects too.
14+
- [x] Uses Roslyn 3.9.0.
15+
16+
Stuff that was removed:
17+
- [x] No need for the NsDepCop Visual Studio Extension any more.
18+
- [x] No need for the out-of-process service host any more.
19+
- [x] Dropped support for VS 2015/2017. For those, use NsDepCop v1.11.0.
20+
- [x] Config attributes no longer supported (ignored): CodeIssueKind, MaxIssueCountSeverity, InfoImportance, AnalyzerServiceCallRetryTimeSpans.
21+
22+
Other info:
23+
- [x] AutoLowerMaxIssueCount feature is temporarily not supported.
24+
325
## v1.11.0
426
(04/2020)
527

Contribute.md

+5-31
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,12 @@
1-
# How to Contribute to NsDepCop
2-
* [How to build the source](#how-to-build-the-source)
3-
* [How to debug the tool in Visual Studio 2017](#how-to-debug-the-tool-in-visual-studio-2017)
4-
* [How to debug the tool in Visual Studio 2015](#how-to-debug-the-tool-in-visual-studio-2015)
5-
* [Why have different VSIX for VS2015 and VS2017?](#why-have-different-vsix-for-vs2015-and-vs2017)
6-
71
## How to build the source
82
1. Prerequisites
9-
* Visual Studio 2017/2019 (any edition)
3+
* Visual Studio 2019 (16.10.0 or later, any edition)
104
* With workload: **Visual Studio extension development**
115
1. [Download or clone the source](https://github.com/realvizu/NsDepCop)
126
1. Open "source\NsDepCop.sln"
137
1. Build the solution.
148

15-
## How to debug the tool in Visual Studio 2017
16-
1. Set **NsDepCop.VisualStudioIntegration.Vs2017** as the StartUp project.
17-
1. In the project properties set up the debug start action.
18-
* **Start external program**: the path to VS2017 devenv.exe
19-
* E.g.: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe
20-
* **Command line arguments**: /rootsuffix Exp
21-
1. Run the solution.
22-
23-
## How to debug the tool in Visual Studio 2015
24-
1. Set **NsDepCop.VisualStudioIntegration.Vs2015** as the StartUp project.
25-
1. In the project properties set up the debug start action.
26-
* **Start external program**: the path to VS2015 devenv.exe
27-
* E.g.: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe
28-
* **Command line arguments**: /rootsuffix Roslyn
29-
1. Run the solution.
30-
31-
## Why have different VSIX for VS2015 and VS2017?
32-
Because they are built with different Roslyn version.
33-
* VS2015 uses Roslyn 1.x.x (C# 6.0)
34-
* VS2017 uses Roslyn 2.x.x (C# 7.x)
35-
36-
See:
37-
* https://docs.microsoft.com/en-us/visualstudio/extensibility/roslyn-version-support
38-
* https://github.com/dotnet/roslyn/wiki/NuGet-packages
9+
## How to debug the tool in Visual Studio
10+
1. Set **NsDepCop.Vsix** as the StartUp project.
11+
1. In the project file modify the **StartArguments** tag to point to a valid solution file and log path.
12+
1. Run the solution.

README.md

+16-8
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,33 @@ What is this [**dependency control**](doc/DependencyControl.md) anyway?
1212

1313
1. Add the **NsDepCop NuGet package** to your C# projects: [![NuGet Package](https://img.shields.io/nuget/v/NsDepCop.svg)](https://nuget.org/packages/NsDepCop)
1414
1. Add a file called **config.nsdepcop**. Edit it and describe [**dependency rules**](doc/Help.md#dependency-rules).
15-
* For projects that use the old packages.config nuget format the file is automatically added.
16-
1. When you **build** the project, dependency violations will be reported in the build output just like compiler errors/warnings.
15+
1. Dependency violations will be underlined in the code editor and also reported at build time just like compiler errors/warnings.
1716

1817
See the [**Help**](doc/Help.md) for details.
1918

2019
## Optional Stuff
2120

22-
* Install the **VSIX** (Visual Studio Extension) to get **instant** dependency check while editing the code.
23-
* For Visual Studio 2017/2019: [![Visual Studio extension](https://img.shields.io/badge/Visual%20Studio%20Marketplace-NsDepCop-green.svg)](https://marketplace.visualstudio.com/items?itemName=FerencVizkeleti.NsDepCopVS2017-CodedependencycheckerforC)
24-
* For Visual Studio 2015: [![Visual Studio extension](https://img.shields.io/badge/Visual%20Studio%20Marketplace-NsDepCop%20VS2015-green.svg)](https://marketplace.visualstudio.com/items?itemName=FerencVizkeleti.NsDepCop-NamespacedependencycheckertoolforC)
25-
2621
* Install the **NsDepCop Config XML Schema Support** for Visual Studio to get validation and IntelliSense while editing the config.nsdepcop files.
2722
* For Visual Studio 2017/2019: [![Visual Studio extension](https://img.shields.io/badge/Visual%20Studio%20Marketplace-NsDepCop%20Config%20XML%20Schema%20Support-green.svg)](https://marketplace.visualstudio.com/items?itemName=FerencVizkeleti.NsDepCopConfigXMLSchemaSupport)
2823
* For Visual Studio 2015: see the instructions in [Help](doc/Help.md#config-xml-schema-support-in-visual-studio).
2924

25+
## Changes in v2.0
26+
27+
The big change in v2.0 is that the implementation changed from MSBuild task + Visual Studio Extension to a standard Roslyn analyzer.
28+
- **Supports .NET Core / .NET 5** projects too.
29+
- **No need for the NsDepCop Visual Studio Extension** any more.
30+
- The NuGet package works both at build time and inside Visual Studio editor.
31+
- If the NuGet package is added to a project then it appears in Solution Explorer: project / Dependencies / Analyzers / NsDepCop.Analyzer
32+
- [Issue severities can be configured using Visual Studio light bulb menu or .editorconfig files](https://docs.microsoft.com/en-us/visualstudio/code-quality/use-roslyn-analyzers?view=vs-2019).
33+
- **Requires Visual Studio 2019 (16.10.0 or later).**
34+
- Dropped support for VS 2015/2017. For those, use NsDepCop v1.11.0.
35+
- No need for the out-of-process service host any more.
36+
- No more "Unable to communicate with NsDepCop service".
37+
38+
Please note that the AutoLowerMaxIssueCount feature is temporarily not supported. Do not yet upgrade to v2.0 if you're using that.
39+
3040
## Versions
3141
* See the [**Change Log**](CHANGELOG.md) for version history.
32-
* See the [**Upgrade instructions**](CHANGELOG.md#upgrading) if upgrading from versions prior to v1.6.0.
33-
* See the [**Milestones**](https://github.com/realvizu/NsDepCop/milestones) for planned releases.
3442

3543
## Feedback
3644
* Please use the [**Issue Tracker**](https://github.com/realvizu/NsDepCop/issues) to record bugs and feature requests.

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ image: Visual Studio 2019
22

33
environment:
44
shortversion: '2.0.0'
5-
informationalversion: '2.0.0-rc1'
5+
informationalversion: '2.0.0'
66

77
version: '$(shortversion).{build}'
88

doc/Diagnostics.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,46 @@
44

55
Title|Illegal namespace reference.
66
:-|:-
7-
Severity|Set by CodeIssueKind attribute in the config file. (Default: Warning)
8-
Explanation|The designated symbol in the source code implies a namespace reference which is not allowed by the current namespace dependency configuration. That is, the symbol is used in a type in namespace A and references a type in namespace B but A->B dependency is not allowed.
9-
To Do|Change the namespace dependency configuration in the config.nsdepcop file or change your code/design to avoid this namespace reference.
7+
Default Severity|Warning
8+
Explanation|The designated type cannot reference the other type because their namespaces cannot depend on each other according to the current rules.
9+
To Do|Change the dependency rules in the 'config.nsdepcop' file or change your design to avoid this namespace dependency.
1010

1111
### NSDEPCOP02
1212

13-
Title|Too many issues, analysis was stopped.
13+
Title|Too many dependency issues, analysis was stopped.
1414
:-|:-
15-
Severity|Warning
16-
Explanation|The analysis stops after reporting a certain number of issues (default: 100) to avoid flooding your build log.
17-
To Do|Correct the reported issues and run the build again. Or set the MaxIssueCount attribute in your config.nsdepcop to a higher number.
15+
Default Severity|Warning
16+
Explanation|The number of dependency issues in this compilation has exceeded the configured maximum value.
17+
To Do|Correct the reported issues and run the build again or set the MaxIssueCount attribute in your 'config.nsdepcop' file to a higher number.
1818

1919
### NSDEPCOP03
2020

2121
Title|No config file found, analysis skipped.
2222
:-|:-
23-
Severity|Info
24-
Explanation|If there's no config.nsdepcop file next to the C# project file then NsDepCop does not perform analysis.
23+
Default Severity|Info
24+
Explanation|This analyzer requires that you add a file called 'config.nsdepcop' to your project with build action 'C# analyzer additional file'.
2525
To Do|None, this is just an informational message.
2626

2727
### NSDEPCOP04
2828

29-
Title|Analysis is disabled in the nsdepcop config file.
29+
Title|Analysis is disabled in the config file.
3030
:-|:-
31-
Severity|Info
32-
Explanation|There is a config.nsdepcop file next to the C# project file, but it contains IsEnabled="False".
31+
Default Severity|Info
32+
Explanation|The IsEnabled attribute was set to false in this project's 'config.nsdepcop' file, so the analyzer skips this project.
3333
To Do|None, this is just an informational message.
3434

3535
### NSDEPCOP05
3636

37-
Title|Error loading NsDepCop config.
37+
Title|Error loading config.
3838
:-|:-
39-
Severity|Error
40-
Explanation|There was an error while loading the config.nsdepcop file. Some possible reasons: malformed content, file permission or locking problem. The diagnostic contains the actual exception message.
39+
Default Severity|Error
40+
Explanation|There was an error while loading the 'config.nsdepcop' file, see the message for details. Some common reasons: malformed content, file permission or file locking problem.
4141
To Do|Make sure that the file can be read by the user running the build or Visual Studio and make sure that its content is correct.
4242

4343
### NSDEPCOP06
4444

4545
Title|Analysis is disabled with environment variable.
4646
:-|:-
47-
Severity|Info
48-
Explanation|If environment variable DisableNsDepCop is set to True or 1 then analysis is skipped.
47+
Default Severity|Info
48+
Explanation|If the 'DisableNsDepCop' environment variable is set to 'True' or '1' then all analysis is skipped.
4949
To Do|None, this is just an informational message.

0 commit comments

Comments
 (0)