Skip to content

Commit

Permalink
Fix build when using Razor source generator
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasGoulet73 committed Aug 1, 2023
1 parent dabde7a commit 24aa88a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@
Analyzers="@(Analyzer)"
TemporaryTargetAssemblyProjectName="$(_TemporaryTargetAssemblyProjectName)"
MSBuildProjectExtensionsPath="$(MSBuildProjectExtensionsPath)"
RootNamespace="$(RootNamespace)"
>

<Output TaskParameter="TemporaryAssemblyForLocalTypeReference" PropertyName="_AssemblyForLocalTypeReference" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ private bool ExecuteGenerateTemporaryTargetAssemblyWithPackageReferenceSupport()
( nameof(BaseIntermediateOutputPath), BaseIntermediateOutputPath ),
( nameof(MSBuildProjectExtensionsPath), MSBuildProjectExtensionsPath ),
( "_TargetAssemblyProjectName", Path.GetFileNameWithoutExtension(CurrentProject) ),
( nameof(RootNamespace), RootNamespace ),
};

AddNewProperties(xmlProjectDoc, properties);
Expand Down Expand Up @@ -497,6 +498,14 @@ public ITaskItem[] Analyzers
[Required]
public string AnalyzerTypeName { get; set; }

/// <summary>
/// RootNamespace
///
/// Required for Source Generator support. May be null.
///
/// </summary>
public string RootNamespace { get; set; }

/// <summary>
/// BaseIntermediateOutputPath
///
Expand Down

0 comments on commit 24aa88a

Please sign in to comment.