Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSIdentity msbuild fix #1741

Merged
merged 1 commit into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/install-msidentity.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set VERSION=1.0.0-dev
set VERSION=1.0.1
set NUPKG=artifacts\packages\Debug\Shipping\

pushd %~dp0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.Build.Locator;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Editing;
Expand Down Expand Up @@ -51,6 +52,12 @@ public async Task AddAuthCodeAsync()
return;
}

//Initialize Microsoft.Build assemblies
if (!MSBuildLocator.IsRegistered)
{
MSBuildLocator.RegisterDefaults();
}

//Initialize CodeAnalysis.Project wrapper
CodeAnalysis.Project project = await CodeAnalysisHelper.LoadCodeAnalysisProjectAsync(_toolOptions.ProjectFilePath);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\Shared\Microsoft.DotNet.Scaffolding.Shared\Microsoft.DotNet.Scaffolding.Shared.csproj" />
<PackageReference Include="Microsoft.Build.Locator" Version="$(MicrosoftBuildLocatorPackageVersion)" />
<Folder Include="Resources\" />
</ItemGroup>

Expand Down