Skip to content

Fixing the AssemblyName in temporary project file for GenerateTemporaryTargetAssembly task - #7557

Merged
rchauhan18 merged 1 commit into
dotnet:mainfrom
Kuldeep-MS:fix/main/buildIssue
Aug 21, 2023
Merged

rchauhan18 merged 1 commit into
dotnet:mainfrom
Kuldeep-MS:fix/main/buildIssue

Conversation

@Kuldeep-MS

@Kuldeep-MS Kuldeep-MS commented Feb 21, 2023 •

Copy link
Copy Markdown
Contributor

Fixes
#5711
#5576

Description

When running the GenerateTemporaryTargetAssmebly task, a temporary project file gets created from the user defined project and in the process of creation, two instances of AssemblyName gets inserted in the file.

First instance will have evaluated value for assembly name (i.e. all the macros will be resolved) whereas second instance will still have the unresolved macros in the AssemblyName.

If MSBuildProjectName is being used computation of AssemblyName, it will cause MSBuild to pick current project name for naming the assembly and because temporary project file is being used we will have temporary project file name as assembly name and eventually no local references will be found in MarkupCompilation2.

Removing the second instance of AssemblyName from aforementioned project file resolves the issue as MSBuild will have only evaluated AssemblyName.

Customer Impact

Projects are not building if $(MSBuildProjectName) is being used in AssemblyName

Regression

Yes

Testing

In Progress

Risk

In evaluation

Microsoft Reviewers: Open in CodeFlow

@Kuldeep-MS
Kuldeep-MS requested a review from a team as a code owner February 21, 2023 12:42
@ghost ghost assigned Kuldeep-MS Feb 21, 2023
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Feb 21, 2023
@ghost
ghost requested review from dipeshmsft and singhashish-wpf February 21, 2023 12:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants