Skip to content

Commit 19e67ad

Browse files
committed
Add support for VB.NET projects
1 parent ae01d87 commit 19e67ad

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<BaseIntermediateOutputPath>$(RepoRootPath)obj\$([MSBuild]::MakeRelative($(RepoRootPath), $(MSBuildProjectDirectory)))\</BaseIntermediateOutputPath>
77
<BaseOutputPath Condition=" '$(BaseOutputPath)' == '' ">$(RepoRootPath)bin\$(MSBuildProjectName)\</BaseOutputPath>
88
<PackageOutputPath>$(RepoRootPath)bin\Packages\$(Configuration)\</PackageOutputPath>
9-
<LangVersion>12</LangVersion>
109
<Nullable>enable</Nullable>
1110
<ImplicitUsings>enable</ImplicitUsings>
1211
<AnalysisLevel>latest</AnalysisLevel>

Directory.Build.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
3+
<PropertyGroup>
4+
<LangVersion Condition="'$(Language)'=='C#'">12</LangVersion>
5+
<LangVersion Condition="'$(Language)'=='VB'">16.9</LangVersion>
6+
</PropertyGroup>
37
<ItemGroup>
48
<!-- Avoid compile error about missing namespace when combining ImplicitUsings with .NET Framework target frameworks. -->
59
<Using Remove="System.Net.Http" Condition="'$(TargetFrameworkIdentifier)'=='.NETFramework'" />

src/AssemblyInfo.vb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
' Copyright (c) COMPANY-PLACEHOLDER. All rights reserved.
2+
' Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
4+
Imports System.Runtime.InteropServices
5+
6+
<Assembly: DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)>

src/Directory.Build.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<ItemGroup>
4-
<Compile Include="$(MSBuildThisFileDirectory)AssemblyInfo.cs" />
4+
<Compile Include="$(MSBuildThisFileDirectory)AssemblyInfo.cs" Condition=" '$(Language)'=='C#' " />
5+
<Compile Include="$(MSBuildThisFileDirectory)AssemblyInfo.vb" Condition=" '$(Language)'=='VB' " />
56
</ItemGroup>
67

78
<Import Project="$([MSBuild]::GetPathOfFileAbove($(MSBuildThisFile), $(MSBuildThisFileDirectory)..))" />

0 commit comments

Comments
 (0)