Skip to content

Commit

Permalink
move common properties to build.props
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarolf committed Jan 27, 2021
1 parent 52acf72 commit a9d6001
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
6 changes: 4 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
<!-- VB specific settings -->
<When Condition="'$(Language)' == 'VB'">
<PropertyGroup>
<LangVersion>15.5</LangVersion>
<LangVersion>16</LangVersion>
</PropertyGroup>
</When>

<!-- C# specific settings -->
<When Condition="'$(Language)' == 'C#'">
<PropertyGroup>
<LangVersion>8.0</LangVersion>
<LangVersion>preview</LangVersion>
<WarningLevel>9999</WarningLevel>
<Nullable>enable</Nullable>
</PropertyGroup>
</When>
</Choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

public class RoslynSDKAnalyzerTemplateWizard : RoslynSDKChildTemplateWizard
{
public static Project Project { get; private set; }
public static Project? Project { get; private set; }

public override void OnProjectFinishedGenerating(Project project)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ public void ProjectItemFinishedGenerating(ProjectItem projectItem) { }
public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
{
ThreadHelper.ThrowIfNotOnUIThread();

OnRunStarted(automationObject as DTE, replacementsDictionary, runKind, customParams);
if (automationObject is DTE dte)
{
OnRunStarted(dte, replacementsDictionary, runKind, customParams);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

public class RoslynSDKCodeFixTemplateWizard : RoslynSDKChildTemplateWizard
{
public static Project Project { get; private set; }
public static Project? Project { get; private set; }

public override void OnProjectFinishedGenerating(Project project)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public void RunStarted(object automationObject, Dictionary<string, string> repla
{
ThreadHelper.ThrowIfNotOnUIThread();

OnRunStarted(automationObject as DTE, replacementsDictionary, runKind, customParams);
if (automationObject is DTE dte)
{
OnRunStarted(dte, replacementsDictionary, runKind, customParams);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<IsProductComponent>false</IsProductComponent>
<UseWpf>true</UseWpf>
<UseWindowsForms>true</UseWindowsForms>
<Nullable>enable</Nullable>
<LangVersion>9</LangVersion>
</PropertyGroup>

<!-- Package References -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<IsProductComponent>false</IsProductComponent>
<UseWpf>true</UseWpf>
<Nullable>enable</Nullable>
<LangVersion>9</LangVersion>

<!-- VSIX -->
<CreateVsixContainer>false</CreateVsixContainer>
Expand Down

0 comments on commit a9d6001

Please sign in to comment.