Skip to content

Commit 021b7b5

Browse files
authored
Add support for .net references (OctoLinker#808)
* Add support for .net references * Use shorter regex * Fix file formatting
1 parent 5c81856 commit 021b7b5

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

e2e/fixtures/dotnet/sdk/Project.csproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<ItemGroup>
55
<!-- @OctoLinkerResolve(https://www.nuget.org/packages/Microsoft.VisualStudio.Web.CodeGeneration.Tools) -->
6-
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" />
6+
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" />
77

88
<!-- @OctoLinkerResolve(https://www.nuget.org/packages/Microsoft.DotNet.Watcher.Tools) -->
99
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0" />
@@ -17,11 +17,17 @@
1717
<ItemGroup>
1818
<!-- @OctoLinkerResolve(https://www.nuget.org/packages/Microsoft.Extensions.Hosting.Abstractions) -->
1919
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.1" />
20+
21+
<!-- @OctoLinkerResolve(https://www.nuget.org/packages/Microsoft.Extensions.Hosting.Abstractions) -->
22+
<Reference Include="Microsoft.Extensions.Hosting.Abstractions" />
2023
</ItemGroup>
2124

2225
<ItemGroup>
2326
<!-- @OctoLinkerResolve(https://www.nuget.org/packages/Microsoft.AspNetCore.Hosting.Abstractions) -->
24-
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" />
27+
<PackageReference Update="Microsoft.AspNetCore.Hosting.Abstractions" />
28+
29+
<!-- @OctoLinkerResolve(https://www.nuget.org/packages/Microsoft.Extensions.Hosting.Abstractions) -->
30+
<Reference Update="Microsoft.Extensions.Hosting.Abstractions" />
2531
</ItemGroup>
2632

2733
<ItemGroup>

packages/helper-grammar-regex-collection/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export const JAVA_IMPORT = regex`
201201
`;
202202

203203
export const NET_PROJ_PACKAGE = regex`
204-
<(PackageReference|DotNetCliToolReference|FrameworkReference)
204+
<(DotNetCliTool|Framework|Package)?Reference
205205
\s+
206206
.*
207207
(Include|Update)=${captureQuotedWord}

0 commit comments

Comments
 (0)