Skip to content

Commit

Permalink
fix(core): use fully qualified project name in msbuild task
Browse files Browse the repository at this point in the history
  • Loading branch information
photomoose authored and AgentEnder committed Aug 23, 2021
1 parent 83948d5 commit 2c54310
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/generators/utils/generate-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export function setOutputPath(

export function addPrebuildMsbuildTask(
host: Tree,
options: { projectRoot: string; name: string },
options: { projectRoot: string; projectName: string },
xml: XmlDocument,
) {
const scriptPath = normalizePath(
Expand All @@ -207,7 +207,7 @@ export function addPrebuildMsbuildTask(

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export default async function update(host: Tree) {
.childrenNamed('Target')
.some((x) => x.attr['Name'] === 'CheckNxModuleBoundaries')
) {
addPrebuildMsbuildTask(host, { name, projectRoot: project.root }, xml);
addPrebuildMsbuildTask(
host,
{ projectName: name, projectRoot: project.root },
xml,
);
host.write(projectFilePath, xml.toString());
}
}
Expand Down

0 comments on commit 2c54310

Please sign in to comment.