Skip to content

Commit

Permalink
Pass evaluated AssemblyName during Roslyn workspace construction
Browse files Browse the repository at this point in the history
  • Loading branch information
drewnoakes committed Jun 3, 2021
1 parent 437504b commit 933784e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build/import/Packages.targets
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
<PackageReference Update="Microsoft.VisualStudio.ProjectSystem.SDK.Tools" Version="17.0.596-pre" />

<!-- Roslyn -->
<PackageReference Update="Microsoft.VisualStudio.LanguageServices" Version="4.0.0-1.21181.18" />
<PackageReference Update="Microsoft.CodeAnalysis" Version="4.0.0-1.21181.18" />
<PackageReference Update="Microsoft.VisualStudio.LanguageServices" Version="4.0.0-2.21302.13" />
<PackageReference Update="Microsoft.CodeAnalysis" Version="4.0.0-2.21302.13" />
<PackageReference Update="Microsoft.VisualStudio.IntegrationTest.Utilities" Version="2.6.0-beta1-62113-02" />
<PackageReference Update="Microsoft.CSharp" Version="4.7.0" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ private struct ProjectContextInitData
public string LanguageName;
public string BinOutputPath;
public string ProjectFilePath;
public string AssemblyName;
public Guid ProjectGuid;
public string WorkspaceProjectContextId;

Expand All @@ -38,6 +39,7 @@ public static ProjectContextInitData GetProjectContextInitData(IProjectRuleSnaps
snapshot.Properties.TryGetValue(ConfigurationGeneral.LanguageServiceNameProperty, out data.LanguageName);
snapshot.Properties.TryGetValue(ConfigurationGeneral.TargetPathProperty, out data.BinOutputPath);
snapshot.Properties.TryGetValue(ConfigurationGeneral.MSBuildProjectFullPathProperty, out data.ProjectFilePath);
snapshot.Properties.TryGetValue(ConfigurationGeneral.AssemblyNameProperty, out data.AssemblyName);

data.ProjectGuid = projectGuid;
data.WorkspaceProjectContextId = GetWorkspaceProjectContextId(data.ProjectFilePath, projectGuid, configuration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public async Task ReleaseProjectContextAsync(IWorkspaceProjectContextAccessor ac
data.ProjectFilePath,
data.ProjectGuid,
hostObject,
data.BinOutputPath);
data.BinOutputPath,
data.AssemblyName);
#pragma warning restore 612,618

context.LastDesignTimeBuildSucceeded = false; // By default, turn off diagnostics until the first design time build succeeds for this project.
Expand Down

0 comments on commit 933784e

Please sign in to comment.