1 |
|
---|
2 | Building this project will produce an analyzer .dll, as well as the
|
---|
3 | following two ways you may wish to package that analyzer:
|
---|
4 | * A NuGet package (.nupkg file) that will add your assembly as a
|
---|
5 | project-local analyzer that participates in builds.
|
---|
6 | * A VSIX extension (.vsix file) that will apply your analyzer to all projects
|
---|
7 | and works just in the IDE.
|
---|
8 |
|
---|
9 | To debug your analyzer, make sure the default project is the VSIX project and
|
---|
10 | start debugging. This will deploy the analyzer as a VSIX into another instance
|
---|
11 | of Visual Studio, which is useful for debugging, even if you intend to produce
|
---|
12 | a NuGet package.
|
---|
13 |
|
---|
14 |
|
---|
15 | TRYING OUT YOUR NUGET PACKAGE
|
---|
16 |
|
---|
17 | To try out the NuGet package:
|
---|
18 | 1. Create a local NuGet feed by following the instructions here:
|
---|
19 | > http://docs.nuget.org/docs/creating-packages/hosting-your-own-nuget-feeds
|
---|
20 | 2. Copy the .nupkg file into that folder.
|
---|
21 | 3. Open the target project in Visual Studio 2015.
|
---|
22 | 4. Right-click on the project node in Solution Explorer and choose Manage
|
---|
23 | NuGet Packages.
|
---|
24 | 5. Select the NuGet feed you created on the left.
|
---|
25 | 6. Choose your analyzer from the list and click Install.
|
---|
26 |
|
---|
27 | If you want to automatically deploy the .nupkg file to the local feed folder
|
---|
28 | when you build this project, follow these steps:
|
---|
29 | 1. Right-click on this project in Solution Explorer and choose 'Unload Project'.
|
---|
30 | 2. Right-click on this project and click "Edit".
|
---|
31 | 3. Scroll down to the "AfterBuild" target.
|
---|
32 | 4. In the "Exec" task, change the value inside "Command" after the -OutputDirectory
|
---|
33 | path to point to your local NuGet feed folder. |
---|