Skip to content

Commit 2c54310

Browse files
photomooseAgentEnder
authored andcommitted
fix(core): use fully qualified project name in msbuild task
1 parent 83948d5 commit 2c54310

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/core/src/generators/utils/generate-project.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export function setOutputPath(
195195

196196
export function addPrebuildMsbuildTask(
197197
host: Tree,
198-
options: { projectRoot: string; name: string },
198+
options: { projectRoot: string; projectName: string },
199199
xml: XmlDocument,
200200
) {
201201
const scriptPath = normalizePath(
@@ -207,7 +207,7 @@ export function addPrebuildMsbuildTask(
207207

208208
const fragment = new XmlDocument(`
209209
<Target Name="CheckNxModuleBoundaries" BeforeTargets="Build">
210-
<Exec Command="node ${scriptPath} -p ${options.name}"/>
210+
<Exec Command="node ${scriptPath} -p ${options.projectName}"/>
211211
</Target>
212212
`);
213213

packages/core/src/migrations/1.2.0/add-module-boundaries-check/migrate.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ export default async function update(host: Tree) {
2323
.childrenNamed('Target')
2424
.some((x) => x.attr['Name'] === 'CheckNxModuleBoundaries')
2525
) {
26-
addPrebuildMsbuildTask(host, { name, projectRoot: project.root }, xml);
26+
addPrebuildMsbuildTask(
27+
host,
28+
{ projectName: name, projectRoot: project.root },
29+
xml,
30+
);
2731
host.write(projectFilePath, xml.toString());
2832
}
2933
}

0 commit comments

Comments
 (0)